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

Unified Diff: test/cctest/asmjs/test-typing-asm.cc

Issue 2071343003: V8. ASM-2-WASM. Validator V2. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: moves test-asm-validator to the asmjs cctest folder. Created 4 years, 5 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 | « test/cctest/asmjs/test-asm-typer.cc ('k') | test/cctest/cctest.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/asmjs/test-typing-asm.cc
diff --git a/test/cctest/test-asm-validator.cc b/test/cctest/asmjs/test-typing-asm.cc
similarity index 99%
rename from test/cctest/test-asm-validator.cc
rename to test/cctest/asmjs/test-typing-asm.cc
index cf9e6ef62df7ff8272a6037eb44f9a7f273d33a1..7ff268a12f1719b5e73a546503d4bffe8a0310ff 100644
--- a/test/cctest/test-asm-validator.cc
+++ b/test/cctest/asmjs/test-typing-asm.cc
@@ -81,7 +81,6 @@ std::string Validate(Zone* zone, const char* source,
} // namespace
-
TEST(ValidateMinimum) {
const char test_function[] =
"function GeometricMean(stdlib, foreign, buffer) {\n"
@@ -307,7 +306,6 @@ TEST(ValidateMinimum) {
CHECK_TYPES_END
}
-
TEST(MissingUseAsm) {
const char test_function[] =
"function foo() {\n"
@@ -322,7 +320,6 @@ TEST(MissingUseAsm) {
Validate(zone, test_function, &types));
}
-
TEST(WrongUseAsm) {
const char test_function[] =
"function foo() {\n"
@@ -338,7 +335,6 @@ TEST(WrongUseAsm) {
Validate(zone, test_function, &types));
}
-
TEST(MissingReturnExports) {
const char test_function[] =
"function foo() {\n"
@@ -414,7 +410,6 @@ TEST(MissingReturnExports) {
} \
}
-
#define CHECK_VAR_SHORTCUT(name, type) \
CHECK_EXPR(Assignment, type) { \
CHECK_VAR(name, type); \
@@ -424,7 +419,6 @@ TEST(MissingReturnExports) {
} \
}
-
#define CHECK_VAR_NEW_SHORTCUT(name, type) \
CHECK_EXPR(Assignment, type) { \
CHECK_VAR(name, type); \
@@ -437,7 +431,6 @@ TEST(MissingReturnExports) {
} \
}
-
namespace {
void CheckStdlibShortcuts1(Zone* zone, ZoneVector<ExpressionTypeEntry>& types,
@@ -470,7 +463,6 @@ void CheckStdlibShortcuts1(Zone* zone, ZoneVector<ExpressionTypeEntry>& types,
CHECK_VAR_MATH_SHORTCUT(fround, FUNC_N2F_TYPE);
}
-
void CheckStdlibShortcuts2(Zone* zone, ZoneVector<ExpressionTypeEntry>& types,
size_t& index, int& depth, TypeCache& cache) {
// var exp = stdlib.Math.*; (D * 12)
@@ -495,7 +487,6 @@ void CheckStdlibShortcuts2(Zone* zone, ZoneVector<ExpressionTypeEntry>& types,
} // namespace
-
#define CHECK_FUNC_TYPES_BEGIN(func) \
HARNESS_PREAMBLE() \
func "\n" HARNESS_POSTAMBLE(); \
@@ -526,12 +517,10 @@ void CheckStdlibShortcuts2(Zone* zone, ZoneVector<ExpressionTypeEntry>& types,
} \
CHECK_TYPES_END
-
#define CHECK_FUNC_TYPES_END \
CHECK_FUNC_TYPES_END_1(); \
CHECK_FUNC_TYPES_END_2();
-
#define CHECK_FUNC_ERROR(func, message) \
HARNESS_PREAMBLE() \
func "\n" HARNESS_POSTAMBLE(); \
@@ -542,7 +531,6 @@ void CheckStdlibShortcuts2(Zone* zone, ZoneVector<ExpressionTypeEntry>& types,
ZoneVector<ExpressionTypeEntry> types(zone); \
CHECK_EQ(message, Validate(zone, test_function, &types));
-
TEST(BareHarness) {
CHECK_FUNC_TYPES_BEGIN("function foo() {}") {
CHECK_EXPR(FunctionLiteral, FUNC_V_TYPE) {}
@@ -550,7 +538,6 @@ TEST(BareHarness) {
CHECK_FUNC_TYPES_END
}
-
TEST(ReturnVoid) {
CHECK_FUNC_TYPES_BEGIN(
"function bar() { return; }\n"
@@ -568,7 +555,6 @@ TEST(ReturnVoid) {
CHECK_FUNC_TYPES_END
}
-
TEST(EmptyBody) {
CHECK_FUNC_TYPES_BEGIN(
"function bar() { }\n"
@@ -583,7 +569,6 @@ TEST(EmptyBody) {
CHECK_FUNC_TYPES_END
}
-
TEST(DoesNothing) {
CHECK_FUNC_TYPES_BEGIN(
"function bar() { var x = 1.0; }\n"
@@ -603,7 +588,6 @@ TEST(DoesNothing) {
CHECK_FUNC_TYPES_END
}
-
TEST(ReturnInt32Literal) {
CHECK_FUNC_TYPES_BEGIN(
"function bar() { return 1; }\n"
@@ -621,7 +605,6 @@ TEST(ReturnInt32Literal) {
CHECK_FUNC_TYPES_END
}
-
TEST(ReturnFloat64Literal) {
CHECK_FUNC_TYPES_BEGIN(
"function bar() { return 1.0; }\n"
@@ -639,7 +622,6 @@ TEST(ReturnFloat64Literal) {
CHECK_FUNC_TYPES_END
}
-
TEST(ReturnFloat32Literal) {
CHECK_FUNC_TYPES_BEGIN(
"function bar() { return fround(1.0); }\n"
@@ -658,7 +640,6 @@ TEST(ReturnFloat32Literal) {
CHECK_FUNC_TYPES_END
}
-
TEST(ReturnFloat64Var) {
CHECK_FUNC_TYPES_BEGIN(
"function bar() { var x = 1.0; return +x; }\n"
@@ -684,7 +665,6 @@ TEST(ReturnFloat64Var) {
CHECK_FUNC_TYPES_END
}
-
TEST(Addition2) {
CHECK_FUNC_TYPES_BEGIN(
"function bar() { var x = 1; var y = 2; return (x+y)|0; }\n"
@@ -711,7 +691,6 @@ TEST(Addition2) {
CHECK_FUNC_TYPES_END
}
-
#define TEST_COMPARE_OP(name, op) \
TEST(name) { \
CHECK_FUNC_TYPES_BEGIN("function bar() { return (0 " op \
@@ -731,14 +710,12 @@ TEST(Addition2) {
CHECK_FUNC_TYPES_END \
}
-
TEST_COMPARE_OP(EqOperator, "==")
TEST_COMPARE_OP(LtOperator, "<")
TEST_COMPARE_OP(LteOperator, "<=")
TEST_COMPARE_OP(GtOperator, ">")
TEST_COMPARE_OP(GteOperator, ">=")
-
TEST(NeqOperator) {
CHECK_FUNC_TYPES_BEGIN(
"function bar() { return (0 != 0)|0; }\n"
@@ -759,7 +736,6 @@ TEST(NeqOperator) {
CHECK_FUNC_TYPES_END
}
-
TEST(NotOperator) {
CHECK_FUNC_TYPES_BEGIN(
"function bar() { var x = 0; return (!x)|0; }\n"
@@ -781,7 +757,6 @@ TEST(NotOperator) {
CHECK_FUNC_TYPES_END
}
-
TEST(InvertOperator) {
CHECK_FUNC_TYPES_BEGIN(
"function bar() { var x = 0; return (~x)|0; }\n"
@@ -804,7 +779,6 @@ TEST(InvertOperator) {
CHECK_FUNC_TYPES_END
}
-
TEST(InvertConversion) {
CHECK_FUNC_TYPES_BEGIN(
"function bar() { var x = 0.0; return (~~x)|0; }\n"
@@ -830,7 +804,6 @@ TEST(InvertConversion) {
CHECK_FUNC_TYPES_END
}
-
TEST(Ternary) {
CHECK_FUNC_TYPES_BEGIN(
"function bar() { var x = 1; var y = 1; return (x?y:5)|0; }\n"
@@ -858,7 +831,6 @@ TEST(Ternary) {
CHECK_FUNC_TYPES_END
}
-
#define TEST_INT_BIN_OP(name, op) \
TEST(name) { \
CHECK_FUNC_TYPES_BEGIN("function bar() { var x = 0; return (x " op \
@@ -882,12 +854,10 @@ TEST(Ternary) {
CHECK_FUNC_TYPES_END \
}
-
TEST_INT_BIN_OP(AndOperator, "&")
TEST_INT_BIN_OP(OrOperator, "|")
TEST_INT_BIN_OP(XorOperator, "^")
-
TEST(SignedCompare) {
CHECK_FUNC_TYPES_BEGIN(
"function bar() { var x = 1; var y = 1; return ((x|0) < (y|0))|0; }\n"
@@ -920,7 +890,6 @@ TEST(SignedCompare) {
CHECK_FUNC_TYPES_END
}
-
TEST(SignedCompareConst) {
CHECK_FUNC_TYPES_BEGIN(
"function bar() { var x = 1; var y = 1; return ((x|0) < (1<<31))|0; }\n"
@@ -950,7 +919,6 @@ TEST(SignedCompareConst) {
CHECK_FUNC_TYPES_END
}
-
TEST(UnsignedCompare) {
CHECK_FUNC_TYPES_BEGIN(
"function bar() { var x = 1; var y = 1; return ((x>>>0) < (y>>>0))|0; }\n"
@@ -983,7 +951,6 @@ TEST(UnsignedCompare) {
CHECK_FUNC_TYPES_END
}
-
TEST(UnsignedCompareConst0) {
CHECK_FUNC_TYPES_BEGIN(
"function bar() { var x = 1; var y = 1; return ((x>>>0) < (0>>>0))|0; }\n"
@@ -1013,7 +980,6 @@ TEST(UnsignedCompareConst0) {
CHECK_FUNC_TYPES_END
}
-
TEST(UnsignedCompareConst1) {
CHECK_FUNC_TYPES_BEGIN(
"function bar() { var x = 1; var y = 1; return ((x>>>0) < "
@@ -1044,7 +1010,6 @@ TEST(UnsignedCompareConst1) {
CHECK_FUNC_TYPES_END
}
-
TEST(UnsignedDivide) {
CHECK_FUNC_TYPES_BEGIN(
"function bar() { var x = 1; var y = 1; return ((x>>>0) / (y>>>0))|0; }\n"
@@ -1077,7 +1042,6 @@ TEST(UnsignedDivide) {
CHECK_FUNC_TYPES_END
}
-
TEST(UnsignedFromFloat64) {
CHECK_FUNC_ERROR(
"function bar() { var x = 1.0; return (x>>>0)|0; }\n"
@@ -1085,7 +1049,6 @@ TEST(UnsignedFromFloat64) {
"asm: line 1: left bitwise operand expected to be an integer\n");
}
-
TEST(AndFloat64) {
CHECK_FUNC_ERROR(
"function bar() { var x = 1.0; return (x&0)|0; }\n"
@@ -1093,7 +1056,6 @@ TEST(AndFloat64) {
"asm: line 1: left bitwise operand expected to be an integer\n");
}
-
TEST(TypeMismatchAddInt32Float64) {
CHECK_FUNC_ERROR(
"function bar() { var x = 1.0; var y = 0; return (x + y)|0; }\n"
@@ -1101,7 +1063,6 @@ TEST(TypeMismatchAddInt32Float64) {
"asm: line 1: ill-typed arithmetic operation\n");
}
-
TEST(TypeMismatchSubInt32Float64) {
CHECK_FUNC_ERROR(
"function bar() { var x = 1.0; var y = 0; return (x - y)|0; }\n"
@@ -1109,7 +1070,6 @@ TEST(TypeMismatchSubInt32Float64) {
"asm: line 1: ill-typed arithmetic operation\n");
}
-
TEST(TypeMismatchDivInt32Float64) {
CHECK_FUNC_ERROR(
"function bar() { var x = 1.0; var y = 0; return (x / y)|0; }\n"
@@ -1117,7 +1077,6 @@ TEST(TypeMismatchDivInt32Float64) {
"asm: line 1: ill-typed arithmetic operation\n");
}
-
TEST(TypeMismatchModInt32Float64) {
CHECK_FUNC_ERROR(
"function bar() { var x = 1.0; var y = 0; return (x % y)|0; }\n"
@@ -1125,7 +1084,6 @@ TEST(TypeMismatchModInt32Float64) {
"asm: line 1: ill-typed arithmetic operation\n");
}
-
TEST(ModFloat32) {
CHECK_FUNC_ERROR(
"function bar() { var x = fround(1.0); return (x % x)|0; }\n"
@@ -1133,7 +1091,6 @@ TEST(ModFloat32) {
"asm: line 1: ill-typed arithmetic operation\n");
}
-
TEST(TernaryMismatchInt32Float64) {
CHECK_FUNC_ERROR(
"function bar() { var x = 1; var y = 0.0; return (1 ? x : y)|0; }\n"
@@ -1142,7 +1099,6 @@ TEST(TernaryMismatchInt32Float64) {
"and be int, float, or double\n");
}
-
TEST(TernaryMismatchIntish) {
CHECK_FUNC_ERROR(
"function bar() { var x = 1; var y = 0; return (1 ? x + x : y)|0; }\n"
@@ -1151,7 +1107,6 @@ TEST(TernaryMismatchIntish) {
"and be int, float, or double\n");
}
-
TEST(TernaryMismatchInt32Float32) {
CHECK_FUNC_ERROR(
"function bar() { var x = 1; var y = 2.0; return (x?fround(y):x)|0; }\n"
@@ -1160,7 +1115,6 @@ TEST(TernaryMismatchInt32Float32) {
"and be int, float, or double\n");
}
-
TEST(TernaryBadCondition) {
CHECK_FUNC_ERROR(
"function bar() { var x = 1; var y = 2.0; return (y?x:1)|0; }\n"
@@ -1308,7 +1262,6 @@ TEST(Addition4) {
CHECK_FUNC_TYPES_END
}
-
TEST(Multiplication2) {
CHECK_FUNC_ERROR(
"function bar() { var x = 1; var y = 2; return (x*y)|0; }\n"
@@ -1316,7 +1269,6 @@ TEST(Multiplication2) {
"asm: line 1: multiply must be by an integer literal\n");
}
-
TEST(Division4) {
CHECK_FUNC_ERROR(
"function bar() { var x = 1; var y = 2; return (x/y/x/y)|0; }\n"
@@ -1357,7 +1309,6 @@ TEST(DivIntMismatch) {
"must match and be signed or unsigned\n");
}
-
TEST(CompareToStringLeft) {
CHECK_FUNC_ERROR(
"function bar() { var x = 1; return ('hi' > x)|0; }\n"
@@ -1366,7 +1317,6 @@ TEST(CompareToStringLeft) {
"and be signed, unsigned, float, or double\n");
}
-
TEST(CompareToStringRight) {
CHECK_FUNC_ERROR(
"function bar() { var x = 1; return (x < 'hi')|0; }\n"
@@ -1375,7 +1325,6 @@ TEST(CompareToStringRight) {
"and be signed, unsigned, float, or double\n");
}
-
TEST(CompareMismatchInt32Float64) {
CHECK_FUNC_ERROR(
"function bar() { var x = 1; var y = 2.0; return (x < y)|0; }\n"
@@ -1384,7 +1333,6 @@ TEST(CompareMismatchInt32Float64) {
"and be signed, unsigned, float, or double\n");
}
-
TEST(CompareMismatchInt32Uint32) {
CHECK_FUNC_ERROR(
"function bar() { var x = 1; var y = 2; return ((x|0) < (y>>>0))|0; }\n"
@@ -1393,7 +1341,6 @@ TEST(CompareMismatchInt32Uint32) {
"and be signed, unsigned, float, or double\n");
}
-
TEST(CompareMismatchInt32Float32) {
CHECK_FUNC_ERROR(
"function bar() { var x = 1; var y = 2.0; return (x < fround(y))|0; }\n"
@@ -1438,7 +1385,6 @@ TEST(Float64ToInt32) {
CHECK_FUNC_TYPES_END
}
-
TEST(Load1) {
CHECK_FUNC_TYPES_BEGIN(
"function bar() { var x = 1; var y = i8[x>>0]|0; }\n"
@@ -1467,7 +1413,6 @@ TEST(Load1) {
CHECK_FUNC_TYPES_END
}
-
TEST(LoadDouble) {
CHECK_FUNC_TYPES_BEGIN(
"function bar() { var x = 1; var y = 0.0; y = +f64[x>>3]; }\n"
@@ -1500,7 +1445,6 @@ TEST(LoadDouble) {
CHECK_FUNC_TYPES_END
}
-
TEST(Store1) {
CHECK_FUNC_TYPES_BEGIN(
"function bar() { var x = 1; i8[x>>0] = 0; }\n"
@@ -1526,7 +1470,6 @@ TEST(Store1) {
CHECK_FUNC_TYPES_END
}
-
TEST(StoreFloat) {
CHECK_FUNC_TYPES_BEGIN(
"function bar() { var x = fround(1.0); "
@@ -1653,7 +1596,6 @@ TEST(Load1Constant) {
CHECK_FUNC_TYPES_END
}
-
TEST(FunctionTables) {
CHECK_FUNC_TYPES_BEGIN(
"function func1(x) { x = x | 0; return (x * 5) | 0; }\n"
@@ -1738,7 +1680,6 @@ TEST(FunctionTables) {
CHECK_FUNC_TYPES_END_2();
}
-
TEST(BadFunctionTable) {
CHECK_FUNC_ERROR(
"function func1(x) { x = x | 0; return (x * 5) | 0; }\n"
@@ -1749,7 +1690,6 @@ TEST(BadFunctionTable) {
"asm: line 2: array component expected to be a function\n");
}
-
TEST(MissingParameterTypes) {
CHECK_FUNC_ERROR(
"function bar(x) { var y = 1; }\n"
@@ -1757,7 +1697,6 @@ TEST(MissingParameterTypes) {
"asm: line 1: missing parameter type annotations\n");
}
-
TEST(InvalidTypeAnnotationBinaryOpDiv) {
CHECK_FUNC_ERROR(
"function bar(x) { x = x / 4; }\n"
@@ -1765,7 +1704,6 @@ TEST(InvalidTypeAnnotationBinaryOpDiv) {
"asm: line 1: invalid type annotation on binary op\n");
}
-
TEST(InvalidTypeAnnotationBinaryOpMul) {
CHECK_FUNC_ERROR(
"function bar(x) { x = x * 4.0; }\n"
@@ -1773,7 +1711,6 @@ TEST(InvalidTypeAnnotationBinaryOpMul) {
"asm: line 1: invalid type annotation on binary op\n");
}
-
TEST(InvalidArgumentCount) {
CHECK_FUNC_ERROR(
"function bar(x) { return fround(4, 5); }\n"
@@ -1781,7 +1718,6 @@ TEST(InvalidArgumentCount) {
"asm: line 1: invalid argument count calling function\n");
}
-
TEST(InvalidTypeAnnotationArity) {
CHECK_FUNC_ERROR(
"function bar(x) { x = max(x); }\n"
@@ -1789,7 +1725,6 @@ TEST(InvalidTypeAnnotationArity) {
"asm: line 1: only fround allowed on expression annotations\n");
}
-
TEST(InvalidTypeAnnotationOnlyFround) {
CHECK_FUNC_ERROR(
"function bar(x) { x = sin(x); }\n"
@@ -1797,7 +1732,6 @@ TEST(InvalidTypeAnnotationOnlyFround) {
"asm: line 1: only fround allowed on expression annotations\n");
}
-
TEST(InvalidTypeAnnotation) {
CHECK_FUNC_ERROR(
"function bar(x) { x = (x+x)(x); }\n"
@@ -1805,7 +1739,6 @@ TEST(InvalidTypeAnnotation) {
"asm: line 1: invalid type annotation\n");
}
-
TEST(WithStatement) {
CHECK_FUNC_ERROR(
"function bar() { var x = 0; with (x) { x = x + 1; } }\n"
@@ -1813,7 +1746,6 @@ TEST(WithStatement) {
"asm: line 1: bad with statement\n");
}
-
TEST(NestedFunction) {
CHECK_FUNC_ERROR(
"function bar() { function x() { return 1; } }\n"
@@ -1821,7 +1753,6 @@ TEST(NestedFunction) {
"asm: line 1: function declared inside another\n");
}
-
TEST(UnboundVariable) {
CHECK_FUNC_ERROR(
"function bar() { var x = y; }\n"
@@ -1829,7 +1760,6 @@ TEST(UnboundVariable) {
"asm: line 1: unbound variable\n");
}
-
TEST(EqStrict) {
CHECK_FUNC_ERROR(
"function bar() { return (0 === 0)|0; }\n"
@@ -1837,7 +1767,6 @@ TEST(EqStrict) {
"asm: line 1: illegal comparison operator\n");
}
-
TEST(NeStrict) {
CHECK_FUNC_ERROR(
"function bar() { return (0 !== 0)|0; }\n"
@@ -1845,7 +1774,6 @@ TEST(NeStrict) {
"asm: line 1: illegal comparison operator\n");
}
-
TEST(InstanceOf) {
CHECK_FUNC_ERROR(
"function bar() { return (0 instanceof 0)|0; }\n"
@@ -1853,7 +1781,6 @@ TEST(InstanceOf) {
"asm: line 1: illegal comparison operator\n");
}
-
TEST(InOperator) {
CHECK_FUNC_ERROR(
"function bar() { return (0 in 0)|0; }\n"
@@ -1861,7 +1788,6 @@ TEST(InOperator) {
"asm: line 1: illegal comparison operator\n");
}
-
TEST(LogicalAndOperator) {
CHECK_FUNC_ERROR(
"function bar() { return (0 && 0)|0; }\n"
@@ -1869,7 +1795,6 @@ TEST(LogicalAndOperator) {
"asm: line 1: illegal logical operator\n");
}
-
TEST(LogicalOrOperator) {
CHECK_FUNC_ERROR(
"function bar() { return (0 || 0)|0; }\n"
@@ -1891,7 +1816,6 @@ TEST(BadLiteral) {
"asm: line 1: illegal literal\n");
}
-
TEST(MismatchedReturnTypeLiteral) {
CHECK_FUNC_ERROR(
"function bar() { if(1) { return 1; } return 1.0; }\n"
@@ -1899,7 +1823,6 @@ TEST(MismatchedReturnTypeLiteral) {
"asm: line 1: return type does not match function signature\n");
}
-
TEST(MismatchedReturnTypeExpression) {
CHECK_FUNC_ERROR(
"function bar() {\n"
@@ -1908,7 +1831,6 @@ TEST(MismatchedReturnTypeExpression) {
"asm: line 2: return type does not match function signature\n");
}
-
TEST(AssignToFloatishToF64) {
CHECK_FUNC_ERROR(
"function bar() { var v = fround(1.0); f64[0] = v + fround(1.0); }\n"
@@ -1916,7 +1838,6 @@ TEST(AssignToFloatishToF64) {
"asm: line 1: floatish assignment to double array\n");
}
-
TEST(ForeignFunction) {
CHECK_FUNC_TYPES_BEGIN(
"var baz = foreign.baz;\n"
@@ -1986,7 +1907,6 @@ TEST(BadExports) {
Validate(zone, test_function, &types));
}
-
TEST(NestedHeapAssignment) {
CHECK_FUNC_ERROR(
"function bar() { var x = 0; i16[x = 1] = 2; }\n"
@@ -2001,7 +1921,6 @@ TEST(BadOperatorHeapAssignment) {
"asm: line 1: expected >> in heap access\n");
}
-
TEST(BadArrayAssignment) {
CHECK_FUNC_ERROR(
"function bar() { i8[0] = 0.0; }\n"
@@ -2009,7 +1928,6 @@ TEST(BadArrayAssignment) {
"asm: line 1: illegal type in assignment\n");
}
-
TEST(BadStandardFunctionCallOutside) {
CHECK_FUNC_ERROR(
"var s0 = sin(0);\n"
@@ -2018,7 +1936,6 @@ TEST(BadStandardFunctionCallOutside) {
"asm: line 1: illegal variable reference in module body\n");
}
-
TEST(BadFunctionCallOutside) {
CHECK_FUNC_ERROR(
"function bar() { return 0.0; }\n"
@@ -2064,7 +1981,6 @@ TEST(NestedVariableAssignment) {
CHECK_FUNC_TYPES_END
}
-
TEST(NestedAssignmentInHeap) {
CHECK_FUNC_TYPES_BEGIN(
"function bar() { var x = 0; i8[(x = 1) >> 0] = 2; }\n"
@@ -2093,7 +2009,6 @@ TEST(NestedAssignmentInHeap) {
CHECK_FUNC_TYPES_END
}
-
TEST(NegativeDouble) {
CHECK_FUNC_TYPES_BEGIN(
"function bar() { var x = -123.2; }\n"
@@ -2109,7 +2024,6 @@ TEST(NegativeDouble) {
CHECK_FUNC_TYPES_END
}
-
TEST(NegativeInteger) {
CHECK_FUNC_TYPES_BEGIN(
"function bar() { var x = -123; }\n"
@@ -2125,7 +2039,6 @@ TEST(NegativeInteger) {
CHECK_FUNC_TYPES_END
}
-
TEST(AbsFunction) {
CHECK_FUNC_TYPES_BEGIN(
"function bar() { var x = -123.0; x = abs(x); }\n"
@@ -2148,7 +2061,6 @@ TEST(AbsFunction) {
CHECK_FUNC_TYPES_END
}
-
TEST(CeilFloat) {
CHECK_FUNC_TYPES_BEGIN(
"function bar() { var x = fround(3.1); x = ceil(x); }\n"
@@ -2246,7 +2158,6 @@ TEST(TypeConsistency) {
CHECK(!cache.kAsmDouble->Is(cache.kAsmFloat));
}
-
TEST(SwitchTest) {
CHECK_FUNC_TYPES_BEGIN(
"function switcher(x) {\n"
@@ -2292,7 +2203,6 @@ TEST(SwitchTest) {
CHECK_FUNC_TYPES_END
}
-
TEST(BadSwitchRange) {
CHECK_FUNC_ERROR(
"function bar() { switch (1) { case -1: case 0x7fffffff: } }\n"
@@ -2300,7 +2210,6 @@ TEST(BadSwitchRange) {
"asm: line 1: case range too large\n");
}
-
TEST(DuplicateSwitchCase) {
CHECK_FUNC_ERROR(
"function bar() { switch (1) { case 0: case 0: } }\n"
@@ -2308,7 +2217,6 @@ TEST(DuplicateSwitchCase) {
"asm: line 1: duplicate case value\n");
}
-
TEST(BadSwitchOrder) {
CHECK_FUNC_ERROR(
"function bar() { switch (1) { default: case 0: } }\n"
« no previous file with comments | « test/cctest/asmjs/test-asm-typer.cc ('k') | test/cctest/cctest.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698