Skip to content

Update vehicle_purchase_test.cpp - #3

Open
pdmoore wants to merge 1 commit into
mainfrom
pdmoore-patch-1-2
Open

Update vehicle_purchase_test.cpp#3
pdmoore wants to merge 1 commit into
mainfrom
pdmoore-patch-1-2

Conversation

@pdmoore

@pdmoore pdmoore commented Aug 6, 2023

Copy link
Copy Markdown
Owner

Current tests for choose_vehicle allow a simplistic implementation of return option1 + " is clearly the better choice."; to pass all tests without comparing option1 and option2.

This is due to the current tests all passing in option1 and option2 sorted in lexicographic order already.

This change swaps option1 and option2 for a couple of the tests which forces the implementation to compare the parameters.

This change will not impact existing solutions that are correctly implemented.

Current tests for choose_vehicle allow a simplistic implementation of
return option1 + " is clearly the better choice.";
to pass all tests without comparing option1 and option2.

This is due to the current tests all passing in option1 and option2 sorted in lexicographic order already.

This change swaps option1 and option2 for a couple of the tests which forces the implementation to compare the parameters.

This change will not impact existing solutions that are correctly implemented.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant