diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-03-26 20:20:07 -0700 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-03-26 20:20:07 -0700 |
| commit | f1e6a4a3b564ac07f0b283af05bc2d7be5a31414 (patch) | |
| tree | 57a5855657168addedc2b206aacb7ba1e2994532 | |
| parent | 55fa7373a4081d657a813a1f4c9ef4999fbbb9d2 (diff) | |
| parent | 6e110cb43d011c1e87fbfeaab1c7f0451c52a9f5 (diff) | |
| download | mruby-f1e6a4a3b564ac07f0b283af05bc2d7be5a31414.tar.gz mruby-f1e6a4a3b564ac07f0b283af05bc2d7be5a31414.zip | |
Merge pull request #1080 from matsumoto-r/add_test_for_random_class_methods
Add test for Random::srand
| -rw-r--r-- | mrbgems/mruby-random/test/random.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mrbgems/mruby-random/test/random.rb b/mrbgems/mruby-random/test/random.rb index ef3c6e482..01d231d5c 100644 --- a/mrbgems/mruby-random/test/random.rb +++ b/mrbgems/mruby-random/test/random.rb @@ -15,6 +15,14 @@ assert("Kernel::srand") do r1 == r2 end +assert("Random::srand") do + Random.srand(345) + r1 = rand + srand(345) + r2 = Random.rand + r1 == r2 +end + assert("fixnum") do rand(3).class == Fixnum end |
