Class: TestFixnum

Inherits:
Test::Unit::TestCase
  • Object
show all
Defined in:
lib/quiz1/t/solutions/Moses Hohman/test_util.rb

Instance Method Summary collapse

Instance Method Details

#test_offset_modObject



32
33
34
35
36
37
# File 'lib/quiz1/t/solutions/Moses Hohman/test_util.rb', line 32

def test_offset_mod
	assert_equal(1, 27.offset_mod(26), "27 wrong")
	assert_equal(26, 26.offset_mod(26), "26 wrong")
	assert_equal(26, 0.offset_mod(26), "0 wrong")
	assert_equal(25, -1.offset_mod(26), "-1 wrong")
end