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

Unified Diff: runtime/vm/dart_api_impl_test.cc

Issue 23300004: Added Dart API methods: (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | « runtime/vm/dart_api_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_api_impl_test.cc
===================================================================
--- runtime/vm/dart_api_impl_test.cc (revision 26474)
+++ runtime/vm/dart_api_impl_test.cc (working copy)
@@ -6207,8 +6207,23 @@
Dart_EnterScope();
intptr_t i = Dart_GetNativeArgumentCount(args);
EXPECT_EQ(2, i);
- Dart_Handle arg = Dart_GetNativeArgument(args, 1);
- Dart_SetReturnValue(args, Dart_NewInteger(GetValue(arg)));
+ Dart_Handle arg1 = Dart_GetNativeArgument(args, 1);
+ EXPECT_VALID(arg1);
+ int64_t value = 0;
+ EXPECT_VALID(Dart_IntegerToInt64(arg1, &value));
+ int64_t integer_value = 0;
+ Dart_Handle result = Dart_GetNativeIntegerArgument(args,
+ 1,
+ &integer_value);
+ EXPECT_VALID(result);
+ EXPECT_EQ(value, integer_value);
+ double double_value;
+ result = Dart_GetNativeDoubleArgument(args, 1, &double_value);
+ EXPECT_VALID(result);
+ bool bool_value;
+ result = Dart_GetNativeBooleanArgument(args, 1, &bool_value);
+ EXPECT(Dart_IsError(result));
+ Dart_SetReturnValue(args, Dart_NewInteger(GetValue(arg1)));
Dart_ExitScope();
}
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698