OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 dart_backend.sexpr_test; | 5 library dart_backend.sexpr_test; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 | 8 |
9 import 'package:async_helper/async_helper.dart'; | 9 import 'package:async_helper/async_helper.dart'; |
10 import 'package:compiler/src/dart2jslib.dart'; | 10 import 'package:compiler/src/compiler.dart'; |
11 import 'package:compiler/src/cps_ir/cps_ir_nodes.dart'; | 11 import 'package:compiler/src/cps_ir/cps_ir_nodes.dart'; |
12 import 'package:compiler/src/cps_ir/cps_ir_nodes_sexpr.dart'; | 12 import 'package:compiler/src/cps_ir/cps_ir_nodes_sexpr.dart'; |
13 import 'package:expect/expect.dart'; | 13 import 'package:expect/expect.dart'; |
14 | 14 |
15 import '../compiler_helper.dart' hide compilerFor; | 15 import '../compiler_helper.dart' hide compilerFor; |
16 import 'sexpr_unstringifier.dart'; | 16 import 'sexpr_unstringifier.dart'; |
17 import 'test_helper.dart'; | 17 import 'test_helper.dart'; |
18 | 18 |
19 const String CODE = """ | 19 const String CODE = """ |
20 class Foo { | 20 class Foo { |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 ]; | 168 ]; |
169 | 169 |
170 asyncTest(() => testStringifier(CODE, tokens).then((List<String> sexprs) { | 170 asyncTest(() => testStringifier(CODE, tokens).then((List<String> sexprs) { |
171 final functions = testUnstringifier(sexprs); | 171 final functions = testUnstringifier(sexprs); |
172 | 172 |
173 // Ensure that | 173 // Ensure that |
174 // stringified(CODE) == stringified(unstringified(stringified(CODE))) | 174 // stringified(CODE) == stringified(unstringified(stringified(CODE))) |
175 Expect.listEquals(sexprs, stringifyAll(functions)); | 175 Expect.listEquals(sexprs, stringifyAll(functions)); |
176 })); | 176 })); |
177 } | 177 } |
OLD | NEW |