diff --git a/test/register/test_positioning.rb b/test/register/test_positioning.rb index 9775a2e8..4b284229 100644 --- a/test/register/test_positioning.rb +++ b/test/register/test_positioning.rb @@ -1,5 +1,9 @@ require_relative "../helper" +class TestPosition + include Positioned +end + class TestPositioning < MiniTest::Test def setup Register.machine.boot unless Register.machine.booted @@ -24,4 +28,17 @@ class TestPositioning < MiniTest::Test word = Parfait::Word.new(12) assert_equal 32 , word.padded_length end + def test_raises_no_init + assert_raises { TestPosition.new.position} + end + def test_raises_set_nil + assert_raises { TestPosition.new.position = nil} + end + def test_raises_reset_far + assert_raises do + test = TestPosition.new + test.position = 0 + test.position = 12000 + end + end end