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.
Please use spoiler flag next time. Your post was visible in the homepage discourse.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Sorry, last night I was sleepy and wasn't thinking too good and didn't test it...
But I tested it now and I seem to get a wrong expected result on some test every time I run it (I put the new solution in the "Solution" tab, and the old one in the tests) :/
Here's one:
This doesn't look right to me.
I have more examples I could put if you want them...
@Steffan153 - Huh? Since it was a random test case why do you think it would be reproducible by @netizenx. That exact input might never happen again randomly. Did you first confirm there was a bug in the previous Dart reference solution, or did you just change it and hope?
I know Dart, so I replaced the reference solution.
Does it look good now?
I wasted a lot of time trying to figure out why I was just a bit off. The tests use gravity as 32 ft / s exactly instead of 32.2 or 32.174. Only after figuring out the problem did I notice the -16t^2 term denoted 1/2(g)(t^2), thus showing the assumption.
Fixed
EDIT: this was actually a duplicate issue.
Dart: All "Run Sample Tests" fail with below eror. This includes code that passes the Attempt.
Test Results:
Failed to load "test/solution_test.dart": Bad state: expect() may only be called within a test.
I agree. That doesn't look right.
@hrommy
, can you please check your translation and fix?To me it looks like there is an issue in the expected string for random tests in Dart. Below is an example that expects a nut in [3], but I'm not seeing how that's possible. I've even seen a test case where a nut was expected below a '_' in the bottom row.
This. This is what hung me up for hours. The "jump brackets" can be nested and only stop when they reach their partner - not just any closing pair.
On the up side, I got to explore the rabbit hole that is "what should happen on memmory wrap-around".