renamed true,false,nil class to constant (from value)

This commit is contained in:
Torsten Ruger 2014-09-14 18:15:33 +03:00
parent 6b85054958
commit c51dbf51e1
3 changed files with 7 additions and 7 deletions

View File

@ -1,5 +1,5 @@
module Register module Register
class Integer < Word class UnusedAndAbandonedInteger < Word
# needs to be here as Word's constructor is private (to make it abstract) # needs to be here as Word's constructor is private (to make it abstract)
def initialize reg def initialize reg
super super

View File

@ -2,11 +2,11 @@ module Virtual
class Constant < ::Virtual::Value class Constant < ::Virtual::Value
end end
class TrueValue < Constant class TrueConstant < Constant
end end
class FalseValue < Constant class FalseConstant < Constant
end end
class NilValue < Constant class NilConstant < Constant
end end
# another abstract "marker" class (so we can check for it) # another abstract "marker" class (so we can check for it)

View File

@ -11,17 +11,17 @@ class TestBasic < MiniTest::Test
def test_true def test_true
@string_input = 'true ' @string_input = 'true '
@output = "---RETURN_MARKER- !ruby/object:Virtual::TrueValue {}RETURN_MARKER" @output = "---RETURN_MARKER- !ruby/object:Virtual::TrueConstant {}RETURN_MARKER"
check check
end end
def test_false def test_false
@string_input = 'false ' @string_input = 'false '
@output = "---RETURN_MARKER- !ruby/object:Virtual::FalseValue {}RETURN_MARKER" @output = "---RETURN_MARKER- !ruby/object:Virtual::FalseConstant {}RETURN_MARKER"
check check
end end
def test_nil def test_nil
@string_input = 'nil ' @string_input = 'nil '
@output = "---RETURN_MARKER- !ruby/object:Virtual::NilValue {}RETURN_MARKER" @output = "---RETURN_MARKER- !ruby/object:Virtual::NilConstant {}RETURN_MARKER"
check check
end end