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/implementation/dart2jslib.dart'; | 10 import 'package:compiler/src/dart2jslib.dart'; |
11 import 'package:compiler/implementation/cps_ir/cps_ir_nodes.dart'; | 11 import 'package:compiler/src/cps_ir/cps_ir_nodes.dart'; |
12 import 'package:compiler/implementation/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 { |
21 static int x = 1; | 21 static int x = 1; |
22 foo() => 42; | 22 foo() => 42; |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 ]; | 165 ]; |
166 | 166 |
167 asyncTest(() => testStringifier(CODE, tokens).then((List<String> sexprs) { | 167 asyncTest(() => testStringifier(CODE, tokens).then((List<String> sexprs) { |
168 final functions = testUnstringifier(sexprs); | 168 final functions = testUnstringifier(sexprs); |
169 | 169 |
170 // Ensure that | 170 // Ensure that |
171 // stringified(CODE) == stringified(unstringified(stringified(CODE))) | 171 // stringified(CODE) == stringified(unstringified(stringified(CODE))) |
172 Expect.listEquals(sexprs, stringifyAll(functions)); | 172 Expect.listEquals(sexprs, stringifyAll(functions)); |
173 })); | 173 })); |
174 } | 174 } |
OLD | NEW |