Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Random seed koan not working #2

Open
Haksell opened this issue Mar 5, 2021 · 0 comments
Open

Random seed koan not working #2

Haksell opened this issue Mar 5, 2021 · 0 comments

Comments

@Haksell
Copy link

Haksell commented Mar 5, 2021

I changed the seed to 42 as indicated in the source file, but still fail the test. I'm guessing Julia has changed its randomness mechanism between 1.2 (the one you assume) and 1.5 (the one I use), so not sure an issue is in order.

using Random
aboutkoan = "set the myseed equal to something else, besides 1"
myseed = 42
Random.seed!(myseed)
@test rand(1:10^20) == 5590813852184710016
Test Failed at In[10]:5
  Expression: rand(1:10 ^ 20) == 5590813852184710016
   Evaluated: 2353793361580022217 == 5590813852184710016
There was an error during testing

Stacktrace:
 [1] record(::Test.FallbackTestSet, ::Union{Test.Error, Test.Fail}) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Test/src/Test.jl:737
 [2] do_test(::Test.ExecutionResult, ::Any) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Test/src/Test.jl:520
 [3] top-level scope at In[10]:5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant