| Index: vm/exceptions_test.cc
|
| ===================================================================
|
| --- vm/exceptions_test.cc (revision 6767)
|
| +++ vm/exceptions_test.cc (working copy)
|
| @@ -30,11 +30,11 @@
|
|
|
| void FUNCTION_NAME(Unhandled_invoke)(Dart_NativeArguments args) {
|
| // Invoke the specified entry point.
|
| - Dart_Handle result = Dart_InvokeStatic(TestCase::lib(),
|
| - Dart_NewString("Second"),
|
| - Dart_NewString("method2"),
|
| - 0,
|
| - NULL);
|
| + Dart_Handle cls = Dart_GetClass(TestCase::lib(), Dart_NewString("Second"));
|
| + Dart_Handle result = Dart_Invoke(cls,
|
| + Dart_NewString("method2"),
|
| + 0,
|
| + NULL);
|
| ASSERT(Dart_IsError(result));
|
| ASSERT(Dart_ErrorHasException(result));
|
| return;
|
| @@ -43,11 +43,11 @@
|
|
|
| void FUNCTION_NAME(Unhandled_invoke2)(Dart_NativeArguments args) {
|
| // Invoke the specified entry point.
|
| - Dart_Handle result = Dart_InvokeStatic(TestCase::lib(),
|
| - Dart_NewString("Second"),
|
| - Dart_NewString("method2"),
|
| - 0,
|
| - NULL);
|
| + Dart_Handle cls = Dart_GetClass(TestCase::lib(), Dart_NewString("Second"));
|
| + Dart_Handle result = Dart_Invoke(cls,
|
| + Dart_NewString("method2"),
|
| + 0,
|
| + NULL);
|
| ASSERT(Dart_IsError(result));
|
| ASSERT(Dart_ErrorHasException(result));
|
| Dart_Handle exception = Dart_ErrorGetException(result);
|
| @@ -119,20 +119,14 @@
|
| " return 2;\n"
|
| " }\n"
|
| "}\n"
|
| - "class UnhandledExceptionTest {\n"
|
| - " static testMain() {\n"
|
| - " UnhandledExceptions.equals(2, Second.method1(1));\n"
|
| - " UnhandledExceptions.equals(3, Second.method3(1));\n"
|
| - " }\n"
|
| + "testMain() {\n"
|
| + " UnhandledExceptions.equals(2, Second.method1(1));\n"
|
| + " UnhandledExceptions.equals(3, Second.method3(1));\n"
|
| "}";
|
| Dart_Handle lib = TestCase::LoadTestScript(
|
| kScriptChars,
|
| reinterpret_cast<Dart_NativeEntryResolver>(native_lookup));
|
| - Dart_InvokeStatic(lib,
|
| - Dart_NewString("UnhandledExceptionTest"),
|
| - Dart_NewString("testMain"),
|
| - 0,
|
| - NULL);
|
| + EXPECT_VALID(Dart_Invoke(lib, Dart_NewString("testMain"), 0, NULL));
|
| }
|
| #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64).
|
|
|
|
|