Skip to content

Commit

Permalink
Improve error messages in space-age exercise
Browse files Browse the repository at this point in the history
  • Loading branch information
pfertyk committed Jun 3, 2024
1 parent 30ed8aa commit 4491dce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions exercises/practice/space-age/space_age_test.gd
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ func roughly_equal(n1, n2):
func test_age_on_Earth(solution_script):
var age = solution_script.on_planet('Earth', 1000000000)
var expected = 31.69
return [roughly_equal(age, expected), true]
return [snappedf(age, 0.01), expected]


func test_age_on_Mercury(solution_script):
var age = solution_script.on_planet('Mercury', 2134835688)
var expected = 280.88
var expected = 280.8
return [roughly_equal(age, expected), true]


Expand Down

0 comments on commit 4491dce

Please sign in to comment.