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

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

Issue 14426006: Rename dart:typeddata to dart:typed_data. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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/symbols.h » ('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 1757 matching lines...) Expand 10 before | Expand all | Expand 10 after
1768 } 1768 }
1769 } 1769 }
1770 Dart_ExitScope(); 1770 Dart_ExitScope();
1771 Dart_ShutdownIsolate(); 1771 Dart_ShutdownIsolate();
1772 } 1772 }
1773 1773
1774 1774
1775 UNIT_TEST_CASE(DartGeneratedListMessagesWithBackref) { 1775 UNIT_TEST_CASE(DartGeneratedListMessagesWithBackref) {
1776 const int kArrayLength = 10; 1776 const int kArrayLength = 10;
1777 static const char* kScriptChars = 1777 static const char* kScriptChars =
1778 "import 'dart:typeddata';\n" 1778 "import 'dart:typed_data';\n"
1779 "final int kArrayLength = 10;\n" 1779 "final int kArrayLength = 10;\n"
1780 "getStringList() {\n" 1780 "getStringList() {\n"
1781 " var s = 'Hello, world!';\n" 1781 " var s = 'Hello, world!';\n"
1782 " var list = new List<String>(kArrayLength);\n" 1782 " var list = new List<String>(kArrayLength);\n"
1783 " for (var i = 0; i < kArrayLength; i++) list[i] = s;\n" 1783 " for (var i = 0; i < kArrayLength; i++) list[i] = s;\n"
1784 " return list;\n" 1784 " return list;\n"
1785 "}\n" 1785 "}\n"
1786 "getMintList() {\n" 1786 "getMintList() {\n"
1787 " var mint = 0x7FFFFFFFFFFFFFFF;\n" 1787 " var mint = 0x7FFFFFFFFFFFFFFF;\n"
1788 " var list = new List(kArrayLength);\n" 1788 " var list = new List(kArrayLength);\n"
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
1967 } 1967 }
1968 } 1968 }
1969 Dart_ExitScope(); 1969 Dart_ExitScope();
1970 Dart_ShutdownIsolate(); 1970 Dart_ShutdownIsolate();
1971 } 1971 }
1972 1972
1973 1973
1974 UNIT_TEST_CASE(DartGeneratedArrayLiteralMessagesWithBackref) { 1974 UNIT_TEST_CASE(DartGeneratedArrayLiteralMessagesWithBackref) {
1975 const int kArrayLength = 10; 1975 const int kArrayLength = 10;
1976 static const char* kScriptChars = 1976 static const char* kScriptChars =
1977 "import 'dart:typeddata';\n" 1977 "import 'dart:typed_data';\n"
1978 "final int kArrayLength = 10;\n" 1978 "final int kArrayLength = 10;\n"
1979 "getStringList() {\n" 1979 "getStringList() {\n"
1980 " var s = 'Hello, world!';\n" 1980 " var s = 'Hello, world!';\n"
1981 " var list = [s, s, s, s, s, s, s, s, s, s];\n" 1981 " var list = [s, s, s, s, s, s, s, s, s, s];\n"
1982 " return list;\n" 1982 " return list;\n"
1983 "}\n" 1983 "}\n"
1984 "getMintList() {\n" 1984 "getMintList() {\n"
1985 " var mint = 0x7FFFFFFFFFFFFFFF;\n" 1985 " var mint = 0x7FFFFFFFFFFFFFFF;\n"
1986 " var list = [mint, mint, mint, mint, mint,\n" 1986 " var list = [mint, mint, mint, mint, mint,\n"
1987 " mint, mint, mint, mint, mint];\n" 1987 " mint, mint, mint, mint, mint];\n"
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
2178 static void CheckTypedData(Dart_CObject* object, 2178 static void CheckTypedData(Dart_CObject* object,
2179 Dart_CObject::TypedDataType typed_data_type, 2179 Dart_CObject::TypedDataType typed_data_type,
2180 int len) { 2180 int len) {
2181 EXPECT_EQ(Dart_CObject::kTypedData, object->type); 2181 EXPECT_EQ(Dart_CObject::kTypedData, object->type);
2182 EXPECT_EQ(typed_data_type, object->value.as_typed_data.type); 2182 EXPECT_EQ(typed_data_type, object->value.as_typed_data.type);
2183 EXPECT_EQ(len, object->value.as_typed_data.length); 2183 EXPECT_EQ(len, object->value.as_typed_data.length);
2184 } 2184 }
2185 2185
2186 UNIT_TEST_CASE(DartGeneratedListMessagesWithTypedData) { 2186 UNIT_TEST_CASE(DartGeneratedListMessagesWithTypedData) {
2187 static const char* kScriptChars = 2187 static const char* kScriptChars =
2188 "import 'dart:typeddata';\n" 2188 "import 'dart:typed_data';\n"
2189 "getTypedDataList() {\n" 2189 "getTypedDataList() {\n"
2190 " var list = new List(10);\n" 2190 " var list = new List(10);\n"
2191 " var index = 0;\n" 2191 " var index = 0;\n"
2192 " list[index++] = new Int8List(256);\n" 2192 " list[index++] = new Int8List(256);\n"
2193 " list[index++] = new Uint8List(256);\n" 2193 " list[index++] = new Uint8List(256);\n"
2194 " list[index++] = new Int16List(256);\n" 2194 " list[index++] = new Int16List(256);\n"
2195 " list[index++] = new Uint16List(256);\n" 2195 " list[index++] = new Uint16List(256);\n"
2196 " list[index++] = new Int32List(256);\n" 2196 " list[index++] = new Int32List(256);\n"
2197 " list[index++] = new Uint32List(256);\n" 2197 " list[index++] = new Uint32List(256);\n"
2198 " list[index++] = new Int64List(256);\n" 2198 " list[index++] = new Int64List(256);\n"
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
2490 EXPECT(Dart_ErrorHasException(result)); 2490 EXPECT(Dart_ErrorHasException(result));
2491 EXPECT_SUBSTRING("Exception: nulltruefalse123456æøå3.14[]100123456789\n", 2491 EXPECT_SUBSTRING("Exception: nulltruefalse123456æøå3.14[]100123456789\n",
2492 Dart_GetError(result)); 2492 Dart_GetError(result));
2493 2493
2494 Dart_ExitScope(); 2494 Dart_ExitScope();
2495 } 2495 }
2496 2496
2497 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). 2497 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64).
2498 2498
2499 } // namespace dart 2499 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object_store.cc ('k') | runtime/vm/symbols.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698