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

Side by Side Diff: runtime/vm/dart_api_impl_test.cc

Issue 23480098: Setup the pool pointer when entering Dart from C++ so the intrinsic functions may rely on it being … (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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 | « no previous file | runtime/vm/intrinsifier_x64.cc » ('j') | runtime/vm/intrinsifier_x64.cc » ('J')
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 "bin/builtin.h" 5 #include "bin/builtin.h"
6 #include "include/dart_api.h" 6 #include "include/dart_api.h"
7 #include "include/dart_mirrors_api.h" 7 #include "include/dart_mirrors_api.h"
8 #include "include/dart_native_api.h" 8 #include "include/dart_native_api.h"
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "platform/json.h" 10 #include "platform/json.h"
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 EXPECT_VALID(Dart_ObjectEquals(five, five, &equal)); 223 EXPECT_VALID(Dart_ObjectEquals(five, five, &equal));
224 EXPECT(equal); 224 EXPECT(equal);
225 225
226 // Equal objects. 226 // Equal objects.
227 EXPECT_VALID(Dart_ObjectEquals(five, five_again, &equal)); 227 EXPECT_VALID(Dart_ObjectEquals(five, five_again, &equal));
228 EXPECT(equal); 228 EXPECT(equal);
229 229
230 // Different objects. 230 // Different objects.
231 EXPECT_VALID(Dart_ObjectEquals(five, seven, &equal)); 231 EXPECT_VALID(Dart_ObjectEquals(five, seven, &equal));
232 EXPECT(!equal); 232 EXPECT(!equal);
233
234 // Case where identity is not equality.
235 Dart_Handle nan = Dart_NewDouble(NAN);
236 EXPECT_VALID(Dart_ObjectEquals(nan, nan, &equal));
rmacnak 2013/09/18 21:04:24 This will hit CompareDoubles.
237 EXPECT(!equal);
233 } 238 }
234 239
235 240
236 TEST_CASE(InstanceValues) { 241 TEST_CASE(InstanceValues) {
237 EXPECT(Dart_IsInstance(NewString("test"))); 242 EXPECT(Dart_IsInstance(NewString("test")));
238 EXPECT(Dart_IsInstance(Dart_True())); 243 EXPECT(Dart_IsInstance(Dart_True()));
239 244
240 // By convention, our Is*() functions exclude null. 245 // By convention, our Is*() functions exclude null.
241 EXPECT(!Dart_IsInstance(Dart_Null())); 246 EXPECT(!Dart_IsInstance(Dart_Null()));
242 } 247 }
(...skipping 7080 matching lines...) Expand 10 before | Expand all | Expand 10 after
7323 NewString("main"), 7328 NewString("main"),
7324 0, 7329 0,
7325 NULL); 7330 NULL);
7326 int64_t value = 0; 7331 int64_t value = 0;
7327 result = Dart_IntegerToInt64(result, &value); 7332 result = Dart_IntegerToInt64(result, &value);
7328 EXPECT_VALID(result); 7333 EXPECT_VALID(result);
7329 EXPECT_EQ(8, value); 7334 EXPECT_EQ(8, value);
7330 } 7335 }
7331 7336
7332 } // namespace dart 7337 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/intrinsifier_x64.cc » ('j') | runtime/vm/intrinsifier_x64.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698