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

Unified Diff: vm/dart_api_impl_test.cc

Issue 10832146: Improve method names in the ThrowException test to make it less misleading. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/dart_api_impl_test.cc
===================================================================
--- vm/dart_api_impl_test.cc (revision 10252)
+++ vm/dart_api_impl_test.cc (working copy)
@@ -3963,9 +3963,9 @@
const char* kScriptChars =
"class ThrowException {\n"
" ThrowException(int i) : fld1 = i {}\n"
- " int method1(int i) native \"ThrowException_native\";"
- " int method2() {\n"
- " try { method1(10); } catch(var a) { return 5; } return 10;\n"
+ " int thrower(int i) native \"ThrowException_native\";"
+ " int test() {\n"
+ " try { thrower(10); } catch(var a) { return 5; } return 10;\n"
" }\n"
" int fld1;\n"
"}\n"
@@ -3994,10 +3994,10 @@
result = Dart_ThrowException(retobj);
EXPECT(Dart_IsError(result));
- // Now invoke method2 which invokes a natve method where it is
- // ok to throw an exception, check the result which would indicate
- // if an exception was thrown or not.
- result = Dart_Invoke(retobj, Dart_NewString("method2"), 0, NULL);
+ // Now invoke 'test' which indirectly invokes a natve method where
Bill Hesse 2012/08/06 08:02:50 native is misspelled natve. Sentence is confusing
+ // it is ok to throw an exception, check the result which would
+ // indicate if an exception was thrown or not.
+ result = Dart_Invoke(retobj, Dart_NewString("test"), 0, NULL);
EXPECT_VALID(result);
EXPECT(Dart_IsInteger(result));
int64_t value = 0;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698