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

Unified Diff: runtime/vm/dart_api_impl_test.cc

Issue 2350633003: Add Dart_GetStickyError (Closed)
Patch Set: turnidge review Created 4 years, 3 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
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 04fd8eec7e4f18cac09a0b19ab18722abffee857..d2016a43da886b9ff11d318c6d86c0e25abccf17 100644
--- a/runtime/vm/dart_api_impl_test.cc
+++ b/runtime/vm/dart_api_impl_test.cc
@@ -3637,8 +3637,13 @@ TEST_CASE(SetStickyError) {
EXPECT(Dart_IsError(retobj));
EXPECT(Dart_IsUnhandledExceptionError(retobj));
EXPECT(!Dart_HasStickyError());
+ EXPECT(Dart_GetStickyError() == Dart_Null());
Dart_SetStickyError(retobj);
EXPECT(Dart_HasStickyError());
+ EXPECT(Dart_GetStickyError() != Dart_Null());
+ Dart_SetStickyError(Dart_Null());
+ EXPECT(!Dart_HasStickyError());
+ EXPECT(Dart_GetStickyError() == Dart_Null());
}

Powered by Google App Engine
This is Rietveld 408576698