From e14568cf83adc05e4c7dfe281fa369c653b01b77 Mon Sep 17 00:00:00 2001 From: William Hesse Date: Fri, 11 Sep 2015 16:21:44 +0200 Subject: [PATCH] Fix conversion from Uri to File in test, to use File.fromUri(). BUG= R=wibling@google.com Review URL: https://codereview.chromium.org//1333313002 . --- pkg/lookup_map/test/version_check_test.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/lookup_map/test/version_check_test.dart b/pkg/lookup_map/test/version_check_test.dart index 2da0873163d..2bee1a61280 100644 --- a/pkg/lookup_map/test/version_check_test.dart +++ b/pkg/lookup_map/test/version_check_test.dart @@ -11,8 +11,8 @@ import 'package:yaml/yaml.dart'; /// This dartdoc helps remove a warning for the unused import on [LookupMap]. main() { test('validate version number matches', () { - var pubspecPath = Platform.script.resolve('../pubspec.yaml').path; - var yaml = loadYaml(new File(pubspecPath).readAsStringSync()); + var pubspec = Platform.script.resolve('../pubspec.yaml'); + var yaml = loadYaml(new File.fromUri(pubspec).readAsStringSync()); var version1 = yaml['version']; var library = currentMirrorSystem().findLibrary(#lookup_map); var version2 = library.getField(new Symbol('_version')).reflectee;