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

Unified Diff: vm/exceptions_test.cc

Issue 10021072: Remove the deprecated method invocation and field access apis from the (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 8 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 | « vm/debugger_api_impl_test.cc ('k') | vm/heap_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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).
« no previous file with comments | « vm/debugger_api_impl_test.cc ('k') | vm/heap_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698