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

Side by Side Diff: utils/tests/pub/test_pub.dart

Issue 10037027: unittest step2: bye bye to multiple entrypoints for unittest (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 | « utils/tests/pub/pub_tests.dart ('k') | utils/tip/froggertest.html » ('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 /** 5 /**
6 * Test infrastructure for testing pub. Unlike typical unit tests, most pub 6 * Test infrastructure for testing pub. Unlike typical unit tests, most pub
7 * tests are integration tests that stage some stuff on the file system, run 7 * tests are integration tests that stage some stuff on the file system, run
8 * pub, and then validate the results. This library provides an API to build 8 * pub, and then validate the results. This library provides an API to build
9 * tests like that. 9 * tests like that.
10 */ 10 */
11 #library('test_pub'); 11 #library('test_pub');
12 12
13 #import('dart:io'); 13 #import('dart:io');
14 14
15 #import('../../../lib/unittest/unittest_vm.dart'); 15 #import('../../../lib/unittest/unittest.dart');
16 #import('../../lib/file_system.dart'); 16 #import('../../lib/file_system.dart');
17 17
18 void testOutput(String description, List<String> pubArgs, String expected, 18 void testOutput(String description, List<String> pubArgs, String expected,
19 [int exitCode = 0]) { 19 [int exitCode = 0]) {
20 asyncTest(description, 1, () { 20 asyncTest(description, 1, () {
21 // Find a dart executable we can use to run pub. Uses the one that the 21 // Find a dart executable we can use to run pub. Uses the one that the
22 // test infrastructure uses. 22 // test infrastructure uses.
23 final scriptDir = new File(new Options().script).directorySync().path; 23 final scriptDir = new File(new Options().script).directorySync().path;
24 final platform = new Platform().operatingSystem(); 24 final platform = new Platform().operatingSystem();
25 final dartBin = joinPaths(scriptDir, 25 final dartBin = joinPaths(scriptDir,
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 final message = new StringBuffer(); 97 final message = new StringBuffer();
98 message.add('Unexpected output:\n'); 98 message.add('Unexpected output:\n');
99 for (var i = expected.length; i < actual.length; i++) { 99 for (var i = expected.length; i < actual.length; i++) {
100 message.add(actual[i]); 100 message.add(actual[i]);
101 message.add('\n'); 101 message.add('\n');
102 } 102 }
103 103
104 Expect.fail(message.toString()); 104 Expect.fail(message.toString());
105 } 105 }
106 } 106 }
OLDNEW
« no previous file with comments | « utils/tests/pub/pub_tests.dart ('k') | utils/tip/froggertest.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698