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

Side by Side Diff: samples/tests/samples/lib/util/util_test.dart

Issue 11301046: Restructure pkg/unittest and pkg/webdriver to follow the pub conventions. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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('util_tests'); 5 library util_tests;
6 6
7 #import('dart:html'); 7 import 'dart:html';
8 #import('../../../../../pkg/unittest/unittest.dart'); 8 import '../../../../../pkg/unittest/lib/unittest.dart';
9 #import('../../../../../pkg/unittest/html_config.dart'); 9 import '../../../../../pkg/unittest/lib/html_config.dart';
10 #import('../../../../ui_lib/util/utilslib.dart'); 10 import '../../../../ui_lib/util/utilslib.dart';
11 11
12 main() { 12 main() {
13 useHtmlConfiguration(); 13 useHtmlConfiguration();
14 test('insertAt', () { 14 test('insertAt', () {
15 var a = []; 15 var a = [];
16 CollectionUtils.insertAt(a, 0, 1); 16 CollectionUtils.insertAt(a, 0, 1);
17 expect(a, orderedEquals([1])); 17 expect(a, orderedEquals([1]));
18 18
19 CollectionUtils.insertAt(a, 0, 2); 19 CollectionUtils.insertAt(a, 0, 2);
20 expect(a, orderedEquals([2, 1])); 20 expect(a, orderedEquals([2, 1]));
(...skipping 15 matching lines...) Expand all
36 CollectionUtils.insertAt(a, 3, 5); 36 CollectionUtils.insertAt(a, 3, 5);
37 expect(a, orderedEquals([1, 3, 2, 5, 4])); 37 expect(a, orderedEquals([1, 3, 2, 5, 4]));
38 }); 38 });
39 39
40 test('defaultString', () { 40 test('defaultString', () {
41 expect(StringUtils.defaultString(null), isEmpty); 41 expect(StringUtils.defaultString(null), isEmpty);
42 expect(StringUtils.defaultString(''), isEmpty); 42 expect(StringUtils.defaultString(''), isEmpty);
43 expect(StringUtils.defaultString('test'), equals('test')); 43 expect(StringUtils.defaultString('test'), equals('test'));
44 }); 44 });
45 } 45 }
OLDNEW
« no previous file with comments | « samples/tests/samples/lib/observable/observable_test.dart ('k') | samples/tests/samples/lib/view/view_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698