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 3dbf3f6d43d645ed06f216d6a888a693bb82243b..b7348e44e55199d0cec8f5300e4ae409abcbac75 100644 |
--- a/runtime/vm/dart_api_impl_test.cc |
+++ b/runtime/vm/dart_api_impl_test.cc |
@@ -3618,6 +3618,19 @@ UNIT_TEST_CASE(SetMessageCallbacks) { |
} |
+TEST_CASE(SetStickyError) { |
+ const char* kScriptChars = |
+ "main() => throw 'HI';"; |
+ Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, NULL); |
+ Dart_Handle retobj = Dart_Invoke(lib, NewString("main"), 0, NULL); |
+ EXPECT(Dart_IsError(retobj)); |
+ EXPECT(Dart_IsUnhandledExceptionError(retobj)); |
+ EXPECT(!Dart_HasStickyError()); |
+ Dart_SetStickyError(retobj); |
+ EXPECT(Dart_HasStickyError()); |
+} |
+ |
+ |
TEST_CASE(TypeGetNonParamtericTypes) { |
const char* kScriptChars = |
"class MyClass0 {\n" |