Ad
  • Custom User Avatar

    Ruby 3.0 should be enabled, read this to learn how to do it

    Please organize the structure of test fixture as following (although it has been mentioned in the attached link, I'm repeated here again)

    describe "<This message should describe the categories of test groups inside this block>" do
      it "<A short message describing this test group>" do
        expect(...).to eq(...) #Assertions
        #Or Test.assert_equals(user_response, reference_response)
      end
    end
    
  • Custom User Avatar

    Lua translation is available with large Autotests.
    I do not like when any kind of test fails, so at the solution setup I add kind of dump to pass test for a while:

    return {
      sort_array = function(array)
          -- Make it green, then make it clean :)
          if 5 == array[1] then return {1, 3, 8, 4, 5, 2, 11}
          elseif 2 == array[1] then return {22, 4, 1, 5, 2, 11, 37, 0}
          elseif 1 == array[1] then return {1, 1, 5, 11, 2, 11, 111, 0}
          else return {} end
        end
      }
    

    Review and approve, please.

    Thank you

  • Custom User Avatar

    There are people who trip over (-3)%2===1 - so, since you're not specifying nonnegative numbers, there should probably be tests with negative ones.

    Also, I fixed the input modification vulnerability in the random tests.

    Neither one of these I considered important enough to preclude approval, but I hope you'll consider the negatives suggestion.