Chromium Code Reviews| 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 4b0b5d51fccaf47a031352c86564b57888497486..ab8d188203cd1e27d3e68250cee5d6e52f6d697d 100644 |
| --- a/runtime/vm/dart_api_impl_test.cc |
| +++ b/runtime/vm/dart_api_impl_test.cc |
| @@ -1384,6 +1384,24 @@ TEST_CASE(MapAccess) { |
| } |
| +TEST_CASE(IsFuture) { |
| + const char* kScriptChars = |
| + "import 'dart:async';" |
| + "Future testMain() {" |
| + " return new Completer().future;" |
| + "}"; |
| + Dart_Handle result; |
| + |
| + // Create a test library and Load up a test script in it. |
| + Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, NULL); |
| + |
| + // Invoke a function which returns an object of type Map. |
| + result = Dart_Invoke(lib, NewString("testMain"), 0, NULL); |
| + EXPECT_VALID(result); |
| + EXPECT(Dart_IsFuture(result)); |
|
siva
2014/09/19 17:38:36
You probably also want a negative test:
Dart_Hand
rmacnak
2014/09/19 21:32:03
Added
|
| +} |
| + |
| + |
| TEST_CASE(TypedDataViewListGetAsBytes) { |
| const int kSize = 1000; |