From cae90ed529e048167beb79755873b4e8296f7c33 Mon Sep 17 00:00:00 2001 From: Chuck Remes Date: Mon, 23 Jan 2017 15:51:29 -0600 Subject: [PATCH] add test for instructions::raise_exc --- machine/test/test_instructions.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/machine/test/test_instructions.hpp b/machine/test/test_instructions.hpp index 06bb1b83e7..1aef5ccef5 100644 --- a/machine/test/test_instructions.hpp +++ b/machine/test/test_instructions.hpp @@ -1912,12 +1912,12 @@ class TestInstructions : public CxxTest::TestSuite, public VMTest { void test_raise_exc() { InstructionTest test = lambda { - stack_push(cNil); + Exception* exc = Exception::create(state); + stack_push(exc); - // TODO: instructions - // instructions::raise_exc(state, call_frame); + instructions::raise_exc(state, call_frame); - TS_ASSERT(true); + TS_ASSERT(kind_of(state->thread_state()->current_exception())); }; interpreter(1, 0, test);