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

Side by Side Diff: tests/lib/typed_data/setRange_4_test.dart

Issue 132163005: Version 1.1.0-dev.5.7 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/dart/
Patch Set: Created 6 years, 11 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 | « tests/lib/lib.status ('k') | tools/VERSION » ('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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 import 'setRange_lib.dart'; 5 import 'setRange_lib.dart';
6 import 'package:expect/expect.dart'; 6 import 'package:expect/expect.dart';
7 import 'dart:typed_data'; 7 import 'dart:typed_data';
8 8
9 clampingTest() { 9 clampingTest() {
10 var a1 = new Int8List(8); 10 var a1 = new Int8List(8);
11 var a2 = new Uint8ClampedList.view(a1); 11 var a2 = new Uint8ClampedList.view(a1.buffer);
12 initialize(a1); 12 initialize(a1);
13 Expect.equals('[1, 2, 3, 4, 5, 6, 7, 8]', '$a1'); 13 Expect.equals('[1, 2, 3, 4, 5, 6, 7, 8]', '$a1');
14 Expect.equals('[1, 2, 3, 4, 5, 6, 7, 8]', '$a2'); 14 Expect.equals('[1, 2, 3, 4, 5, 6, 7, 8]', '$a2');
15 a1[0] = -1; 15 a1[0] = -1;
16 a2.setRange(0, 2, a1); 16 a2.setRange(0, 2, a1);
17 Expect.equals('[0, 2, 3, 4, 5, 6, 7, 8]', '$a2'); 17 Expect.equals('[0, 2, 3, 4, 5, 6, 7, 8]', '$a2');
18 } 18 }
19 19
20 main() { 20 main() {
21 clampingTest(); 21 clampingTest();
22 } 22 }
OLDNEW
« no previous file with comments | « tests/lib/lib.status ('k') | tools/VERSION » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698