Index: test/unittests/wasm/ast-decoder-unittest.cc |
diff --git a/test/unittests/wasm/ast-decoder-unittest.cc b/test/unittests/wasm/ast-decoder-unittest.cc |
index 8606d4c6b46328e7c1c66cc8de92957300360ec0..14f9c40765a919724f79a09b5a79a567e1b59a29 100644 |
--- a/test/unittests/wasm/ast-decoder-unittest.cc |
+++ b/test/unittests/wasm/ast-decoder-unittest.cc |
@@ -2500,6 +2500,19 @@ TEST_F(WasmOpcodeLengthTest, SimpleExpressions) { |
EXPECT_LENGTH(1, kExprI64ReinterpretF64); |
} |
+TEST_F(WasmOpcodeLengthTest, SimdExpressions) { |
+#define TEST_SIMD(name, opcode, sig) \ |
+ EXPECT_LENGTH_N(2, kSimdPrefix, static_cast<byte>(kExpr##name & 0xff)); |
+ FOREACH_SIMD_0_OPERAND_OPCODE(TEST_SIMD) |
+#undef TEST_SIMD |
+#define TEST_SIMD(name, opcode, sig) \ |
+ EXPECT_LENGTH_N(3, kSimdPrefix, static_cast<byte>(kExpr##name & 0xff)); |
+ FOREACH_SIMD_1_OPERAND_OPCODE(TEST_SIMD) |
+#undef TEST_SIMD |
+ // test for bad simd opcode |
+ EXPECT_LENGTH_N(2, kSimdPrefix, 0xff); |
+} |
+ |
typedef ZoneVector<LocalType> LocalTypeMap; |
class LocalDeclDecoderTest : public TestWithZone { |