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

Side by Side Diff: runtime/tests/vm/dart/byte_array_test.dart

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/lib/scalarlist_sources.gypi ('k') | runtime/vm/bootstrap.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
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.
4
5 #import('dart:scalarlist');
6
1 class ByteArrayTest { 7 class ByteArrayTest {
2 static testInt8List() { 8 static testInt8List() {
3 Expect.throws(() { new Int8List(-1); }, 9 Expect.throws(() { new Int8List(-1); },
4 (e) { return e is IllegalArgumentException; }); 10 (e) { return e is IllegalArgumentException; });
5 var array = new Int8List(10); 11 var array = new Int8List(10);
6 Expect.isTrue(array is List<int>); 12 Expect.isTrue(array is List<int>);
7 Expect.equals(10, array.length); 13 Expect.equals(10, array.length);
8 Expect.equals(1, array.bytesPerElement()); 14 Expect.equals(1, array.bytesPerElement());
9 Expect.equals(10, array.lengthInBytes()); 15 Expect.equals(10, array.lengthInBytes());
10 Expect.listEquals([0, 0, 0, 0, 0, 16 Expect.listEquals([0, 0, 0, 0, 0,
(...skipping 2249 matching lines...) Expand 10 before | Expand all | Expand 10 after
2260 testInt64ListView(); 2266 testInt64ListView();
2261 testUint64ListView(); 2267 testUint64ListView();
2262 testFloat32ListView(); 2268 testFloat32ListView();
2263 testFloat64ListView(); 2269 testFloat64ListView();
2264 } 2270 }
2265 } 2271 }
2266 2272
2267 main() { 2273 main() {
2268 ByteArrayTest.testMain(); 2274 ByteArrayTest.testMain();
2269 } 2275 }
OLDNEW
« no previous file with comments | « runtime/lib/scalarlist_sources.gypi ('k') | runtime/vm/bootstrap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698