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

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

Issue 10919267: Introduce a VM-only dart:scalarlist library for byte arrays. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Move init call for scalarlist lib Created 8 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 | « runtime/vm/object_store.cc ('k') | runtime/vm/vm.gypi » ('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_debugger_api.h" 5 #include "include/dart_debugger_api.h"
6 #include "platform/assert.h" 6 #include "platform/assert.h"
7 #include "vm/bigint_operations.h" 7 #include "vm/bigint_operations.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_message.h" 10 #include "vm/dart_api_message.h"
(...skipping 1412 matching lines...) Expand 10 before | Expand all | Expand 10 after
1423 } 1423 }
1424 } 1424 }
1425 Dart_ExitScope(); 1425 Dart_ExitScope();
1426 Dart_ShutdownIsolate(); 1426 Dart_ShutdownIsolate();
1427 } 1427 }
1428 1428
1429 1429
1430 UNIT_TEST_CASE(DartGeneratedListMessagesWithBackref) { 1430 UNIT_TEST_CASE(DartGeneratedListMessagesWithBackref) {
1431 const int kArrayLength = 10; 1431 const int kArrayLength = 10;
1432 static const char* kScriptChars = 1432 static const char* kScriptChars =
1433 "#import('dart:scalarlist');\n"
1433 "final int kArrayLength = 10;\n" 1434 "final int kArrayLength = 10;\n"
1434 "getStringList() {\n" 1435 "getStringList() {\n"
1435 " var s = 'Hello, world!';\n" 1436 " var s = 'Hello, world!';\n"
1436 " var list = new List<String>(kArrayLength);\n" 1437 " var list = new List<String>(kArrayLength);\n"
1437 " for (var i = 0; i < kArrayLength; i++) list[i] = s;\n" 1438 " for (var i = 0; i < kArrayLength; i++) list[i] = s;\n"
1438 " return list;\n" 1439 " return list;\n"
1439 "}\n" 1440 "}\n"
1440 "getMintList() {\n" 1441 "getMintList() {\n"
1441 " var mint = 0x7FFFFFFFFFFFFFFF;\n" 1442 " var mint = 0x7FFFFFFFFFFFFFFF;\n"
1442 " var list = new List(kArrayLength);\n" 1443 " var list = new List(kArrayLength);\n"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
1593 } 1594 }
1594 } 1595 }
1595 Dart_ExitScope(); 1596 Dart_ExitScope();
1596 Dart_ShutdownIsolate(); 1597 Dart_ShutdownIsolate();
1597 } 1598 }
1598 1599
1599 1600
1600 UNIT_TEST_CASE(DartGeneratedArrayLiteralMessagesWithBackref) { 1601 UNIT_TEST_CASE(DartGeneratedArrayLiteralMessagesWithBackref) {
1601 const int kArrayLength = 10; 1602 const int kArrayLength = 10;
1602 static const char* kScriptChars = 1603 static const char* kScriptChars =
1604 "#import('dart:scalarlist');\n"
1603 "final int kArrayLength = 10;\n" 1605 "final int kArrayLength = 10;\n"
1604 "getStringList() {\n" 1606 "getStringList() {\n"
1605 " var s = 'Hello, world!';\n" 1607 " var s = 'Hello, world!';\n"
1606 " var list = [s, s, s, s, s, s, s, s, s, s];\n" 1608 " var list = [s, s, s, s, s, s, s, s, s, s];\n"
1607 " return list;\n" 1609 " return list;\n"
1608 "}\n" 1610 "}\n"
1609 "getMintList() {\n" 1611 "getMintList() {\n"
1610 " var mint = 0x7FFFFFFFFFFFFFFF;\n" 1612 " var mint = 0x7FFFFFFFFFFFFFFF;\n"
1611 " var list = [mint, mint, mint, mint, mint,\n" 1613 " var list = [mint, mint, mint, mint, mint,\n"
1612 " mint, mint, mint, mint, mint];\n" 1614 " mint, mint, mint, mint, mint];\n"
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
1861 EXPECT(Dart_ErrorHasException(result)); 1863 EXPECT(Dart_ErrorHasException(result));
1862 EXPECT_SUBSTRING("Exception: nulltruefalse1234563.14[]100123456789\n", 1864 EXPECT_SUBSTRING("Exception: nulltruefalse1234563.14[]100123456789\n",
1863 Dart_GetError(result)); 1865 Dart_GetError(result));
1864 1866
1865 Dart_ExitScope(); 1867 Dart_ExitScope();
1866 } 1868 }
1867 1869
1868 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). 1870 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64).
1869 1871
1870 } // namespace dart 1872 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object_store.cc ('k') | runtime/vm/vm.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698