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 library analyzer.src.test.util.yaml_test; | 5 library analyzer.src.test.util.yaml_test; |
6 | 6 |
7 import 'package:analyzer/src/util/yaml.dart'; | 7 import 'package:analyzer/src/util/yaml.dart'; |
8 import 'package:test/test.dart'; | 8 import 'package:test/test.dart'; |
9 | 9 |
10 import '../../utils.dart'; | |
11 | |
12 main() { | 10 main() { |
13 initializeTestEnvironment(); | |
14 | |
15 group('yaml', () { | 11 group('yaml', () { |
16 group('merge', () { | 12 group('merge', () { |
17 test('map', () { | 13 test('map', () { |
18 expect( | 14 expect( |
19 merge({ | 15 merge({ |
20 'one': true, | 16 'one': true, |
21 'two': false, | 17 'two': false, |
22 'three': { | 18 'three': { |
23 'nested': {'four': true, 'six': true} | 19 'nested': {'four': true, 'six': true} |
24 } | 20 } |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 expect(merge(1, 'foo'), 'foo'); | 91 expect(merge(1, 'foo'), 'foo'); |
96 expect(merge({'foo': 1}, 'foo'), 'foo'); | 92 expect(merge({'foo': 1}, 'foo'), 'foo'); |
97 }); | 93 }); |
98 }); | 94 }); |
99 }); | 95 }); |
100 } | 96 } |
101 | 97 |
102 final Merger merger = new Merger(); | 98 final Merger merger = new Merger(); |
103 | 99 |
104 Object merge(Object o1, Object o2) => merger.merge(o1, o2); | 100 Object merge(Object o1, Object o2) => merger.merge(o1, o2); |
OLD | NEW |