Ad
  • Custom User Avatar

    Remark below is an ISSUE.

  • Custom User Avatar

    Random tests are not strong enough. An inferior algorithm, hardcoding 2 fixed tests, made me pass all random tests.

  • Custom User Avatar

    Issues:

    • 100k tests is overkill, and ~100 should be totally enough.
    • It is not clear if collinear points are a valid triangle. What is expected answer for [ [0, 0], [1, 1], [2, 2]]?
    • Text like "Code should identify invalid arrays." should be a title of a test case or a test group. Assertion message should present input of a failing test.
    • Tests should specify and validate requirements w.r.t. mutation of input array. In this problem it is not necessary to mutate the input to solve it, so I think that specifying mutation as forbidden (and enforcing this) would be a way to go.

    Suggestions:

    • (int) (Math.random() * 200) -100 is a really bad way if generating random numbers. There is Random::nextInt, there is Random::ints.
    • Solution class could use some less specific name than ForemanPig.
    • Logic for generating dupes seems very convoluted. It can be significantly simplified, and dupes should be guaranteed to occur in the test set, and not be present only by random chance.
  • Custom User Avatar
    • Messages are not formatted correctly:
    For input: [[I@1ffe63b9, [I@51e5fc98, [I@51e5fc98, [I@7c469c48] ==> expected: <true> but was: <false>
    
    • Only some tests attempt to present inputs, while some others do not.
  • Custom User Avatar

    I read the description a couple of times and I still have no idea what "ordered pairs" are, especially in context of triangles :thinking:

  • Custom User Avatar
    • the user's scope has the wrong class name
    • no random tests
    • the kata concept lacks novelty