Guest User

Untitled

a guest
Feb 19th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. require 'test/unit'
  2.  
  3. class TestJuneCves < Test::Unit::TestCase
  4.  
  5. def test_should_raise_index_error
  6. assert_raise ArgumentError do
  7. a = []
  8. a[0x7fffffff] = "A"
  9. end
  10. end
  11.  
  12. def test_should_allow_ginormous_strings
  13. string = "A" * (2**16); true
  14. size = 0
  15. while 1 && size < 2097152 do
  16. string << string
  17. puts size = string.size
  18. end
  19. assert true
  20. end
  21.  
  22. end
Add Comment
Please, Sign In to add comment