Chromium Code Reviews| Index: pkg/lookup_map/test/version_check_test.dart |
| diff --git a/pkg/lookup_map/test/version_check_test.dart b/pkg/lookup_map/test/version_check_test.dart |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..2da0873163d8f5e107dcf245326c45188d987e98 |
| --- /dev/null |
| +++ b/pkg/lookup_map/test/version_check_test.dart |
| @@ -0,0 +1,21 @@ |
| +// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| +// for details. All rights reserved. Use of this source code is governed by a |
| +// BSD-style license that can be found in the LICENSE file. |
| + |
| +import 'dart:io'; |
| +import 'dart:mirrors'; |
| +import 'package:lookup_map/lookup_map.dart'; // accessed via mirrors; |
| +import 'package:test/test.dart'; |
| +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; |
|
Bill Hesse
2015/09/11 14:10:29
This is failing on windows because it uses .path i
Bill Hesse
2015/09/11 14:17:55
There is also new File.fromUri().
Siggi Cherem (dart-lang)
2015/09/11 16:29:16
Oh - sorry about this, I didn't notice this failur
|
| + var yaml = loadYaml(new File(pubspecPath).readAsStringSync()); |
| + var version1 = yaml['version']; |
| + var library = currentMirrorSystem().findLibrary(#lookup_map); |
| + var version2 = library.getField(new Symbol('_version')).reflectee; |
| + expect(version1, version2); |
| + }); |
| +} |