mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 06:20:13 +00:00
Revert "[ VM / Dart 2 ] Fixed StackTraceFormat test to expect file URIs in stacks generated by the Dart frontend."
This reverts commit ae130bc187
.
Reason for revert: snprintf doesn't like positional format strings on Windows.
Original change's description:
> [ VM / Dart 2 ] Fixed StackTraceFormat test to expect file URIs in stacks generated by the Dart frontend.
>
> Change-Id: I26f09e094e934485575e55a6a60a8fccfbd94aa7
> Reviewed-on: https://dart-review.googlesource.com/47520
> Commit-Queue: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
TBR=bkonyi@google.com,rmacnak@google.com,zra@google.com,asiva@google.com
Change-Id: Idbc15d59bcc7ff3534010f6c93cebdcc89c935fc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/47640
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
This commit is contained in:
parent
ae130bc187
commit
a81f4babcc
2 changed files with 15 additions and 23 deletions
|
@ -223,6 +223,7 @@ cc/SourceReport_Coverage_UnusedClass_ForceCompileError: Crash
|
|||
cc/SourceReport_Coverage_UnusedClass_NoForceCompile: Fail
|
||||
cc/SourceReport_MultipleReports: Fail
|
||||
cc/SourceReport_PossibleBreakpoints_Simple: Fail
|
||||
cc/StackTraceFormat: Fail
|
||||
cc/UseDartApi: Fail
|
||||
dart/data_uri_import_test/utf16: MissingRuntimeError
|
||||
dart/spawn_shutdown_test: SkipSlow
|
||||
|
|
|
@ -3248,7 +3248,6 @@ ISOLATE_UNIT_TEST_CASE(ArrayNew_Overflow_Crash) {
|
|||
}
|
||||
|
||||
TEST_CASE(StackTraceFormat) {
|
||||
Isolate* isolate = Isolate::Current();
|
||||
const char* kScriptChars =
|
||||
"void baz() {\n"
|
||||
" throw 'MyException';\n"
|
||||
|
@ -3291,28 +3290,20 @@ TEST_CASE(StackTraceFormat) {
|
|||
Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, NULL);
|
||||
EXPECT_VALID(lib);
|
||||
Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
|
||||
|
||||
const char* lib_url =
|
||||
isolate->use_dart_frontend() ? "file:///test-lib" : "test-lib";
|
||||
const size_t kExpectedLen = 512;
|
||||
char expected[kExpectedLen];
|
||||
snprintf(expected, kExpectedLen,
|
||||
"Unhandled exception:\n"
|
||||
"MyException\n"
|
||||
"#0 baz (%1$s:2:3)\n"
|
||||
"#1 new _OtherClass._named (%1$s:7:5)\n"
|
||||
"#2 globalVar= (%1$s:12:7)\n"
|
||||
"#3 _bar (%1$s:16:3)\n"
|
||||
"#4 MyClass.field (%1$s:25:5)\n"
|
||||
"#5 MyClass.foo.fooHelper (%1$s:30:7)\n"
|
||||
"#6 MyClass.foo (%1$s:32:14)\n"
|
||||
"#7 new MyClass.<anonymous closure> (%1$s:21:12)\n"
|
||||
"#8 new MyClass (%1$s:21:18)\n"
|
||||
"#9 main.<anonymous closure> (%1$s:37:14)\n"
|
||||
"#10 main (%1$s:37:24)",
|
||||
lib_url);
|
||||
|
||||
EXPECT_ERROR(result, expected);
|
||||
EXPECT_ERROR(result,
|
||||
"Unhandled exception:\n"
|
||||
"MyException\n"
|
||||
"#0 baz (test-lib:2:3)\n"
|
||||
"#1 new _OtherClass._named (test-lib:7:5)\n"
|
||||
"#2 globalVar= (test-lib:12:7)\n"
|
||||
"#3 _bar (test-lib:16:3)\n"
|
||||
"#4 MyClass.field (test-lib:25:5)\n"
|
||||
"#5 MyClass.foo.fooHelper (test-lib:30:7)\n"
|
||||
"#6 MyClass.foo (test-lib:32:14)\n"
|
||||
"#7 new MyClass.<anonymous closure> (test-lib:21:12)\n"
|
||||
"#8 new MyClass (test-lib:21:18)\n"
|
||||
"#9 main.<anonymous closure> (test-lib:37:14)\n"
|
||||
"#10 main (test-lib:37:24)");
|
||||
}
|
||||
|
||||
ISOLATE_UNIT_TEST_CASE(WeakProperty_PreserveCrossGen) {
|
||||
|
|
Loading…
Reference in a new issue