18 lines
743 B
Ruby
18 lines
743 B
Ruby
require_relative 'helper'
|
|
|
|
class TestPutint < MiniTest::Test
|
|
include Fragments
|
|
|
|
def test_putint
|
|
@string_input = <<HERE
|
|
fourty_two = 42
|
|
fourty_two.putint()
|
|
HERE
|
|
@should = [0x0,0x40,0x2d,0xe9,0x1,0x20,0xa0,0xe1,0x20,0x10,0x8f,0xe2,0x9,0x10,0x81,0xe2,0xe9,0xff,0xff,0xeb,0x14,0x10,0x8f,0xe2,0xc,0x20,0xa0,0xe3,0x1,0x0,0xa0,0xe3,0x4,0x70,0xa0,0xe3,0x0,0x0,0x0,0xef,0x0,0x70,0xa0,0xe1,0x0,0x80,0xbd,0xe8,0x0,0x40,0x2d,0xe9,0x1,0x20,0xa0,0xe1,0x20,0x10,0x8f,0xe2,0x9,0x10,0x81,0xe2,0xe9,0xff,0xff,0xeb,0x14,0x10,0x8f,0xe2,0xc,0x20,0xa0,0xe3,0x1,0x0,0xa0,0xe3,0x4,0x70,0xa0,0xe3,0x0,0x0,0x0,0xef,0x0,0x70,0xa0,0xe1,0x0,0x80,0xbd,0xe8]
|
|
@output = " 42 "
|
|
@target = [:Object , :putint]
|
|
parse
|
|
write "putint"
|
|
end
|
|
end
|