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

Side by Side Diff: tests/pkg/file/file_test.dart

Issue 1659163007: Rename fletch -> dartino (Closed) Base URL: https://github.com/dartino/sdk.git@master
Patch Set: address comments Created 4 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
« no previous file with comments | « tests/pkg/ffi/ffi_test.dart ('k') | tests/pkg/fletch_agent/messages_test.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) 2015, the Dartino project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dartino 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.md file. 3 // BSD-style license that can be found in the LICENSE.md file.
4 4
5 import 'dart:typed_data'; 5 import 'dart:typed_data';
6 6
7 import 'package:expect/expect.dart'; 7 import 'package:expect/expect.dart';
8 import 'package:file/file.dart'; 8 import 'package:file/file.dart';
9 9
10 void main() { 10 void main() {
11 testOpen(); 11 testOpen();
12 testReadWrite(); 12 testReadWrite();
13 testSeek(); 13 testSeek();
14 } 14 }
15 15
16 bool isFileException(e) => e is FileException; 16 bool isFileException(e) => e is FileException;
17 17
18 void testOpen() { 18 void testOpen() {
19 String path = '/tmp/__fletch_dart_io_non_exist_file__'; 19 String path = '/tmp/__dartino_dart_io_non_exist_file__';
20 Expect.throws(() => new File.open(path), isFileException); 20 Expect.throws(() => new File.open(path), isFileException);
21 var file = new File.temporary("/tmp/file_test"); 21 var file = new File.temporary("/tmp/file_test");
22 Expect.isTrue(file.isOpen); 22 Expect.isTrue(file.isOpen);
23 Expect.isTrue(File.existsAsFile(file.path)); 23 Expect.isTrue(File.existsAsFile(file.path));
24 file.close(); 24 file.close();
25 Expect.isFalse(file.isOpen); 25 Expect.isFalse(file.isOpen);
26 File.delete(file.path); 26 File.delete(file.path);
27 Expect.isFalse(File.existsAsFile(file.path)); 27 Expect.isFalse(File.existsAsFile(file.path));
28 } 28 }
29 29
(...skipping 29 matching lines...) Expand all
59 Expect.equals(0, file.length); 59 Expect.equals(0, file.length);
60 file.position = 0; 60 file.position = 0;
61 Expect.equals(0, file.position); 61 Expect.equals(0, file.position);
62 file.position = 1; 62 file.position = 1;
63 Expect.equals(1, file.position); 63 Expect.equals(1, file.position);
64 Expect.equals(0, file.length); 64 Expect.equals(0, file.length);
65 65
66 file.close(); 66 file.close();
67 File.delete(file.path); 67 File.delete(file.path);
68 } 68 }
OLDNEW
« no previous file with comments | « tests/pkg/ffi/ffi_test.dart ('k') | tests/pkg/fletch_agent/messages_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698