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

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

Issue 343503002: Missing file. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 | « no previous file | no next file » | 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 "bin/builtin.h" 5 #include "bin/builtin.h"
6 #include "include/dart_api.h" 6 #include "include/dart_api.h"
7 #include "include/dart_debugger_api.h" 7 #include "include/dart_debugger_api.h"
8 #include "include/dart_mirrors_api.h" 8 #include "include/dart_mirrors_api.h"
9 #include "include/dart_native_api.h" 9 #include "include/dart_native_api.h"
10 #include "platform/assert.h" 10 #include "platform/assert.h"
(...skipping 8218 matching lines...) Expand 10 before | Expand all | Expand 10 after
8229 EXPECT(Dart_IdentityEquals(str, utf16_str)); 8229 EXPECT(Dart_IdentityEquals(str, utf16_str));
8230 for (intptr_t i = 0; i < length; i++) { 8230 for (intptr_t i = 0; i < length; i++) {
8231 EXPECT_EQ(0x4e8c, ext_utf16_str[i]); 8231 EXPECT_EQ(0x4e8c, ext_utf16_str[i]);
8232 } 8232 }
8233 8233
8234 Dart_ExitScope(); 8234 Dart_ExitScope();
8235 } 8235 }
8236 EXPECT_EQ(40, peer8); 8236 EXPECT_EQ(40, peer8);
8237 EXPECT_EQ(41, peer16); 8237 EXPECT_EQ(41, peer16);
8238 EXPECT_EQ(42, canonical_str_peer); 8238 EXPECT_EQ(42, canonical_str_peer);
8239 Isolate::Current()->heap()->CollectGarbage(Heap::kNew); 8239 Isolate::Current()->heap()->CollectAllGarbage();
8240 EXPECT_EQ(80, peer8); 8240 EXPECT_EQ(80, peer8);
8241 EXPECT_EQ(82, peer16); 8241 EXPECT_EQ(82, peer16);
8242 EXPECT_EQ(42, canonical_str_peer); // "*" Symbol is not removed on GC. 8242 EXPECT_EQ(42, canonical_str_peer); // "*" Symbol is not removed on GC.
8243 } 8243 }
8244 8244
8245 8245
8246 TEST_CASE(ExternalizeConstantStrings) { 8246 TEST_CASE(ExternalizeConstantStrings) {
8247 const char* kScriptChars = 8247 const char* kScriptChars =
8248 "String testMain() {\n" 8248 "String testMain() {\n"
8249 " return 'constant string';\n" 8249 " return 'constant string';\n"
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
8507 NewString("main"), 8507 NewString("main"),
8508 1, 8508 1,
8509 dart_args); 8509 dart_args);
8510 int64_t value = 0; 8510 int64_t value = 0;
8511 result = Dart_IntegerToInt64(result, &value); 8511 result = Dart_IntegerToInt64(result, &value);
8512 EXPECT_VALID(result); 8512 EXPECT_VALID(result);
8513 EXPECT_EQ(6, value); 8513 EXPECT_EQ(6, value);
8514 } 8514 }
8515 8515
8516 } // namespace dart 8516 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698