renamed true,false,nil class to constant (from value)
This commit is contained in:
parent
6b85054958
commit
c51dbf51e1
@ -1,5 +1,5 @@
|
||||
module Register
|
||||
class Integer < Word
|
||||
class UnusedAndAbandonedInteger < Word
|
||||
# needs to be here as Word's constructor is private (to make it abstract)
|
||||
def initialize reg
|
||||
super
|
||||
|
@ -2,11 +2,11 @@ module Virtual
|
||||
|
||||
class Constant < ::Virtual::Value
|
||||
end
|
||||
class TrueValue < Constant
|
||||
class TrueConstant < Constant
|
||||
end
|
||||
class FalseValue < Constant
|
||||
class FalseConstant < Constant
|
||||
end
|
||||
class NilValue < Constant
|
||||
class NilConstant < Constant
|
||||
end
|
||||
|
||||
# another abstract "marker" class (so we can check for it)
|
||||
|
@ -11,17 +11,17 @@ class TestBasic < MiniTest::Test
|
||||
|
||||
def test_true
|
||||
@string_input = 'true '
|
||||
@output = "---RETURN_MARKER- !ruby/object:Virtual::TrueValue {}RETURN_MARKER"
|
||||
@output = "---RETURN_MARKER- !ruby/object:Virtual::TrueConstant {}RETURN_MARKER"
|
||||
check
|
||||
end
|
||||
def test_false
|
||||
@string_input = 'false '
|
||||
@output = "---RETURN_MARKER- !ruby/object:Virtual::FalseValue {}RETURN_MARKER"
|
||||
@output = "---RETURN_MARKER- !ruby/object:Virtual::FalseConstant {}RETURN_MARKER"
|
||||
check
|
||||
end
|
||||
def test_nil
|
||||
@string_input = 'nil '
|
||||
@output = "---RETURN_MARKER- !ruby/object:Virtual::NilValue {}RETURN_MARKER"
|
||||
@output = "---RETURN_MARKER- !ruby/object:Virtual::NilConstant {}RETURN_MARKER"
|
||||
check
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user