OLD | NEW |
(Empty) | |
| 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 |
| 3 // BSD-style license that can be found in the LICENSE file. |
| 4 |
| 5 library test.parser_test; |
| 6 |
| 7 import 'dart:json' as json; |
| 8 import 'package:unittest/unittest.dart'; |
| 9 import 'package:source_maps/source_maps.dart'; |
| 10 import 'common.dart'; |
| 11 |
| 12 main() { |
| 13 test('parse', () { |
| 14 var mapping = parseJson(EXPECTED_MAP); |
| 15 check(outputVar1, mapping, inputVar1, false); |
| 16 check(outputVar2, mapping, inputVar2, false); |
| 17 check(outputFunction, mapping, inputFunction, false); |
| 18 check(outputExpr, mapping, inputExpr, false); |
| 19 }); |
| 20 |
| 21 test('parse + json', () { |
| 22 var mapping = parse(json.stringify(EXPECTED_MAP)); |
| 23 check(outputVar1, mapping, inputVar1, false); |
| 24 check(outputVar2, mapping, inputVar2, false); |
| 25 check(outputFunction, mapping, inputFunction, false); |
| 26 check(outputExpr, mapping, inputExpr, false); |
| 27 }); |
| 28 |
| 29 test('parse with file', () { |
| 30 var mapping = parseJson(EXPECTED_MAP); |
| 31 check(outputVar1, mapping, inputVar1, true); |
| 32 check(outputVar2, mapping, inputVar2, true); |
| 33 check(outputFunction, mapping, inputFunction, true); |
| 34 check(outputExpr, mapping, inputExpr, true); |
| 35 }); |
| 36 } |
OLD | NEW |