Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(572)

Unified Diff: test/cctest/wasm/test-run-wasm.cc

Issue 1970543003: [formatting] Remove all double blank lines in WASM code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/wasm/wasm-result.cc ('k') | test/cctest/wasm/test-run-wasm-js.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/wasm/test-run-wasm.cc
diff --git a/test/cctest/wasm/test-run-wasm.cc b/test/cctest/wasm/test-run-wasm.cc
index 79685e31051523297e8eea98af3c58169fc66a05..057912902f32134bfc44b3b73772a3a1a73e63f7 100644
--- a/test/cctest/wasm/test-run-wasm.cc
+++ b/test/cctest/wasm/test-run-wasm.cc
@@ -34,7 +34,6 @@ TEST(Run_WasmInt8Const) {
CHECK_EQ(kExpectedValue, r.Call());
}
-
TEST(Run_WasmInt8Const_fallthru1) {
WasmRunner<int32_t> r;
const byte kExpectedValue = 122;
@@ -43,7 +42,6 @@ TEST(Run_WasmInt8Const_fallthru1) {
CHECK_EQ(kExpectedValue, r.Call());
}
-
TEST(Run_WasmInt8Const_fallthru2) {
WasmRunner<int32_t> r;
const byte kExpectedValue = 123;
@@ -52,7 +50,6 @@ TEST(Run_WasmInt8Const_fallthru2) {
CHECK_EQ(kExpectedValue, r.Call());
}
-
TEST(Run_WasmInt8Const_all) {
for (int value = -128; value <= 127; value++) {
WasmRunner<int32_t> r;
@@ -63,7 +60,6 @@ TEST(Run_WasmInt8Const_all) {
}
}
-
TEST(Run_WasmInt32Const) {
WasmRunner<int32_t> r;
const int32_t kExpectedValue = 0x11223344;
@@ -72,7 +68,6 @@ TEST(Run_WasmInt32Const) {
CHECK_EQ(kExpectedValue, r.Call());
}
-
TEST(Run_WasmInt32Const_many) {
FOR_INT32_INPUTS(i) {
WasmRunner<int32_t> r;
@@ -83,7 +78,6 @@ TEST(Run_WasmInt32Const_many) {
}
}
-
TEST(Run_WasmMemorySize) {
TestingModule module;
WasmRunner<int32_t> r(&module);
@@ -92,7 +86,6 @@ TEST(Run_WasmMemorySize) {
CHECK_EQ(1024, r.Call());
}
-
TEST(Run_WasmInt32Param0) {
WasmRunner<int32_t> r(MachineType::Int32());
// return(local[0])
@@ -100,7 +93,6 @@ TEST(Run_WasmInt32Param0) {
FOR_INT32_INPUTS(i) { CHECK_EQ(*i, r.Call(*i)); }
}
-
TEST(Run_WasmInt32Param0_fallthru) {
WasmRunner<int32_t> r(MachineType::Int32());
// local[0]
@@ -108,7 +100,6 @@ TEST(Run_WasmInt32Param0_fallthru) {
FOR_INT32_INPUTS(i) { CHECK_EQ(*i, r.Call(*i)); }
}
-
TEST(Run_WasmInt32Param1) {
WasmRunner<int32_t> r(MachineType::Int32(), MachineType::Int32());
// local[1]
@@ -116,7 +107,6 @@ TEST(Run_WasmInt32Param1) {
FOR_INT32_INPUTS(i) { CHECK_EQ(*i, r.Call(-111, *i)); }
}
-
TEST(Run_WasmInt32Add) {
WasmRunner<int32_t> r;
// 11 + 44
@@ -124,7 +114,6 @@ TEST(Run_WasmInt32Add) {
CHECK_EQ(55, r.Call());
}
-
TEST(Run_WasmInt32Add_P) {
WasmRunner<int32_t> r(MachineType::Int32());
// p0 + 13
@@ -132,7 +121,6 @@ TEST(Run_WasmInt32Add_P) {
FOR_INT32_INPUTS(i) { CHECK_EQ(*i + 13, r.Call(*i)); }
}
-
TEST(Run_WasmInt32Add_P_fallthru) {
WasmRunner<int32_t> r(MachineType::Int32());
// p0 + 13
@@ -140,7 +128,6 @@ TEST(Run_WasmInt32Add_P_fallthru) {
FOR_INT32_INPUTS(i) { CHECK_EQ(*i + 13, r.Call(*i)); }
}
-
TEST(Run_WasmInt32Add_P2) {
WasmRunner<int32_t> r(MachineType::Int32(), MachineType::Int32());
// p0 + p1
@@ -154,7 +141,6 @@ TEST(Run_WasmInt32Add_P2) {
}
}
-
TEST(Run_WasmFloat32Add) {
WasmRunner<int32_t> r;
// int(11.5f + 44.5f)
@@ -163,7 +149,6 @@ TEST(Run_WasmFloat32Add) {
CHECK_EQ(56, r.Call());
}
-
TEST(Run_WasmFloat64Add) {
WasmRunner<int32_t> r;
// return int(13.5d + 43.5d)
@@ -171,7 +156,6 @@ TEST(Run_WasmFloat64Add) {
CHECK_EQ(57, r.Call());
}
-
void TestInt32Binop(WasmOpcode opcode, int32_t expected, int32_t a, int32_t b) {
{
WasmRunner<int32_t> r;
@@ -219,7 +203,6 @@ TEST(Run_WasmInt32Binops) {
TestInt32Binop(kExprI32GeU, 1, 0xF0000000, 98978);
}
-
void TestInt32Unop(WasmOpcode opcode, int32_t expected, int32_t a) {
{
WasmRunner<int32_t> r;
@@ -235,7 +218,6 @@ void TestInt32Unop(WasmOpcode opcode, int32_t expected, int32_t a) {
}
}
-
TEST(Run_WasmInt32Clz) {
TestInt32Unop(kExprI32Clz, 0, 0x80001000);
TestInt32Unop(kExprI32Clz, 1, 0x40000500);
@@ -272,7 +254,6 @@ TEST(Run_WasmInt32Clz) {
TestInt32Unop(kExprI32Clz, 32, 0x00000000);
}
-
TEST(Run_WasmInt32Ctz) {
TestInt32Unop(kExprI32Ctz, 32, 0x00000000);
TestInt32Unop(kExprI32Ctz, 31, 0x80000000);
@@ -309,7 +290,6 @@ TEST(Run_WasmInt32Ctz) {
TestInt32Unop(kExprI32Ctz, 0, 0x9afdbc81);
}
-
TEST(Run_WasmInt32Popcnt) {
TestInt32Unop(kExprI32Popcnt, 32, 0xffffffff);
TestInt32Unop(kExprI32Popcnt, 0, 0x00000000);
@@ -373,7 +353,6 @@ TEST(Run_WASM_Int32DivS_trap) {
CHECK_TRAP(r.Call(kMin, 0));
}
-
TEST(Run_WASM_Int32RemS_trap) {
WasmRunner<int32_t> r(MachineType::Int32(), MachineType::Int32());
BUILD(r, WASM_I32_REMS(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
@@ -385,7 +364,6 @@ TEST(Run_WASM_Int32RemS_trap) {
CHECK_TRAP(r.Call(kMin, 0));
}
-
TEST(Run_WASM_Int32DivU_trap) {
WasmRunner<int32_t> r(MachineType::Int32(), MachineType::Int32());
BUILD(r, WASM_I32_DIVU(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
@@ -397,7 +375,6 @@ TEST(Run_WASM_Int32DivU_trap) {
CHECK_TRAP(r.Call(kMin, 0));
}
-
TEST(Run_WASM_Int32RemU_trap) {
WasmRunner<int32_t> r(MachineType::Int32(), MachineType::Int32());
BUILD(r, WASM_I32_REMU(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
@@ -423,7 +400,6 @@ TEST(Run_WASM_Int32DivS_byzero_const) {
}
}
-
TEST(Run_WASM_Int32DivU_byzero_const) {
for (uint32_t denom = 0xfffffffe; denom < 8; denom++) {
WasmRunner<uint32_t> r(MachineType::Uint32());
@@ -439,7 +415,6 @@ TEST(Run_WASM_Int32DivU_byzero_const) {
}
}
-
TEST(Run_WASM_Int32DivS_trap_effect) {
TestingModule module;
module.AddMemoryElems<int32_t>(8);
@@ -474,7 +449,6 @@ void TestFloat32Binop(WasmOpcode opcode, int32_t expected, float a, float b) {
}
}
-
void TestFloat32BinopWithConvert(WasmOpcode opcode, int32_t expected, float a,
float b) {
{
@@ -493,7 +467,6 @@ void TestFloat32BinopWithConvert(WasmOpcode opcode, int32_t expected, float a,
}
}
-
void TestFloat32UnopWithConvert(WasmOpcode opcode, int32_t expected, float a) {
{
WasmRunner<int32_t> r;
@@ -509,7 +482,6 @@ void TestFloat32UnopWithConvert(WasmOpcode opcode, int32_t expected, float a) {
}
}
-
void TestFloat64Binop(WasmOpcode opcode, int32_t expected, double a, double b) {
{
WasmRunner<int32_t> r;
@@ -525,7 +497,6 @@ void TestFloat64Binop(WasmOpcode opcode, int32_t expected, double a, double b) {
}
}
-
void TestFloat64BinopWithConvert(WasmOpcode opcode, int32_t expected, double a,
double b) {
{
@@ -543,7 +514,6 @@ void TestFloat64BinopWithConvert(WasmOpcode opcode, int32_t expected, double a,
}
}
-
void TestFloat64UnopWithConvert(WasmOpcode opcode, int32_t expected, double a) {
{
WasmRunner<int32_t> r;
@@ -611,7 +581,6 @@ TEST(Run_WasmFloat32Neg) {
}
}
-
TEST(Run_WasmFloat64Neg) {
WasmRunner<double> r(MachineType::Float64());
BUILD(r, WASM_F64_NEG(WASM_GET_LOCAL(0)));
@@ -622,7 +591,6 @@ TEST(Run_WasmFloat64Neg) {
}
}
-
TEST(Run_Wasm_IfElse_P) {
WasmRunner<int32_t> r(MachineType::Int32());
// if (p0) return 11; else return 22;
@@ -690,7 +658,6 @@ TEST(Run_Wasm_IfElse_Unreachable1) {
CHECK_EQ(27, r.Call());
}
-
TEST(Run_Wasm_Return12) {
WasmRunner<int32_t> r;
@@ -698,7 +665,6 @@ TEST(Run_Wasm_Return12) {
CHECK_EQ(12, r.Call());
}
-
TEST(Run_Wasm_Return17) {
WasmRunner<int32_t> r;
@@ -706,7 +672,6 @@ TEST(Run_Wasm_Return17) {
CHECK_EQ(17, r.Call());
}
-
TEST(Run_Wasm_Return_I32) {
WasmRunner<int32_t> r(MachineType::Int32());
@@ -715,7 +680,6 @@ TEST(Run_Wasm_Return_I32) {
FOR_INT32_INPUTS(i) { CHECK_EQ(*i, r.Call(*i)); }
}
-
TEST(Run_Wasm_Return_F32) {
WasmRunner<float> r(MachineType::Float32());
@@ -732,7 +696,6 @@ TEST(Run_Wasm_Return_F32) {
}
}
-
TEST(Run_Wasm_Return_F64) {
WasmRunner<double> r(MachineType::Float64());
@@ -749,7 +712,6 @@ TEST(Run_Wasm_Return_F64) {
}
}
-
TEST(Run_Wasm_Select) {
WasmRunner<int32_t> r(MachineType::Int32());
// return select(11, 22, a);
@@ -760,7 +722,6 @@ TEST(Run_Wasm_Select) {
}
}
-
TEST(Run_Wasm_Select_strict1) {
WasmRunner<int32_t> r(MachineType::Int32());
// select(a=0, a=1, a=2); return a
@@ -771,7 +732,6 @@ TEST(Run_Wasm_Select_strict1) {
FOR_INT32_INPUTS(i) { CHECK_EQ(2, r.Call(*i)); }
}
-
TEST(Run_Wasm_Select_strict2) {
WasmRunner<int32_t> r(MachineType::Int32());
r.AllocateLocal(kAstI32);
@@ -799,7 +759,6 @@ TEST(Run_Wasm_Select_strict3) {
}
}
-
TEST(Run_Wasm_BrIf_strict) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(
@@ -988,7 +947,6 @@ TEST(Run_Wasm_F32ReinterpretI32) {
}
}
-
TEST(Run_Wasm_I32ReinterpretF32) {
TestingModule module;
int32_t* memory = module.AddMemoryElems<int32_t>(8);
@@ -1006,7 +964,6 @@ TEST(Run_Wasm_I32ReinterpretF32) {
}
}
-
TEST(Run_Wasm_ReturnStore) {
TestingModule module;
int32_t* memory = module.AddMemoryElems<int32_t>(8);
@@ -1022,7 +979,6 @@ TEST(Run_Wasm_ReturnStore) {
}
}
-
TEST(Run_Wasm_VoidReturn1) {
// We use a wrapper function because WasmRunner<void> does not exist.
@@ -1042,7 +998,6 @@ TEST(Run_Wasm_VoidReturn1) {
CHECK_EQ(kExpected, result);
}
-
TEST(Run_Wasm_VoidReturn2) {
// We use a wrapper function because WasmRunner<void> does not exist.
// Build the test function.
@@ -1137,7 +1092,6 @@ TEST(Run_Wasm_Block_BrIf_P) {
}
}
-
TEST(Run_Wasm_Block_IfElse_P_assign) {
WasmRunner<int32_t> r(MachineType::Int32());
// { if (p0) p0 = 71; else p0 = 72; return p0; }
@@ -1152,7 +1106,6 @@ TEST(Run_Wasm_Block_IfElse_P_assign) {
}
}
-
TEST(Run_Wasm_Block_IfElse_P_return) {
WasmRunner<int32_t> r(MachineType::Int32());
// if (p0) return 81; else return 82;
@@ -1166,7 +1119,6 @@ TEST(Run_Wasm_Block_IfElse_P_return) {
}
}
-
TEST(Run_Wasm_Block_If_P_assign) {
WasmRunner<int32_t> r(MachineType::Int32());
// { if (p0) p0 = 61; p0; }
@@ -1179,7 +1131,6 @@ TEST(Run_Wasm_Block_If_P_assign) {
}
}
-
TEST(Run_Wasm_DanglingAssign) {
WasmRunner<int32_t> r(MachineType::Int32());
// { return 0; p0 = 0; }
@@ -1187,7 +1138,6 @@ TEST(Run_Wasm_DanglingAssign) {
CHECK_EQ(99, r.Call(1));
}
-
TEST(Run_Wasm_ExprIf_P) {
WasmRunner<int32_t> r(MachineType::Int32());
// p0 ? 11 : 22;
@@ -1200,7 +1150,6 @@ TEST(Run_Wasm_ExprIf_P) {
}
}
-
TEST(Run_Wasm_ExprIf_P_fallthru) {
WasmRunner<int32_t> r(MachineType::Int32());
// p0 ? 11 : 22;
@@ -1213,7 +1162,6 @@ TEST(Run_Wasm_ExprIf_P_fallthru) {
}
}
-
TEST(Run_Wasm_CountDown) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r,
@@ -1229,7 +1177,6 @@ TEST(Run_Wasm_CountDown) {
CHECK_EQ(0, r.Call(100));
}
-
TEST(Run_Wasm_CountDown_fallthru) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r,
@@ -1244,7 +1191,6 @@ TEST(Run_Wasm_CountDown_fallthru) {
CHECK_EQ(0, r.Call(100));
}
-
TEST(Run_Wasm_WhileCountDown) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r, WASM_BLOCK(
@@ -1257,7 +1203,6 @@ TEST(Run_Wasm_WhileCountDown) {
CHECK_EQ(0, r.Call(100));
}
-
TEST(Run_Wasm_Loop_if_break1) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r, B2(WASM_LOOP(2, WASM_IF(WASM_GET_LOCAL(0), WASM_BREAK(1)),
@@ -1269,7 +1214,6 @@ TEST(Run_Wasm_Loop_if_break1) {
CHECK_EQ(-29, r.Call(-29));
}
-
TEST(Run_Wasm_Loop_if_break2) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r, B2(WASM_LOOP(2, WASM_BR_IF(1, WASM_GET_LOCAL(0)),
@@ -1281,7 +1225,6 @@ TEST(Run_Wasm_Loop_if_break2) {
CHECK_EQ(-29, r.Call(-29));
}
-
TEST(Run_Wasm_Loop_if_break_fallthru) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r, B1(WASM_LOOP(2, WASM_IF(WASM_GET_LOCAL(0), WASM_BREAK(1)),
@@ -1329,7 +1272,6 @@ TEST(Run_Wasm_LoadMemI32) {
CHECK_EQ(77777777, r.Call(0));
}
-
TEST(Run_Wasm_LoadMemI32_oob) {
TestingModule module;
int32_t* memory = module.AddMemoryElems<int32_t>(8);
@@ -1349,7 +1291,6 @@ TEST(Run_Wasm_LoadMemI32_oob) {
}
}
-
TEST(Run_Wasm_LoadMem_offset_oob) {
TestingModule module;
module.AddMemoryElems<int32_t>(8);
@@ -1376,7 +1317,6 @@ TEST(Run_Wasm_LoadMem_offset_oob) {
}
}
-
TEST(Run_Wasm_LoadMemI32_offset) {
TestingModule module;
int32_t* memory = module.AddMemoryElems<int32_t>(4);
@@ -1402,7 +1342,6 @@ TEST(Run_Wasm_LoadMemI32_offset) {
CHECK_EQ(44444444, r.Call(8));
}
-
#if !V8_TARGET_ARCH_MIPS && !V8_TARGET_ARCH_MIPS64
TEST(Run_Wasm_LoadMemI32_const_oob_misaligned) {
@@ -1430,7 +1369,6 @@ TEST(Run_Wasm_LoadMemI32_const_oob_misaligned) {
#endif
-
TEST(Run_Wasm_LoadMemI32_const_oob) {
const int kMemSize = 24;
for (int offset = 0; offset < kMemSize + 5; offset += 4) {
@@ -1453,7 +1391,6 @@ TEST(Run_Wasm_LoadMemI32_const_oob) {
}
}
-
TEST(Run_Wasm_StoreMemI32_offset) {
TestingModule module;
int32_t* memory = module.AddMemoryElems<int32_t>(4);
@@ -1477,7 +1414,6 @@ TEST(Run_Wasm_StoreMemI32_offset) {
}
}
-
TEST(Run_Wasm_StoreMem_offset_oob) {
TestingModule module;
byte* memory = module.AddMemoryElems<byte>(32);
@@ -1514,7 +1450,6 @@ TEST(Run_Wasm_StoreMem_offset_oob) {
}
}
-
TEST(Run_Wasm_LoadMemI32_P) {
const int kNumElems = 8;
TestingModule module;
@@ -1529,7 +1464,6 @@ TEST(Run_Wasm_LoadMemI32_P) {
}
}
-
TEST(Run_Wasm_MemI32_Sum) {
const int kNumElems = 20;
TestingModule module;
@@ -1562,7 +1496,6 @@ TEST(Run_Wasm_MemI32_Sum) {
}
}
-
TEST(Run_Wasm_CheckMachIntsZero) {
const int kNumElems = 55;
TestingModule module;
@@ -1578,7 +1511,6 @@ TEST(Run_Wasm_CheckMachIntsZero) {
CHECK_EQ(0, r.Call((kNumElems - 1) * 4));
}
-
TEST(Run_Wasm_MemF32_Sum) {
const int kSize = 5;
TestingModule module;
@@ -1612,7 +1544,6 @@ TEST(Run_Wasm_MemF32_Sum) {
CHECK_EQ(71256.0f, buffer[0]);
}
-
template <typename T>
T GenerateAndRunFold(WasmOpcode binop, T* buffer, size_t size,
LocalType astType, MachineType memType) {
@@ -1643,7 +1574,6 @@ T GenerateAndRunFold(WasmOpcode binop, T* buffer, size_t size,
return module.raw_mem_at<double>(0);
}
-
TEST(Run_Wasm_MemF64_Mul) {
const size_t kSize = 6;
double buffer[kSize] = {1, 2, 2, 2, 2, 2};
@@ -1652,14 +1582,12 @@ TEST(Run_Wasm_MemF64_Mul) {
CHECK_EQ(32, result);
}
-
TEST(Build_Wasm_Infinite_Loop) {
WasmRunner<int32_t> r(MachineType::Int32());
// Only build the graph and compile, don't run.
BUILD(r, WASM_INFINITE_LOOP);
}
-
TEST(Build_Wasm_Infinite_Loop_effect) {
TestingModule module;
module.AddMemoryElems<int8_t>(16);
@@ -1669,7 +1597,6 @@ TEST(Build_Wasm_Infinite_Loop_effect) {
BUILD(r, WASM_LOOP(1, WASM_LOAD_MEM(MachineType::Int32(), WASM_ZERO)));
}
-
TEST(Run_Wasm_Unreachable0a) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r, B2(WASM_BRV(0, WASM_I8(9)), RET(WASM_GET_LOCAL(0))));
@@ -1677,7 +1604,6 @@ TEST(Run_Wasm_Unreachable0a) {
CHECK_EQ(9, r.Call(1));
}
-
TEST(Run_Wasm_Unreachable0b) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r, B2(WASM_BRV(0, WASM_I8(7)), WASM_UNREACHABLE));
@@ -1685,38 +1611,32 @@ TEST(Run_Wasm_Unreachable0b) {
CHECK_EQ(7, r.Call(1));
}
-
TEST(Build_Wasm_Unreachable1) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r, WASM_UNREACHABLE);
}
-
TEST(Build_Wasm_Unreachable2) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r, WASM_UNREACHABLE, WASM_UNREACHABLE);
}
-
TEST(Build_Wasm_Unreachable3) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r, WASM_UNREACHABLE, WASM_UNREACHABLE, WASM_UNREACHABLE);
}
-
TEST(Build_Wasm_UnreachableIf1) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r, WASM_UNREACHABLE, WASM_IF(WASM_GET_LOCAL(0), WASM_GET_LOCAL(0)));
}
-
TEST(Build_Wasm_UnreachableIf2) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r, WASM_UNREACHABLE,
WASM_IF_ELSE(WASM_GET_LOCAL(0), WASM_GET_LOCAL(0), WASM_UNREACHABLE));
}
-
TEST(Run_Wasm_Unreachable_Load) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r, B2(WASM_BRV(0, WASM_GET_LOCAL(0)),
@@ -1725,7 +1645,6 @@ TEST(Run_Wasm_Unreachable_Load) {
CHECK_EQ(21, r.Call(21));
}
-
TEST(Run_Wasm_Infinite_Loop_not_taken1) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r, B2(WASM_IF(WASM_GET_LOCAL(0), WASM_INFINITE_LOOP), WASM_I8(45)));
@@ -1733,7 +1652,6 @@ TEST(Run_Wasm_Infinite_Loop_not_taken1) {
CHECK_EQ(45, r.Call(0));
}
-
TEST(Run_Wasm_Infinite_Loop_not_taken2) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r, B1(WASM_IF_ELSE(WASM_GET_LOCAL(0), WASM_BRV(1, WASM_I8(45)),
@@ -1742,7 +1660,6 @@ TEST(Run_Wasm_Infinite_Loop_not_taken2) {
CHECK_EQ(45, r.Call(1));
}
-
TEST(Run_Wasm_Infinite_Loop_not_taken2_brif) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r,
@@ -1751,7 +1668,6 @@ TEST(Run_Wasm_Infinite_Loop_not_taken2_brif) {
CHECK_EQ(45, r.Call(1));
}
-
static void TestBuildGraphForSimpleExpression(WasmOpcode opcode) {
Isolate* isolate = CcTest::InitIsolateOnce();
Zone zone(isolate->allocator());
@@ -1777,7 +1693,6 @@ static void TestBuildGraphForSimpleExpression(WasmOpcode opcode) {
}
}
-
TEST(Build_Wasm_SimpleExprs) {
// Test that the decoder can build a graph for all supported simple expressions.
#define GRAPH_BUILD_TEST(name, opcode, sig) \
@@ -1788,7 +1703,6 @@ TEST(Build_Wasm_SimpleExprs) {
#undef GRAPH_BUILD_TEST
}
-
TEST(Run_Wasm_Int32LoadInt8_signext) {
TestingModule module;
const int kNumElems = 16;
@@ -1803,7 +1717,6 @@ TEST(Run_Wasm_Int32LoadInt8_signext) {
}
}
-
TEST(Run_Wasm_Int32LoadInt8_zeroext) {
TestingModule module;
const int kNumElems = 16;
@@ -1818,7 +1731,6 @@ TEST(Run_Wasm_Int32LoadInt8_zeroext) {
}
}
-
TEST(Run_Wasm_Int32LoadInt16_signext) {
TestingModule module;
const int kNumBytes = 16;
@@ -1834,7 +1746,6 @@ TEST(Run_Wasm_Int32LoadInt16_signext) {
}
}
-
TEST(Run_Wasm_Int32LoadInt16_zeroext) {
TestingModule module;
const int kNumBytes = 16;
@@ -1850,7 +1761,6 @@ TEST(Run_Wasm_Int32LoadInt16_zeroext) {
}
}
-
TEST(Run_WasmInt32Global) {
TestingModule module;
int32_t* global = module.AddGlobal<int32_t>(MachineType::Int32());
@@ -1867,7 +1777,6 @@ TEST(Run_WasmInt32Global) {
}
}
-
TEST(Run_WasmInt32Globals_DontAlias) {
const int kNumGlobals = 3;
TestingModule module;
@@ -1896,7 +1805,6 @@ TEST(Run_WasmInt32Globals_DontAlias) {
}
}
-
TEST(Run_WasmFloat32Global) {
TestingModule module;
float* global = module.AddGlobal<float>(MachineType::Float32());
@@ -1915,7 +1823,6 @@ TEST(Run_WasmFloat32Global) {
}
}
-
TEST(Run_WasmFloat64Global) {
TestingModule module;
double* global = module.AddGlobal<double>(MachineType::Float64());
@@ -1934,7 +1841,6 @@ TEST(Run_WasmFloat64Global) {
}
}
-
TEST(Run_WasmMixedGlobals) {
TestingModule module;
int32_t* unused = module.AddGlobal<int32_t>(MachineType::Int32());
@@ -1989,7 +1895,6 @@ TEST(Run_WasmMixedGlobals) {
USE(unused);
}
-
TEST(Run_WasmCallEmpty) {
const int32_t kExpected = -414444;
// Build the target function.
@@ -2007,7 +1912,6 @@ TEST(Run_WasmCallEmpty) {
CHECK_EQ(kExpected, result);
}
-
TEST(Run_WasmCallF32StackParameter) {
// Build the target function.
LocalType param_types[20];
@@ -2032,7 +1936,6 @@ TEST(Run_WasmCallF32StackParameter) {
CHECK_EQ(256.5f, result);
}
-
TEST(Run_WasmCallF64StackParameter) {
// Build the target function.
LocalType param_types[20];
@@ -2081,7 +1984,6 @@ TEST(Run_WasmCallVoid) {
CHECK_EQ(kExpected, module.raw_mem_start<int32_t>()[kElemNum]);
}
-
TEST(Run_WasmCall_Int32Add) {
// Build the target function.
TestSignatures sigs;
@@ -2121,7 +2023,6 @@ TEST(Run_WasmCall_Float32Sub) {
}
}
-
TEST(Run_WasmCall_Float64Sub) {
TestingModule module;
double* memory = module.AddMemoryElems<double>(16);
@@ -2156,7 +2057,6 @@ TEST(Run_WasmCall_Float64Sub) {
for (size_t i = 0; i < sizeof(__buf); i++) vec.push_back(__buf[i]); \
} while (false)
-
static void Run_WasmMixedCall_N(int start) {
const int kExpected = 6333;
const int kElemSize = 8;
@@ -2244,7 +2144,6 @@ static void Run_WasmMixedCall_N(int start) {
}
}
-
TEST(Run_WasmMixedCall_0) { Run_WasmMixedCall_N(0); }
TEST(Run_WasmMixedCall_1) { Run_WasmMixedCall_N(1); }
TEST(Run_WasmMixedCall_2) { Run_WasmMixedCall_N(2); }
@@ -2283,7 +2182,6 @@ TEST(Run_Wasm_CountDown_expr) {
CHECK_EQ(0, r.Call(100));
}
-
TEST(Run_Wasm_ExprBlock2a) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r, B2(WASM_IF(WASM_GET_LOCAL(0), WASM_BRV(1, WASM_I8(1))), WASM_I8(1)));
@@ -2291,7 +2189,6 @@ TEST(Run_Wasm_ExprBlock2a) {
CHECK_EQ(1, r.Call(1));
}
-
TEST(Run_Wasm_ExprBlock2b) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r, B2(WASM_IF(WASM_GET_LOCAL(0), WASM_BRV(1, WASM_I8(1))), WASM_I8(2)));
@@ -2299,7 +2196,6 @@ TEST(Run_Wasm_ExprBlock2b) {
CHECK_EQ(1, r.Call(1));
}
-
TEST(Run_Wasm_ExprBlock2c) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r, B2(WASM_BRV_IF(0, WASM_I8(1), WASM_GET_LOCAL(0)), WASM_I8(1)));
@@ -2307,7 +2203,6 @@ TEST(Run_Wasm_ExprBlock2c) {
CHECK_EQ(1, r.Call(1));
}
-
TEST(Run_Wasm_ExprBlock2d) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r, B2(WASM_BRV_IF(0, WASM_I8(1), WASM_GET_LOCAL(0)), WASM_I8(2)));
@@ -2315,7 +2210,6 @@ TEST(Run_Wasm_ExprBlock2d) {
CHECK_EQ(1, r.Call(1));
}
-
TEST(Run_Wasm_ExprBlock_ManualSwitch) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r, WASM_BLOCK(6, WASM_IF(WASM_I32_EQ(WASM_GET_LOCAL(0), WASM_I8(1)),
@@ -2338,7 +2232,6 @@ TEST(Run_Wasm_ExprBlock_ManualSwitch) {
CHECK_EQ(99, r.Call(6));
}
-
TEST(Run_Wasm_ExprBlock_ManualSwitch_brif) {
WasmRunner<int32_t> r(MachineType::Int32());
BUILD(r,
@@ -2362,7 +2255,6 @@ TEST(Run_Wasm_ExprBlock_ManualSwitch_brif) {
CHECK_EQ(99, r.Call(6));
}
-
TEST(Run_Wasm_nested_ifs) {
WasmRunner<int32_t> r(MachineType::Int32(), MachineType::Int32());
@@ -2371,14 +2263,12 @@ TEST(Run_Wasm_nested_ifs) {
WASM_IF_ELSE(WASM_GET_LOCAL(1), WASM_I8(11), WASM_I8(12)),
WASM_IF_ELSE(WASM_GET_LOCAL(1), WASM_I8(13), WASM_I8(14))));
-
CHECK_EQ(11, r.Call(1, 1));
CHECK_EQ(12, r.Call(1, 0));
CHECK_EQ(13, r.Call(0, 1));
CHECK_EQ(14, r.Call(0, 0));
}
-
TEST(Run_Wasm_ExprBlock_if) {
WasmRunner<int32_t> r(MachineType::Int32());
@@ -2389,7 +2279,6 @@ TEST(Run_Wasm_ExprBlock_if) {
CHECK_EQ(14, r.Call(0));
}
-
TEST(Run_Wasm_ExprBlock_nested_ifs) {
WasmRunner<int32_t> r(MachineType::Int32(), MachineType::Int32());
@@ -2407,7 +2296,6 @@ TEST(Run_Wasm_ExprBlock_nested_ifs) {
CHECK_EQ(14, r.Call(0, 0));
}
-
TEST(Run_Wasm_ExprLoop_nested_ifs) {
WasmRunner<int32_t> r(MachineType::Int32(), MachineType::Int32());
@@ -2456,7 +2344,6 @@ TEST(Run_Wasm_SimpleCallIndirect) {
CHECK_TRAP(r.Call(2));
}
-
TEST(Run_Wasm_MultipleCallIndirect) {
TestSignatures sigs;
TestingModule module;
@@ -2600,7 +2487,6 @@ TEST(Run_Wasm_F32Min) {
}
}
-
TEST(Run_Wasm_F64Min) {
WasmRunner<double> r(MachineType::Float64(), MachineType::Float64());
BUILD(r, WASM_F64_MIN(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
@@ -2624,7 +2510,6 @@ TEST(Run_Wasm_F64Min) {
}
}
-
TEST(Run_Wasm_F32Max) {
WasmRunner<float> r(MachineType::Float32(), MachineType::Float32());
BUILD(r, WASM_F32_MAX(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
@@ -2648,7 +2533,6 @@ TEST(Run_Wasm_F32Max) {
}
}
-
TEST(Run_Wasm_F64Max) {
WasmRunner<double> r(MachineType::Float64(), MachineType::Float64());
BUILD(r, WASM_F64_MAX(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
@@ -2755,7 +2639,6 @@ TEST(Run_Wasm_I32SConvertF32) {
}
}
-
TEST(Run_Wasm_I32SConvertF64) {
WasmRunner<int32_t> r(MachineType::Float64());
BUILD(r, WASM_I32_SCONVERT_F64(WASM_GET_LOCAL(0)));
@@ -2770,7 +2653,6 @@ TEST(Run_Wasm_I32SConvertF64) {
}
}
-
TEST(Run_Wasm_I32UConvertF32) {
WasmRunner<uint32_t> r(MachineType::Float32());
BUILD(r, WASM_I32_UCONVERT_F32(WASM_GET_LOCAL(0)));
@@ -2784,7 +2666,6 @@ TEST(Run_Wasm_I32UConvertF32) {
}
}
-
TEST(Run_Wasm_I32UConvertF64) {
WasmRunner<uint32_t> r(MachineType::Float64());
BUILD(r, WASM_I32_UCONVERT_F64(WASM_GET_LOCAL(0)));
@@ -2807,7 +2688,6 @@ TEST(Run_Wasm_F64CopySign) {
}
}
-
TEST(Run_Wasm_F32CopySign) {
WasmRunner<float> r(MachineType::Float32(), MachineType::Float32());
BUILD(r, WASM_F32_COPYSIGN(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
@@ -2846,18 +2726,14 @@ void CompileCallIndirectMany(LocalType param) {
}
}
-
TEST(Compile_Wasm_CallIndirect_Many_i32) { CompileCallIndirectMany(kAstI32); }
-
#if WASM_64
TEST(Compile_Wasm_CallIndirect_Many_i64) { CompileCallIndirectMany(kAstI64); }
#endif
-
TEST(Compile_Wasm_CallIndirect_Many_f32) { CompileCallIndirectMany(kAstF32); }
-
TEST(Compile_Wasm_CallIndirect_Many_f64) { CompileCallIndirectMany(kAstF64); }
TEST(Run_WASM_Int32RemS_dead) {
« no previous file with comments | « src/wasm/wasm-result.cc ('k') | test/cctest/wasm/test-run-wasm-js.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698