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

Side by Side Diff: vm/dart_api_impl_test.cc

Issue 10572029: - Fix the type test failure for implicit native closures. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « vm/code_generator_ia32.cc ('k') | vm/flow_graph_compiler_ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "include/dart_api.h" 5 #include "include/dart_api.h"
6 #include "platform/assert.h" 6 #include "platform/assert.h"
7 #include "platform/utils.h" 7 #include "platform/utils.h"
8 #include "vm/class_finalizer.h" 8 #include "vm/class_finalizer.h"
9 #include "vm/dart_api_impl.h" 9 #include "vm/dart_api_impl.h"
10 #include "vm/dart_api_state.h" 10 #include "vm/dart_api_state.h"
(...skipping 5293 matching lines...) Expand 10 before | Expand all | Expand 10 after
5304 Dart_Handle url = Dart_NewString(TestCase::url()); 5304 Dart_Handle url = Dart_NewString(TestCase::url());
5305 Dart_Handle source = Dart_NewString(kScriptChars); 5305 Dart_Handle source = Dart_NewString(kScriptChars);
5306 result = Dart_SetLibraryTagHandler(library_handler); 5306 result = Dart_SetLibraryTagHandler(library_handler);
5307 EXPECT_VALID(result); 5307 EXPECT_VALID(result);
5308 Dart_Handle lib = Dart_LoadScript(url, source); 5308 Dart_Handle lib = Dart_LoadScript(url, source);
5309 EXPECT_VALID(lib); 5309 EXPECT_VALID(lib);
5310 EXPECT(Dart_IsLibrary(lib)); 5310 EXPECT(Dart_IsLibrary(lib));
5311 result = Dart_SetNativeResolver(lib, &MyNativeClosureResolver); 5311 result = Dart_SetNativeResolver(lib, &MyNativeClosureResolver);
5312 EXPECT_VALID(result); 5312 EXPECT_VALID(result);
5313 5313
5314 #if 0
5315 result = Dart_Invoke(lib, Dart_NewString("testMain"), 0, NULL); 5314 result = Dart_Invoke(lib, Dart_NewString("testMain"), 0, NULL);
5316 EXPECT_VALID(result); 5315 EXPECT_VALID(result);
5317 EXPECT(Dart_IsInteger(result)); 5316 EXPECT(Dart_IsInteger(result));
5318 int64_t value = 0; 5317 int64_t value = 0;
5319 EXPECT_VALID(Dart_IntegerToInt64(result, &value)); 5318 EXPECT_VALID(Dart_IntegerToInt64(result, &value));
5320 EXPECT_EQ(0, value); 5319 EXPECT_EQ(0, value);
5321 #endif
5322 } 5320 }
5323 5321
5324 5322
5325 static void StaticNativeFoo1(Dart_NativeArguments args) { 5323 static void StaticNativeFoo1(Dart_NativeArguments args) {
5326 Dart_EnterScope(); 5324 Dart_EnterScope();
5327 intptr_t i = Dart_GetNativeArgumentCount(args); 5325 intptr_t i = Dart_GetNativeArgumentCount(args);
5328 EXPECT_EQ(0, i); 5326 EXPECT_EQ(0, i);
5329 Dart_SetReturnValue(args, Dart_NewInteger(0)); 5327 Dart_SetReturnValue(args, Dart_NewInteger(0));
5330 Dart_ExitScope(); 5328 Dart_ExitScope();
5331 } 5329 }
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
5455 EXPECT_VALID(result); 5453 EXPECT_VALID(result);
5456 EXPECT(Dart_IsInteger(result)); 5454 EXPECT(Dart_IsInteger(result));
5457 int64_t value = 0; 5455 int64_t value = 0;
5458 EXPECT_VALID(Dart_IntegerToInt64(result, &value)); 5456 EXPECT_VALID(Dart_IntegerToInt64(result, &value));
5459 EXPECT_EQ(0, value); 5457 EXPECT_EQ(0, value);
5460 } 5458 }
5461 5459
5462 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). 5460 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64).
5463 5461
5464 } // namespace dart 5462 } // namespace dart
OLDNEW
« no previous file with comments | « vm/code_generator_ia32.cc ('k') | vm/flow_graph_compiler_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698