Index: test/cctest/test-api.cc |
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc |
index e52dde37c994fea3d04b3444bb5cc8a6cf8d0836..ba03523c8f55cba7e6baca7298db0d86c0db389a 100644 |
--- a/test/cctest/test-api.cc |
+++ b/test/cctest/test-api.cc |
@@ -16017,8 +16017,13 @@ TEST(SourceURLInStackTrace) { |
"}\n" |
"foo();\n" |
"}\n" |
- "eval('(' + outer +')()//@ sourceURL=eval_url');"; |
- CHECK(CompileRun(source)->IsUndefined()); |
+ "eval('(' + outer +')()%s');"; |
+ |
+ i::ScopedVector<char> code(1024); |
+ i::OS::SNPrintF(code, source, "//# sourceURL=eval_url"); |
+ CHECK(CompileRun(code.start())->IsUndefined()); |
+ i::OS::SNPrintF(code, source, "//@ sourceURL=eval_url"); |
+ CHECK(CompileRun(code.start())->IsUndefined()); |
} |
@@ -16058,9 +16063,13 @@ TEST(InlineScriptWithSourceURLInStackTrace) { |
"}\n" |
"foo();\n" |
"}\n" |
- "outer()\n" |
- "//@ sourceURL=source_url"; |
- CHECK(CompileRunWithOrigin(source, "url", 0, 1)->IsUndefined()); |
+ "outer()\n%s"; |
+ |
+ i::ScopedVector<char> code(1024); |
+ i::OS::SNPrintF(code, source, "//# sourceURL=source_url"); |
+ CHECK(CompileRunWithOrigin(code.start(), "url", 0, 1)->IsUndefined()); |
+ i::OS::SNPrintF(code, source, "//@ sourceURL=source_url"); |
+ CHECK(CompileRunWithOrigin(code.start(), "url", 0, 1)->IsUndefined()); |
} |
@@ -16100,9 +16109,13 @@ TEST(DynamicWithSourceURLInStackTrace) { |
"}\n" |
"foo();\n" |
"}\n" |
- "outer()\n" |
- "//@ sourceURL=source_url"; |
- CHECK(CompileRunWithOrigin(source, "url", 0, 0)->IsUndefined()); |
+ "outer()\n%s"; |
+ |
+ i::ScopedVector<char> code(1024); |
+ i::OS::SNPrintF(code, source, "//# sourceURL=source_url"); |
+ CHECK(CompileRunWithOrigin(code.start(), "url", 0, 0)->IsUndefined()); |
+ i::OS::SNPrintF(code, source, "//@ sourceURL=source_url"); |
+ CHECK(CompileRunWithOrigin(code.start(), "url", 0, 0)->IsUndefined()); |
} |
static void CreateGarbageInOldSpace() { |