Skip to content

Commit

Permalink
test: Fix value types in the i64_eqz test
Browse files Browse the repository at this point in the history
  • Loading branch information
chfast committed Nov 18, 2020
1 parent 8b3aa64 commit c30970f
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions test/unittests/execute_numeric_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,17 +178,17 @@ TEST(execute_numeric, i64_eqz)
{
const auto i64_eqz = create_unary_operation_executor(Instr::i64_eqz);

EXPECT_THAT(i64_eqz(0), Result(1));
EXPECT_THAT(i64_eqz(1), Result(0));
EXPECT_THAT(i64_eqz(0_u64), Result(1_u32));
EXPECT_THAT(i64_eqz(1_u64), Result(0_u32));

// 64-bit value on the stack, type violation.
EXPECT_THAT(i64_eqz(0x0000000000000000), Result(1));
EXPECT_THAT(i64_eqz(0xff00000000), Result(0));
EXPECT_THAT(i64_eqz(0xff00000001), Result(0));
EXPECT_THAT(i64_eqz(0xffffffff00000000), Result(0));
EXPECT_THAT(i64_eqz(0xffffffff00000001), Result(0));
EXPECT_THAT(i64_eqz(0x8000000000000000), Result(0));
EXPECT_THAT(i64_eqz(0x8000000000000001), Result(0));
EXPECT_THAT(i64_eqz(0x0000000000000000_u64), Result(1_u32));
EXPECT_THAT(i64_eqz(0xff00000000_u64), Result(0_u32));
EXPECT_THAT(i64_eqz(0xff00000001_u64), Result(0_u32));
EXPECT_THAT(i64_eqz(0xffffffff00000000_u64), Result(0_u32));
EXPECT_THAT(i64_eqz(0xffffffff00000001_u64), Result(0_u32));
EXPECT_THAT(i64_eqz(0x8000000000000000_u64), Result(0_u32));
EXPECT_THAT(i64_eqz(0x8000000000000001_u64), Result(0_u32));
}

TEST(execute_numeric, i64_eq)
Expand Down

0 comments on commit c30970f

Please sign in to comment.