2020-02-29 16:17:58 +01:00
|
|
|
require_relative "../helper"
|
|
|
|
|
|
|
|
module Risc
|
|
|
|
class TestLoadConstant < MiniTest::Test
|
|
|
|
def setup
|
|
|
|
Parfait.boot!({})
|
|
|
|
end
|
2020-03-07 18:25:07 +01:00
|
|
|
def risc(i)
|
|
|
|
const = SlotMachine::StringConstant.new("hi")
|
2020-02-29 16:17:58 +01:00
|
|
|
Risc.load_constant("source" , const)
|
|
|
|
end
|
|
|
|
def test_const
|
2020-03-07 18:25:07 +01:00
|
|
|
assert_load 1 , SlotMachine::StringConstant , "id_string_"
|
2020-02-29 16:17:58 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
class TestLoadConstant1 < MiniTest::Test
|
|
|
|
def setup
|
|
|
|
Parfait.boot!({})
|
|
|
|
end
|
2020-03-07 18:25:07 +01:00
|
|
|
def risc(i)
|
|
|
|
const = Parfait.new_word("hi")
|
2020-02-29 16:17:58 +01:00
|
|
|
Risc.load_constant("source" , const)
|
|
|
|
end
|
|
|
|
def test_parf
|
2020-03-07 18:25:07 +01:00
|
|
|
assert_load 1 , Parfait::Word , "id_word_"
|
2020-02-29 16:17:58 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|