diff options
| author | Nobuyoshi Nakada <[email protected]> | 2014-04-30 09:50:14 +0900 |
|---|---|---|
| committer | Nobuyoshi Nakada <[email protected]> | 2014-04-30 09:50:14 +0900 |
| commit | ab67c57f652c7c3a64ec4f4dc73259a14fb1b545 (patch) | |
| tree | d9535d70ba74920783864fa6372ec471aca5af91 /mrbgems/mruby-random/test/random.rb | |
| parent | 345f172bba2dc5a6df607dded5c4b95b0e68f9bf (diff) | |
| download | mruby-ab67c57f652c7c3a64ec4f4dc73259a14fb1b545.tar.gz mruby-ab67c57f652c7c3a64ec4f4dc73259a14fb1b545.zip | |
remove trailing spaces
Diffstat (limited to 'mrbgems/mruby-random/test/random.rb')
| -rw-r--r-- | mrbgems/mruby-random/test/random.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/mrbgems/mruby-random/test/random.rb b/mrbgems/mruby-random/test/random.rb index fa31b782b..1653ae4a6 100644 --- a/mrbgems/mruby-random/test/random.rb +++ b/mrbgems/mruby-random/test/random.rb @@ -31,32 +31,32 @@ assert("float") do rand.class == Float end -assert("Array#shuffle") do +assert("Array#shuffle") do ary = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] shuffled = ary.shuffle - + ary == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] and shuffled != ary and 10.times { |x| ary.include? x } end assert('Array#shuffle!') do ary = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] ary.shuffle! - + ary != [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] and 10.times { |x| ary.include? x } end -assert("Array#shuffle(random)") do +assert("Array#shuffle(random)") do assert_raise(TypeError) do # this will cause an exception due to the wrong argument [1, 2].shuffle "Not a Random instance" end - + # verify that the same seed causes the same results ary1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] shuffle1 = ary1.shuffle Random.new 345 ary2 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] shuffle2 = ary2.shuffle Random.new 345 - + ary1 != shuffle1 and 10.times { |x| shuffle1.include? x } and shuffle1 == shuffle2 end @@ -65,12 +65,12 @@ assert('Array#shuffle!(random)') do # this will cause an exception due to the wrong argument [1, 2].shuffle! "Not a Random instance" end - + # verify that the same seed causes the same results ary1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] ary1.shuffle! Random.new 345 ary2 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] ary2.shuffle! Random.new 345 - + ary1 != [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] and 10.times { |x| ary1.include? x } and ary1 == ary2 end |
