Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit e8c5092

Browse files
author
Emmanuel Garcia
committed
Test instance type
1 parent 7a76dbf commit e8c5092

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

packages/path_provider/path_provider/lib/path_provider.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ class MissingPlatformDirectoryException implements Exception {
3636
}
3737
}
3838

39+
void main() {
40+
41+
}
42+
43+
3944
/// Path to the temporary directory on the device that is not backed up and is
4045
/// suitable for storing caches of downloaded files.
4146
///

packages/shared_preferences/shared_preferences_linux/example/integration_test/shared_preferences_test.dart

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import 'dart:async';
88

99
import 'package:flutter_test/flutter_test.dart';
1010
import 'package:integration_test/integration_test.dart';
11+
import 'package:shared_preferences_linux/shared_preferences_linux.dart';
1112
import 'package:shared_preferences_platform_interface/shared_preferences_platform_interface.dart';
1213

1314
void main() {
@@ -34,14 +35,16 @@ void main() {
3435

3536
setUp(() {
3637
preferences = SharedPreferencesStorePlatform.instance;
37-
expect(
38-
preferences.runtimeType.toString(), equals('SharedPreferencesLinux'));
3938
});
4039

4140
tearDown(() async {
4241
await preferences.clear();
4342
});
4443

44+
test('instance is Linux implementation', () {
45+
expect(preferences, isA<PathProviderLinux>());
46+
});
47+
4548
testWidgets('reading', (WidgetTester _) async {
4649
final all = await preferences.getAll();
4750
expect(all['String'], isNull);

0 commit comments

Comments
 (0)