Ad
  • Default User Avatar

    I added better messages to the mentioned test cases.

  • Custom User Avatar

    I enjoyed this kata, except for the part at the end where I had to reshuffle all my commutativity stuff to make it match the test cases.

    Not sure how much of the issue I ran into is only part of the rust version.

    From reading the thread below, it seems like the expected way to resolve the commutativity ordering issues is to rely on the example tests? This isn't explicitly stated in the instructions (though I suggest that it should be), and is a bit annoying that the tests conflict with the given reference materials on what the ordering should be (the reference link gives the chain rule as f(g(x))' = f(g(x)) * g'(x), but the tests implement it as f(g(x))' = g'(x) * f(g(x)))

    However, the main actual issue I ran into is that it's possible to pass the given example tests and yet fail on the tests where you can't see what the expected result is due to the opaque error message assertion failed: result == expected1 || result == expected2, which obscures the information about the expected ordering of the solution (in my case, the associativity was being grouped differently, my solution encoded cos(x) * 3 * (sin(x))^2 as (* (* (cos x) 3) (^ (sin x) 2)), grouping multiplication from left to right, which isn't rejected by the example tests or addressed in the instructions)

    If this message could be fixed in the Rust implementation so that the kata can be completed without potentially requiring guessing, that would be great.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution