Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(403)

Side by Side Diff: test/yaml_test.dart

Issue 1948223002: Fix all strong-mode warnings. (Closed) Base URL: git@github.com:dart-lang/yaml@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pubspec.yaml ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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:test/test.dart'; 5 import 'package:test/test.dart';
6 import 'package:yaml/yaml.dart'; 6 import 'package:yaml/yaml.dart';
7 7
8 import 'utils.dart'; 8 import 'utils.dart';
9 9
10 main() { 10 main() {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 --- text 50 --- text
51 """); 51 """);
52 }); 52 });
53 }); 53 });
54 54
55 test("includes source span information", () { 55 test("includes source span information", () {
56 var yaml = loadYamlNode(r""" 56 var yaml = loadYamlNode(r"""
57 - foo: 57 - foo:
58 bar 58 bar
59 - 123 59 - 123
60 """); 60 """) as YamlList;
61 61
62 expect(yaml.span.start.line, equals(0)); 62 expect(yaml.span.start.line, equals(0));
63 expect(yaml.span.start.column, equals(0)); 63 expect(yaml.span.start.column, equals(0));
64 expect(yaml.span.end.line, equals(3)); 64 expect(yaml.span.end.line, equals(3));
65 expect(yaml.span.end.column, equals(0)); 65 expect(yaml.span.end.column, equals(0));
66 66
67 var map = yaml.nodes.first; 67 var map = yaml.nodes.first as YamlMap;
68 expect(map.span.start.line, equals(0)); 68 expect(map.span.start.line, equals(0));
69 expect(map.span.start.column, equals(2)); 69 expect(map.span.start.column, equals(2));
70 expect(map.span.end.line, equals(2)); 70 expect(map.span.end.line, equals(2));
71 expect(map.span.end.column, equals(0)); 71 expect(map.span.end.column, equals(0));
72 72
73 var key = map.nodes.keys.first; 73 var key = map.nodes.keys.first;
74 expect(key.span.start.line, equals(0)); 74 expect(key.span.start.line, equals(0));
75 expect(key.span.start.column, equals(2)); 75 expect(key.span.start.column, equals(2));
76 expect(key.span.end.line, equals(0)); 76 expect(key.span.end.line, equals(0));
77 expect(key.span.end.column, equals(5)); 77 expect(key.span.end.column, equals(5));
(...skipping 1796 matching lines...) Expand 10 before | Expand all | Expand 10 after
1874 A null: null 1874 A null: null
1875 Also a null: # Empty 1875 Also a null: # Empty
1876 Not a null: "" 1876 Not a null: ""
1877 Booleans: [ true, True, false, FALSE ] 1877 Booleans: [ true, True, false, FALSE ]
1878 Integers: [ 0, 0o7, 0x3A, -19 ] 1878 Integers: [ 0, 0o7, 0x3A, -19 ]
1879 Floats: [ 0., -0.0, .5, +12e03, -2E+05 ] 1879 Floats: [ 0., -0.0, .5, +12e03, -2E+05 ]
1880 Also floats: [ .inf, -.Inf, +.INF, .NAN ]'''); 1880 Also floats: [ .inf, -.Inf, +.INF, .NAN ]''');
1881 }); 1881 });
1882 }); 1882 });
1883 } 1883 }
OLDNEW
« no previous file with comments | « pubspec.yaml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698