Ad
  • Default User Avatar

    ... this is exactly why I want test frameworks to use this wording instead: expected X but got Y

    the wording used here makes sense when interacting with the test code, but the test code is hidden, it's the opposite of that. it should instead focus on presenting the result :s -- having the test read "expected Y" when in reality it expects X is just silly.

  • Custom User Avatar

    I'm not natan, but did you consider what happens to negative numbers when they're squared? :P

    In your example, if you take the first number -95 and square it, you get 9025, which is not the smallest number at all... But it exists in 2nd array, just like all the other numbers.

  • Custom User Avatar

    He's right, this fails in go.

    [11 19 19 19 121 144 144 161]
    [121 361 361 14641 20736 20736 25921 36100]

    121 - 121
    361 - 361
    361 - 361
    361 - 14641
    False

    3 19s but only 2 361s

  • Default User Avatar

    the test button is just example tests, the attempt button is the full test suite.
    there's nothing weird about passing some tests but not others. that's not an issue.

  • Custom User Avatar