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

Side by Side Diff: pkg/dev_compiler/test/codegen/lib/html/typed_arrays_5_test.dart

Issue 2419863002: Remove uses of unittest in the HTML tests where possible. (Closed)
Patch Set: Remove TODO. Created 4 years, 2 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
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 library typed_arrays_5_test;
6 import 'package:unittest/unittest.dart';
7 import 'package:unittest/html_config.dart';
8 import 'dart:html'; 5 import 'dart:html';
9 import 'dart:typed_data'; 6 import 'dart:typed_data';
10 7
8 import 'package:expect/minitest.dart';
9
11 main() { 10 main() {
12 useHtmlConfiguration();
13
14 // Only perform tests if ArrayBuffer is supported. 11 // Only perform tests if ArrayBuffer is supported.
15 if (!Platform.supportsTypedData) { 12 if (!Platform.supportsTypedData) {
16 return; 13 return;
17 } 14 }
18 15
19 test('filter_dynamic', () { 16 test('filter_dynamic', () {
20 var a = new Float32List(1024); 17 var a = new Float32List(1024);
21 for (int i = 0; i < a.length; i++) { 18 for (int i = 0; i < a.length; i++) {
22 a[i] = i.toDouble(); 19 a[i] = i.toDouble();
23 } 20 }
(...skipping 17 matching lines...) Expand all
41 } 38 }
42 expect(a.contains(0), isTrue); 39 expect(a.contains(0), isTrue);
43 expect(a.contains(5), isTrue); 40 expect(a.contains(5), isTrue);
44 expect(a.contains(1023), isTrue); 41 expect(a.contains(1023), isTrue);
45 42
46 expect(a.contains(-5), isFalse); 43 expect(a.contains(-5), isFalse);
47 expect(a.contains(-1), isFalse); 44 expect(a.contains(-1), isFalse);
48 expect(a.contains(1024), isFalse); 45 expect(a.contains(1024), isFalse);
49 }); 46 });
50 } 47 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698