Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
fluttertpc_get
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Jonatas
2020-09-01 07:47:01 -0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
46e04143db9d47064bec7dd54e12879e5d86a827
46e04143
1 parent
a086da17
fix platform web tests
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
10 deletions
test/platform_test.dart
test/platform_web_test.dart
test/platform_test.dart
View file @
46e0414
@TestOn
(
'vm'
)
import
'dart:io'
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:get/get.dart'
;
import
'package:get/src/utils/platform/platform_web.dart'
;
import
'package:get/src/utils/platform/platform.dart'
;
void
main
(
)
{
test
(
'Platform test'
,
()
{
...
...
@@ -13,12 +12,5 @@ void main() {
expect
(
GetPlatform
.
isMacOS
,
Platform
.
isMacOS
);
expect
(
GetPlatform
.
isWindows
,
Platform
.
isWindows
);
expect
(
GetPlatform
.
isWeb
,
false
);
expect
(
GeneralPlatform
.
isWeb
,
true
);
expect
(
GeneralPlatform
.
isAndroid
,
false
);
expect
(
GeneralPlatform
.
isIOS
,
false
);
expect
(
GeneralPlatform
.
isFuchsia
,
false
);
expect
(
GeneralPlatform
.
isLinux
,
false
);
expect
(
GeneralPlatform
.
isMacOS
,
false
);
expect
(
GeneralPlatform
.
isWindows
,
false
);
});
}
...
...
test/platform_web_test.dart
0 → 100644
View file @
46e0414
@TestOn
(
'browser'
)
import
'dart:io'
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:get/src/utils/platform/platform.dart'
;
void
main
(
)
{
test
(
'Platform test'
,
()
{
expect
(
GetPlatform
.
isAndroid
,
Platform
.
isAndroid
);
expect
(
GetPlatform
.
isIOS
,
Platform
.
isIOS
);
expect
(
GetPlatform
.
isFuchsia
,
Platform
.
isFuchsia
);
expect
(
GetPlatform
.
isLinux
,
Platform
.
isLinux
);
expect
(
GetPlatform
.
isMacOS
,
Platform
.
isMacOS
);
expect
(
GetPlatform
.
isWindows
,
Platform
.
isWindows
);
expect
(
GetPlatform
.
isWeb
,
true
);
});
}
...
...
Please
register
or
login
to post a comment