void test_fsfd_should_mock_and_move_to_operand2_0x02480154(void){ int value; Text *text = textNew("71"); String *str = stringNew(text); extractValue_ExpectAndReturn(str, 0x154); extractValue_ExpectAndReturn(str, 0x248); value = FSFD(str); TEST_ASSERT_EQUAL_HEX32(value, 0x02480154); }
void test_NS_operand1_should_mock_and_return_0x02670067(void){ int value; int e; Text *text = textNew("135"); String *str = stringNew(text); extractValue_ExpectAndReturn(str, 0x267); extractValue_ExpectAndReturn(str, 0); value = NS(str); TEST_ASSERT_EQUAL_HEX32(value, 0x02670067); }
void test_s_operand1_0xffe_should_mock_and_return_0(void){ int value; int e; Text *text = textNew("135"); String *str = stringNew(text); extractValue_ExpectAndReturn(str, 0xffe); value = S(str); TEST_ASSERT_EQUAL_HEX8(value, 0x0); }
void test_FA_with_ERR_NO_ARGUMENT_0xff6_should_return_0xf6_and_store_in_ACCESS(void){ int value; int e; Text *text = textNew("135"); String *str = stringNew(text); extractValue_ExpectAndReturn(str, 0xff6); extractACCESSBANKED_ExpectAndThrow(str, 4); value = FA(str); TEST_ASSERT_EQUAL_HEX16(value, 0xf6); }
void test_FA_should_return_0x34_and_store_in_BANKED(void){ int value; int e; Text *text = textNew("135"); String *str = stringNew(text); extractValue_ExpectAndReturn(str, 0x134); extractACCESSBANKED_ExpectAndReturn(str, 1); value = FA(str); TEST_ASSERT_EQUAL_HEX16(value, 0x134); }
void test_FA_operand2_ERR_ILLEGAL_ARGUMENT_should_mock_and_throw_error(void){ int value; int e; Text *text = textNew("135"); String *str = stringNew(text); extractValue_ExpectAndReturn(str, 0x35); extractACCESSBANKED_ExpectAndThrow(str, 2); Try{ value = FA(str); }Catch(e){ TEST_ASSERT_EQUAL(ERR_ILLEGAL_ARGUMENT, e); } }