upon further exploration, it's because I change the argument arrays, and this makes the unit test expected calculation misbehave. Either the unit tests should be fixed (to at least display a meaningful error in that case...), or the instructions clarified.
Is there some issue with the random tests in ruby? I keep getting failures because it expects an empty array when I return an interleaved array. For example, in one of the random tests, the input was:
3 <<<<
t k 1 0 c l y <<<<
q x 5 <<<<
l 8 o s g a v <<<<
m v <<<<
j k s v r <<<<
b 4 s r f f 3 r <<<<
4 z 0 6 <<<<
<<<<
(each row is an array)
and I got the error message:
Expected: [], instead got: [3, "t", "q", "l", "m", "j", "b", 4, nil, nil, "k", "x", 8, "v", "k", 4, "z", nil, nil, 1, 5, "o", nil, "s", "s", 0, nil, nil, 0, nil, "s", nil, "v", "r", 6, nil, nil, "c", nil, "g", nil, "r", "f", nil, nil, nil, "l", nil, "a", nil, nil, "f", nil, nil, nil, "y", nil, "v", nil, nil, 3, nil, nil, nil, nil, nil, nil, nil, nil, "r", nil, nil]
upon further exploration, it's because I change the argument arrays, and this makes the unit test expected calculation misbehave. Either the unit tests should be fixed (to at least display a meaningful error in that case...), or the instructions clarified.
Is there some issue with the random tests in ruby? I keep getting failures because it expects an empty array when I return an interleaved array. For example, in one of the random tests, the input was:
3 <<<<
t k 1 0 c l y <<<<
q x 5 <<<<
l 8 o s g a v <<<<
m v <<<<
j k s v r <<<<
b 4 s r f f 3 r <<<<
4 z 0 6 <<<<
<<<<
(each row is an array)
and I got the error message:
Expected: [], instead got: [3, "t", "q", "l", "m", "j", "b", 4, nil, nil, "k", "x", 8, "v", "k", 4, "z", nil, nil, 1, 5, "o", nil, "s", "s", 0, nil, nil, 0, nil, "s", nil, "v", "r", 6, nil, nil, "c", nil, "g", nil, "r", "f", nil, nil, nil, "l", nil, "a", nil, nil, "f", nil, nil, nil, "y", nil, "v", nil, nil, 3, nil, nil, nil, nil, nil, nil, nil, nil, "r", nil, nil]
This comment is hidden because it contains spoiler information about the solution
Why not?
Is this really a 5?
Thanks for reporting. It's fixed. Regards, suic
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Ruby translation
This comment is hidden because it contains spoiler information about the solution
Thanks a bunch! Being able to see the issue made it possible to actually resolve the problem.
Updated the tests to use
chai
.Change testing suite to use chai so the error message in Node 10 is meaningful
Specially in random tests where arrays are bigger.
Loading more items...