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

Unified Diff: runtime/vm/dart_api_impl_test.cc

Issue 2994883002: Fix couple of vm/cc/DartAPI_* tests for the dartk configuration. (Closed)
Patch Set: Rebase Created 3 years, 4 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 | « runtime/tests/vm/vm.status ('k') | runtime/vm/unit_test.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_api_impl_test.cc
diff --git a/runtime/vm/dart_api_impl_test.cc b/runtime/vm/dart_api_impl_test.cc
index 194ce0809717f791fac699bf9488e2689dceddaf..be2415b5f76d61f0e6ee6a21d51bbc486f8193a8 100644
--- a/runtime/vm/dart_api_impl_test.cc
+++ b/runtime/vm/dart_api_impl_test.cc
@@ -50,11 +50,11 @@ TEST_CASE(DartAPI_ErrorHandleBasics) {
EXPECT_STREQ("", Dart_GetError(instance));
EXPECT_STREQ("myerror", Dart_GetError(error));
- EXPECT_STREQ(
- "Unhandled exception:\n"
- "Exception: bad news\n"
- "#0 testMain (test-lib:2:3)",
- Dart_GetError(exception));
+ EXPECT_STREQ(ZONE_STR("Unhandled exception:\n"
+ "Exception: bad news\n"
+ "#0 testMain (%s:2:3)",
+ TestCase::url()),
+ Dart_GetError(exception));
EXPECT(Dart_IsError(Dart_ErrorGetException(instance)));
EXPECT(Dart_IsError(Dart_ErrorGetException(error)));
@@ -6082,9 +6082,7 @@ TEST_CASE(DartAPI_GetFunctionNames) {
"sort(list) => list.sort(_compare);\n";
// Get the functions from a library.
- Dart_Handle url = NewString("library_url");
- Dart_Handle source = NewString(kLibraryChars);
- Dart_Handle lib = Dart_LoadLibrary(url, Dart_Null(), source, 0, 0);
+ Dart_Handle lib = TestCase::LoadTestScript(kLibraryChars, NULL);
EXPECT_VALID(lib);
Dart_Handle result = Dart_FinalizeLoading(false);
EXPECT_VALID(result);
« no previous file with comments | « runtime/tests/vm/vm.status ('k') | runtime/vm/unit_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698