| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 'package:unittest/unittest.dart'; | 5 import 'package:unittest/unittest.dart'; |
| 6 import 'package:unittest/src/backend/platform_selector/ast.dart'; | |
| 7 import 'package:unittest/src/backend/platform_selector/parser.dart'; | 6 import 'package:unittest/src/backend/platform_selector/parser.dart'; |
| 8 | 7 |
| 9 void main() { | 8 void main() { |
| 10 group("toString() for", () { | 9 group("toString() for", () { |
| 11 test("a variable is its name", () { | 10 test("a variable is its name", () { |
| 12 _expectToString("foo"); | 11 _expectToString("foo"); |
| 13 _expectToString("a-b"); | 12 _expectToString("a-b"); |
| 14 }); | 13 }); |
| 15 | 14 |
| 16 group("not", () { | 15 group("not", () { |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 }); | 73 }); |
| 75 } | 74 } |
| 76 | 75 |
| 77 void _expectToString(String selector, [String result]) { | 76 void _expectToString(String selector, [String result]) { |
| 78 if (result == null) result = selector; | 77 if (result == null) result = selector; |
| 79 expect(_toString(selector), equals(result), | 78 expect(_toString(selector), equals(result), |
| 80 reason: 'Expected toString of "$selector" to be "$result".'); | 79 reason: 'Expected toString of "$selector" to be "$result".'); |
| 81 } | 80 } |
| 82 | 81 |
| 83 String _toString(String selector) => new Parser(selector).parse().toString(); | 82 String _toString(String selector) => new Parser(selector).parse().toString(); |
| OLD | NEW |