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

Side by Side Diff: mojo/public/dart/third_party/analyzer/test/generated/java_io_test.dart

Issue 1346773002: Stop running pub get at gclient sync time and fix build bugs (Closed) Base URL: git@github.com:domokit/mojo.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
OLDNEW
(Empty)
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
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.
4
5 library engine.java_io_test;
6
7 import 'dart:io';
8
9 import 'package:analyzer/src/generated/java_io.dart';
10 import 'package:unittest/unittest.dart';
11
12 import '../utils.dart';
13
14 main() {
15 initializeTestEnvironment();
16 group('JavaFile', () {
17 group('toURI', () {
18 test('forAbsolute', () {
19 String tempPath = '/temp';
20 String path = JavaFile.pathContext.join(tempPath, 'foo.dart');
21 // we use an absolute path
22 expect(JavaFile.pathContext.isAbsolute(path), isTrue,
23 reason: '"$path" is not absolute');
24 // test that toURI() returns an absolute URI
25 Uri uri = new JavaFile(path).toURI();
26 expect(uri.isAbsolute, isTrue);
27 expect(uri.scheme, 'file');
28 });
29 test('forRelative', () {
30 String tempPath = '/temp';
31 String path = JavaFile.pathContext.join(tempPath, 'foo.dart');
32 expect(JavaFile.pathContext.isAbsolute(path), isTrue,
33 reason: '"$path" is not absolute');
34 // prepare a relative path
35 // We should not check that "relPath" is actually relative -
36 // it may be not on Windows, if "temp" is on other disk.
37 String relPath = JavaFile.pathContext.relative(path);
38 // test that toURI() returns an absolute URI
39 Uri uri = new JavaFile(relPath).toURI();
40 expect(uri.isAbsolute, isTrue);
41 expect(uri.scheme, 'file');
42 });
43 });
44 });
45 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698