Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Fixed in this fork
Approved the fork above
Approved
hey, thanks for the review, i modified the literals so that they are
Integer
s; the random tests should now expecttrue
~50% of the time.this kata makes no sense for floating point numbers and the tedious input validation mentioned in the description is against the authoring guidelines, and will have to be removed from all languages at some point (plus the kata has already been translated to statically typed languages where this kind of input validation is impossible)
Enabled Ruby 3.0 + RSpec [1]
Generate true cases more often
Added an edge cases [2]
Flipped actual & expected in the assertion [3]
The
n
generated in random tests are always a float, so returningfalse
will pass all random tests. (This is because1e5
&1e9
are treated as floats in Ruby)You can replace
1e5
with10**5
to generate true cases sometimes. (False cases can be a mix of integers & float value, or purely integers, depends on you)Enabled Ruby 3.0 + RSpec
Refsol now recurses properly instead of calling user solution
Enabled Ruby 3.0 + RSpec
Enabled Ruby 3.0 + RSpec
Enabled in this fork
Ruby 3.0 enabled in this fork
Enabled Ruby 3.0 + RSpec [1]
Description made language agnostic
Approved
Loading more items...