problem-specifications icon indicating copy to clipboard operation
problem-specifications copied to clipboard

complex-numbers: move exercise involving multiplication

Open KevinWMatthews opened this issue 6 years ago • 3 comments

Should we move the test for the imaginary unit to the "multiply" group of unit tests? I think it's currently too soon in the test suite.

There is a nice progression to the unit tests:

  • real part
  • imaginary part
  • add
  • subtract
  • multiply

and so on. The test for the "imaginary unit" involves multiplication but is inserted between the "imaginary" and "add" groups.

I think this is purely historical. PR #718 created the tests, #1140 reordered them but missed this one.

I don't mind opening a PR but first I'd like to learn how to test changes.

KevinWMatthews avatar Sep 17 '19 15:09 KevinWMatthews

In #718 I put it as the first test case because, at least informally, complex numbers are often defined or thought of as a + bi where i² = -1. The other properties can all be derived from that.

Edit: This is also the definition the exercise description uses.

I don't really care about the position in the canonical-data but that was the intention behind it.

SaschaMann avatar Sep 17 '19 16:09 SaschaMann

@SaschaMann Ah, interesting! I didn't consider that point of view. I was trying to think of what the students would need to do to make the tests pass.

Maybe some mentors have feedback to give?

KevinWMatthews avatar Sep 18 '19 14:09 KevinWMatthews

No comment has been made on this PR in the last 3 years. @KevinWMatthews are you still interested in pursuing this issue?

ErikSchierboom avatar Jan 14 '22 14:01 ErikSchierboom