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

Side by Side Diff: pkg/yaml/test/yaml_test.dart

Issue 12295014: Remove deprecated Strings class. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « pkg/yaml/lib/model.dart ('k') | runtime/lib/string_buffer_patch.dart » ('j') | 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 library yaml_test; 5 library yaml_test;
6 6
7 import 'package:unittest/unittest.dart'; 7 import 'package:unittest/unittest.dart';
8 import 'package:yaml/yaml.dart'; 8 import 'package:yaml/yaml.dart';
9 import 'package:yaml/deep_equals.dart'; 9 import 'package:yaml/deep_equals.dart';
10 // TODO(jmesserly): we should not be reaching outside the YAML package 10 // TODO(jmesserly): we should not be reaching outside the YAML package
(...skipping 1332 matching lines...) Expand 10 before | Expand all | Expand 10 after
1343 1343
1344 test('[Example 7.22]', () { 1344 test('[Example 7.22]', () {
1345 Expect.throws(() => loadYaml(cleanUpLiteral( 1345 Expect.throws(() => loadYaml(cleanUpLiteral(
1346 """ 1346 """
1347 [ foo 1347 [ foo
1348 bar: invalid ]"""))); 1348 bar: invalid ]""")));
1349 1349
1350 // TODO(nweiz): enable this when we throw an error for long keys 1350 // TODO(nweiz): enable this when we throw an error for long keys
1351 // var dotList = []; 1351 // var dotList = [];
1352 // dotList.insertRange(0, 1024, ' '); 1352 // dotList.insertRange(0, 1024, ' ');
1353 // var dots = Strings.join(dotList, ''); 1353 // var dots = dotList.join();
1354 // Expect.throws(() => loadYaml('[ "foo...$dots...bar": invalid ]')); 1354 // Expect.throws(() => loadYaml('[ "foo...$dots...bar": invalid ]'));
1355 }); 1355 });
1356 }); 1356 });
1357 1357
1358 group('7.5: Flow Nodes', () { 1358 group('7.5: Flow Nodes', () {
1359 test('[Example 7.23]', () { 1359 test('[Example 7.23]', () {
1360 expectYamlLoads([["a", "b"], {"a": "b"}, "a", "b", "c"], 1360 expectYamlLoads([["a", "b"], {"a": "b"}, "a", "b", "c"],
1361 """ 1361 """
1362 - [ a, b ] 1362 - [ a, b ]
1363 - { a: b } 1363 - { a: b }
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
1870 A null: null 1870 A null: null
1871 Also a null: # Empty 1871 Also a null: # Empty
1872 Not a null: "" 1872 Not a null: ""
1873 Booleans: [ true, True, false, FALSE ] 1873 Booleans: [ true, True, false, FALSE ]
1874 Integers: [ 0, 0o7, 0x3A, -19 ] 1874 Integers: [ 0, 0o7, 0x3A, -19 ]
1875 Floats: [ 0., -0.0, .5, +12e03, -2E+05 ] 1875 Floats: [ 0., -0.0, .5, +12e03, -2E+05 ]
1876 Also floats: [ .inf, -.Inf, +.INF, .NAN ]'''); 1876 Also floats: [ .inf, -.Inf, +.INF, .NAN ]''');
1877 }); 1877 });
1878 }); 1878 });
1879 } 1879 }
OLDNEW
« no previous file with comments | « pkg/yaml/lib/model.dart ('k') | runtime/lib/string_buffer_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698