another +1 bug
This commit is contained in:
@ -50,7 +50,7 @@ module Risc
|
||||
assert_equal RegToSlot , produced.next(base+3).class
|
||||
assert_equal :r1 , produced.next(base+3).register.symbol
|
||||
assert_equal :r3 , produced.next(base+3).array.symbol
|
||||
assert_equal 2 , produced.next(base+3).index , "first arg must have index 1"
|
||||
assert_equal 1 , produced.next(base+3).index , "first arg must have index 1"
|
||||
end
|
||||
def test_load_label
|
||||
produced = produce_body
|
||||
|
@ -110,5 +110,19 @@ module Parfait
|
||||
two = Parfait.new_word("one")
|
||||
assert one.compare(two)
|
||||
end
|
||||
def test_first_char
|
||||
one = Parfait.new_word("one")
|
||||
one.set_char(0 , "T".ord)
|
||||
assert_equal "Tne" , one.to_string
|
||||
end
|
||||
def test_sec_char
|
||||
one = Parfait.new_word("one")
|
||||
one.set_char(1 , "m".ord)
|
||||
assert_equal "ome" , one.to_string
|
||||
end
|
||||
def test_more_char
|
||||
one = Parfait.new_word("one")
|
||||
assert_raises {one.set_char(3 , "s".ord)}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -5,7 +5,7 @@ module Risc
|
||||
include Ticker
|
||||
|
||||
def setup
|
||||
@string_input = as_main("return 'Hello'.get_internal_byte(1)")
|
||||
@string_input = as_main("return 'Hello'.get_internal_byte(0)")
|
||||
super
|
||||
end
|
||||
def test_chain
|
||||
|
@ -5,7 +5,7 @@ module Risc
|
||||
include Ticker
|
||||
|
||||
def setup
|
||||
@string_input = as_main("return 'Hello'.set_internal_byte(1,75)")
|
||||
@string_input = as_main("return 'Hello'.set_internal_byte(0,75)")
|
||||
super
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user