Skip to content

Refactor fake #245

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Tests
  • Loading branch information
brianquinlan committed Jun 20, 2025
commit f517c7e7804707f691ff70030b83db827e4c124c
2 changes: 1 addition & 1 deletion pkgs/io_file/lib/src/vm_file_system_property.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import 'dart:io';

import 'file_system.dart';
import 'vm_posix_file_system.dart';
import 'native_posix_file_system.dart';
import 'vm_windows_file_system.dart';

/// Return the default [FileSystem] for the current platform.
Expand Down
9 changes: 8 additions & 1 deletion pkgs/io_file/test/create_directory_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@

import 'package:errno/errno.dart';
import 'package:io_file/io_file.dart';
import 'package:io_file/src/fake_posix_file_system.dart';
import 'package:io_file/windows_file_system.dart';
import 'package:test/test.dart';

import 'errors.dart' as errors;
import 'test_utils.dart';
import 'test_utils_self.dart' show SelfTestUtils;

void testDirectory(FileSystem fs, TestUtils testUtils) {
group('createDirectory', () {
Expand Down Expand Up @@ -89,7 +91,12 @@ void testDirectory(FileSystem fs, TestUtils testUtils) {
}

void main() {
group('native', () {
group('default', () {
testDirectory(fileSystem, testUtils());
});

group('fake', () {
final fs = FakePosixFileSystem();
testDirectory(fs, SelfTestUtils(fs));
});
}
2 changes: 1 addition & 1 deletion pkgs/io_file/test/metadata_apple_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import 'dart:ffi';
import 'dart:io';

import 'package:ffi/ffi.dart';
import 'package:io_file/src/vm_posix_file_system.dart';
import 'package:io_file/src/native_posix_file_system.dart';
import 'package:stdlibc/stdlibc.dart' as stdlibc;
import 'package:test/test.dart';

Expand Down
Loading