| OLD | NEW |
| 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 "platform/assert.h" | 5 #include "platform/assert.h" |
| 6 #include "vm/assembler.h" | 6 #include "vm/assembler.h" |
| 7 #include "vm/bigint_operations.h" | 7 #include "vm/bigint_operations.h" |
| 8 #include "vm/isolate.h" | 8 #include "vm/isolate.h" |
| 9 #include "vm/object.h" | 9 #include "vm/object.h" |
| 10 #include "vm/object_store.h" | 10 #include "vm/object_store.h" |
| (...skipping 2336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2347 const Context& closure_context = Context::Handle(closure.context()); | 2347 const Context& closure_context = Context::Handle(closure.context()); |
| 2348 EXPECT_EQ(closure_context.raw(), closure_context.raw()); | 2348 EXPECT_EQ(closure_context.raw(), closure_context.raw()); |
| 2349 } | 2349 } |
| 2350 | 2350 |
| 2351 | 2351 |
| 2352 TEST_CASE(ObjectPrinting) { | 2352 TEST_CASE(ObjectPrinting) { |
| 2353 // Simple Smis. | 2353 // Simple Smis. |
| 2354 EXPECT_STREQ("2", Smi::Handle(Smi::New(2)).ToCString()); | 2354 EXPECT_STREQ("2", Smi::Handle(Smi::New(2)).ToCString()); |
| 2355 EXPECT_STREQ("-15", Smi::Handle(Smi::New(-15)).ToCString()); | 2355 EXPECT_STREQ("-15", Smi::Handle(Smi::New(-15)).ToCString()); |
| 2356 | 2356 |
| 2357 // Bool class and true/false values. | 2357 // bool class and true/false values. |
| 2358 ObjectStore* object_store = Isolate::Current()->object_store(); | 2358 ObjectStore* object_store = Isolate::Current()->object_store(); |
| 2359 const Class& bool_class = Class::Handle(object_store->bool_class()); | 2359 const Class& bool_class = Class::Handle(object_store->bool_class()); |
| 2360 EXPECT_STREQ("Library:'dart:coreimpl' Class: Bool", | 2360 EXPECT_STREQ("Library:'dart:core' Class: bool", |
| 2361 bool_class.ToCString()); | 2361 bool_class.ToCString()); |
| 2362 EXPECT_STREQ("true", Bool::Handle(Bool::True()).ToCString()); | 2362 EXPECT_STREQ("true", Bool::Handle(Bool::True()).ToCString()); |
| 2363 EXPECT_STREQ("false", Bool::Handle(Bool::False()).ToCString()); | 2363 EXPECT_STREQ("false", Bool::Handle(Bool::False()).ToCString()); |
| 2364 | 2364 |
| 2365 // Strings. | 2365 // Strings. |
| 2366 EXPECT_STREQ("Sugarbowl", | 2366 EXPECT_STREQ("Sugarbowl", |
| 2367 String::Handle(String::New("Sugarbowl")).ToCString()); | 2367 String::Handle(String::New("Sugarbowl")).ToCString()); |
| 2368 } | 2368 } |
| 2369 | 2369 |
| 2370 | 2370 |
| (...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3104 isolate->heap()->CollectAllGarbage(); | 3104 isolate->heap()->CollectAllGarbage(); |
| 3105 EXPECT(weak1.key() == Object::null()); | 3105 EXPECT(weak1.key() == Object::null()); |
| 3106 EXPECT(weak1.value() == Object::null()); | 3106 EXPECT(weak1.value() == Object::null()); |
| 3107 EXPECT(weak2.key() == Object::null()); | 3107 EXPECT(weak2.key() == Object::null()); |
| 3108 EXPECT(weak2.value() == Object::null()); | 3108 EXPECT(weak2.value() == Object::null()); |
| 3109 } | 3109 } |
| 3110 | 3110 |
| 3111 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). | 3111 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). |
| 3112 | 3112 |
| 3113 } // namespace dart | 3113 } // namespace dart |
| OLD | NEW |