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

Side by Side Diff: pkg/lookup_map/test/version_check_test.dart

Issue 1333313002: Fix conversion from Uri to File in test, to use File.fromUri(). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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 | « no previous file | 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) 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 import 'dart:io'; 5 import 'dart:io';
6 import 'dart:mirrors'; 6 import 'dart:mirrors';
7 import 'package:lookup_map/lookup_map.dart'; // accessed via mirrors; 7 import 'package:lookup_map/lookup_map.dart'; // accessed via mirrors;
8 import 'package:test/test.dart'; 8 import 'package:test/test.dart';
9 import 'package:yaml/yaml.dart'; 9 import 'package:yaml/yaml.dart';
10 10
11 /// This dartdoc helps remove a warning for the unused import on [LookupMap]. 11 /// This dartdoc helps remove a warning for the unused import on [LookupMap].
12 main() { 12 main() {
13 test('validate version number matches', () { 13 test('validate version number matches', () {
14 var pubspecPath = Platform.script.resolve('../pubspec.yaml').path; 14 var pubspec = Platform.script.resolve('../pubspec.yaml');
15 var yaml = loadYaml(new File(pubspecPath).readAsStringSync()); 15 var yaml = loadYaml(new File.fromUri(pubspec).readAsStringSync());
16 var version1 = yaml['version']; 16 var version1 = yaml['version'];
17 var library = currentMirrorSystem().findLibrary(#lookup_map); 17 var library = currentMirrorSystem().findLibrary(#lookup_map);
18 var version2 = library.getField(new Symbol('_version')).reflectee; 18 var version2 = library.getField(new Symbol('_version')).reflectee;
19 expect(version1, version2); 19 expect(version1, version2);
20 }); 20 });
21 } 21 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698