Skip to content

Saddle-points: Add test for multiple saddle-points in a row#1272

Merged
rpottsoh merged 1 commit intoexercism:masterfrom
DocFogel:master
Jul 26, 2018
Merged

Saddle-points: Add test for multiple saddle-points in a row#1272
rpottsoh merged 1 commit intoexercism:masterfrom
DocFogel:master

Conversation

@DocFogel
Copy link
Copy Markdown
Contributor

@DocFogel DocFogel commented Jul 23, 2018

There is a test for multiple saddle points in a column, but there is no test for multiple points in a row.

These changes rename the existing test to indicate it tests for saddle points in a column and adds a test for multiple points in a row.

@cmccandless
Copy link
Copy Markdown
Contributor

Exercise description

Copy link
Copy Markdown
Member

@rpottsoh rpottsoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making the change.

What caused you to consider adding the new test case? There was no initial comment to your PR to give some background about what brought about the proposed change.

@DocFogel
Copy link
Copy Markdown
Contributor Author

I was mentoring a student and the initial solution missed this case. I realized it from reading the code, so I deviced the test and verified that the code failed.
The student added yet another test where the whole matrix was actually full of saddle-points, but I think this test and the existing one, checking for multiples in a column, covers that scenario too.

@rpottsoh
Copy link
Copy Markdown
Member

@DocFogel thanks for the background information. Nice find! I have gone ahead and borrowed your initial comment from your exercism/python#1427 comment so others that may come across this PR in the future will have a better idea behind the PR's purpose.

@rpottsoh
Copy link
Copy Markdown
Member

I think this is ready for merging, but I will hold off at least another day, to allow anyone else a chance to provide any input they might like to give. If someone else wants to merge sooner that is OK too.

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.

3 participants