| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 'dart:io'; | 5 import 'dart:io'; |
| 6 | 6 |
| 7 import 'package:path/path.dart'; | 7 import 'package:path/path.dart'; |
| 8 import 'package:unittest/unittest.dart'; | 8 import 'package:unittest/unittest.dart'; |
| 9 | 9 |
| 10 import 'package:analyzer/src/generated/java_core.dart' show CharSequence; | 10 import 'package:analyzer/src/generated/java_core.dart' show CharSequence; |
| (...skipping 1286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1297 expect(line, 'foo bar baz\nfoo bar baz'); | 1297 expect(line, 'foo bar baz\nfoo bar baz'); |
| 1298 }); | 1298 }); |
| 1299 | 1299 |
| 1300 }); | 1300 }); |
| 1301 | 1301 |
| 1302 /// Helper method tests | 1302 /// Helper method tests |
| 1303 group('helpers', () { | 1303 group('helpers', () { |
| 1304 | 1304 |
| 1305 test('indentString', () { | 1305 test('indentString', () { |
| 1306 expect(getIndentString(0), ''); | 1306 expect(getIndentString(0), ''); |
| 1307 expect(getIndentString(1), ' '); | 1307 expect(getIndentString(1), ' '); |
| 1308 expect(getIndentString(4), ' '); | 1308 expect(getIndentString(4), ' '); |
| 1309 }); | 1309 }); |
| 1310 | 1310 |
| 1311 test('indentString (tabbed)', () { | 1311 test('indentString (tabbed)', () { |
| 1312 expect(getIndentString(0, useTabs: true), ''); | 1312 expect(getIndentString(0, useTabs: true), ''); |
| 1313 expect(getIndentString(1, useTabs: true), '\t'); | 1313 expect(getIndentString(1, useTabs: true), '\t'); |
| 1314 expect(getIndentString(3, useTabs: true), '\t\t\t'); | 1314 expect(getIndentString(3, useTabs: true), '\t\t\t'); |
| 1315 }); | 1315 }); |
| 1316 | 1316 |
| 1317 test('repeat', () { | 1317 test('repeat', () { |
| 1318 expect(repeat('x', 0), ''); | 1318 expect(repeat('x', 0), ''); |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1412 input += lines[i++] + '\n'; | 1412 input += lines[i++] + '\n'; |
| 1413 } | 1413 } |
| 1414 while(++i < lines.length && !lines[i].startsWith('>>>')) { | 1414 while(++i < lines.length && !lines[i].startsWith('>>>')) { |
| 1415 expectedOutput += lines[i] + '\n'; | 1415 expectedOutput += lines[i] + '\n'; |
| 1416 } | 1416 } |
| 1417 test('test - (${testIndex++})', () { | 1417 test('test - (${testIndex++})', () { |
| 1418 expectClause(input, expectedOutput); | 1418 expectClause(input, expectedOutput); |
| 1419 }); | 1419 }); |
| 1420 } | 1420 } |
| 1421 } | 1421 } |
| OLD | NEW |