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

Unified Diff: test/cctest/test-asm-validator.cc

Issue 2106683003: [wasm] Making compare and conditionals more correct. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix Created 4 years, 6 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/typing-asm.cc ('k') | test/mjsunit/regress/regress-wasm-crbug-599413.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-asm-validator.cc
diff --git a/test/cctest/test-asm-validator.cc b/test/cctest/test-asm-validator.cc
index acbe9dac6f06eb83ff27d057bb8e35717b63a180..d08ca6a2edfec11311ff40dc547cf7cfaed81b66 100644
--- a/test/cctest/test-asm-validator.cc
+++ b/test/cctest/test-asm-validator.cc
@@ -1138,7 +1138,8 @@ TEST(TernaryMismatchInt32Float64) {
CHECK_FUNC_ERROR(
"function bar() { var x = 1; var y = 0.0; return (1 ? x : y)|0; }\n"
"function foo() { bar(); }",
- "asm: line 1: then and else expressions in ? must have the same type\n");
+ "asm: line 1: then and else expressions in ? must have the same type "
+ "and be int, float, or double\n");
}
@@ -1146,7 +1147,8 @@ TEST(TernaryMismatchIntish) {
CHECK_FUNC_ERROR(
"function bar() { var x = 1; var y = 0; return (1 ? x + x : y)|0; }\n"
"function foo() { bar(); }",
- "asm: line 1: invalid type in ? then expression\n");
+ "asm: line 1: then and else expressions in ? must have the same type "
+ "and be int, float, or double\n");
}
@@ -1154,7 +1156,8 @@ TEST(TernaryMismatchInt32Float32) {
CHECK_FUNC_ERROR(
"function bar() { var x = 1; var y = 2.0; return (x?fround(y):x)|0; }\n"
"function foo() { bar(); }",
- "asm: line 1: then and else expressions in ? must have the same type\n");
+ "asm: line 1: then and else expressions in ? must have the same type "
+ "and be int, float, or double\n");
}
@@ -1359,7 +1362,8 @@ TEST(CompareToStringLeft) {
CHECK_FUNC_ERROR(
"function bar() { var x = 1; return ('hi' > x)|0; }\n"
"function foo() { bar(); }",
- "asm: line 1: bad type on left side of comparison\n");
+ "asm: line 1: left and right side of comparison must match type "
+ "and be signed, unsigned, float, or double\n");
}
@@ -1367,7 +1371,8 @@ TEST(CompareToStringRight) {
CHECK_FUNC_ERROR(
"function bar() { var x = 1; return (x < 'hi')|0; }\n"
"function foo() { bar(); }",
- "asm: line 1: bad type on right side of comparison\n");
+ "asm: line 1: left and right side of comparison must match type "
+ "and be signed, unsigned, float, or double\n");
}
@@ -1375,7 +1380,8 @@ TEST(CompareMismatchInt32Float64) {
CHECK_FUNC_ERROR(
"function bar() { var x = 1; var y = 2.0; return (x < y)|0; }\n"
"function foo() { bar(); }",
- "asm: line 1: left and right side of comparison must match\n");
+ "asm: line 1: left and right side of comparison must match type "
+ "and be signed, unsigned, float, or double\n");
}
@@ -1383,7 +1389,8 @@ TEST(CompareMismatchInt32Uint32) {
CHECK_FUNC_ERROR(
"function bar() { var x = 1; var y = 2; return ((x|0) < (y>>>0))|0; }\n"
"function foo() { bar(); }",
- "asm: line 1: left and right side of comparison must match\n");
+ "asm: line 1: left and right side of comparison must match type "
+ "and be signed, unsigned, float, or double\n");
}
@@ -1391,7 +1398,8 @@ TEST(CompareMismatchInt32Float32) {
CHECK_FUNC_ERROR(
"function bar() { var x = 1; var y = 2.0; return (x < fround(y))|0; }\n"
"function foo() { bar(); }",
- "asm: line 1: left and right side of comparison must match\n");
+ "asm: line 1: left and right side of comparison must match type "
+ "and be signed, unsigned, float, or double\n");
}
TEST(FunctionRepeated) {
« no previous file with comments | « src/typing-asm.cc ('k') | test/mjsunit/regress/regress-wasm-crbug-599413.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698