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

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

Issue 2040983002: [asmjs] Validator should reject modules with repeated functions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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-617525.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 a07eecf2760644d9309eaf7034583bb1c3d4b2ac..39d490e7a931761924ac310a62635d51145383b2 100644
--- a/test/cctest/test-asm-validator.cc
+++ b/test/cctest/test-asm-validator.cc
@@ -1361,6 +1361,12 @@ TEST(CompareMismatchInt32Float32) {
"asm: line 1: left and right side of comparison must match\n");
}
+TEST(FunctionRepeated) {
+ CHECK_FUNC_ERROR(
+ "function foo() { return 0; }\n"
+ "function foo() { return 0; }",
+ "asm: line 2: function repeated in module\n");
+}
TEST(Float64ToInt32) {
CHECK_FUNC_TYPES_BEGIN(
« no previous file with comments | « src/typing-asm.cc ('k') | test/mjsunit/regress/regress-617525.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698