Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
mobile_scanner
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
Navaron Bracke
2024-09-09 09:26:25 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
bb8a1235cb3045b2b05c5b56a70f1091b7e25aed
bb8a1235
1 parent
065ddf83
fix test expectations; fix missing comma
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
14 deletions
lib/src/enums/encryption_type.dart
test/enums/address_type_test.dart
test/enums/barcode_type_test.dart
test/enums/email_type_test.dart
test/enums/encryption_type_test.dart
test/enums/phone_type_test.dart
lib/src/enums/encryption_type.dart
View file @
bb8a123
...
...
@@ -14,7 +14,9 @@ enum EncryptionType {
const
EncryptionType
(
this
.
rawValue
);
@Deprecated
(
'EncryptionType.none is deprecated. Use EncryptionType.unknown instead.'
)
@Deprecated
(
'EncryptionType.none is deprecated. Use EncryptionType.unknown instead.'
,
)
static
const
EncryptionType
none
=
EncryptionType
.
unknown
;
factory
EncryptionType
.
fromRawValue
(
int
value
)
{
...
...
test/enums/address_type_test.dart
View file @
bb8a123
...
...
@@ -21,8 +21,8 @@ void main() {
const
int
negative
=
-
1
;
const
int
outOfRange
=
3
;
expect
(()
=>
AddressType
.
fromRawValue
(
negative
),
AddressType
.
unknown
);
expect
(()
=>
AddressType
.
fromRawValue
(
outOfRange
),
AddressType
.
unknown
);
expect
(
AddressType
.
fromRawValue
(
negative
),
AddressType
.
unknown
);
expect
(
AddressType
.
fromRawValue
(
outOfRange
),
AddressType
.
unknown
);
});
test
(
'can be converted to raw value'
,
()
{
...
...
test/enums/barcode_type_test.dart
View file @
bb8a123
...
...
@@ -31,8 +31,8 @@ void main() {
const
int
negative
=
-
1
;
const
int
outOfRange
=
13
;
expect
(()
=>
BarcodeType
.
fromRawValue
(
negative
),
BarcodeType
.
unknown
);
expect
(()
=>
BarcodeType
.
fromRawValue
(
outOfRange
),
BarcodeType
.
unknown
);
expect
(
BarcodeType
.
fromRawValue
(
negative
),
BarcodeType
.
unknown
);
expect
(
BarcodeType
.
fromRawValue
(
outOfRange
),
BarcodeType
.
unknown
);
});
test
(
'can be converted to raw value'
,
()
{
...
...
test/enums/email_type_test.dart
View file @
bb8a123
...
...
@@ -21,8 +21,8 @@ void main() {
const
int
negative
=
-
1
;
const
int
outOfRange
=
3
;
expect
(()
=>
EmailType
.
fromRawValue
(
negative
),
EmailType
.
unknown
);
expect
(()
=>
EmailType
.
fromRawValue
(
outOfRange
),
EmailType
.
unknown
);
expect
(
EmailType
.
fromRawValue
(
negative
),
EmailType
.
unknown
);
expect
(
EmailType
.
fromRawValue
(
outOfRange
),
EmailType
.
unknown
);
});
test
(
'can be converted to raw value'
,
()
{
...
...
test/enums/encryption_type_test.dart
View file @
bb8a123
...
...
@@ -22,11 +22,8 @@ void main() {
const
int
negative
=
-
1
;
const
int
outOfRange
=
4
;
expect
(()
=>
EncryptionType
.
fromRawValue
(
negative
),
EncryptionType
.
unknown
);
expect
(
()
=>
EncryptionType
.
fromRawValue
(
outOfRange
),
EncryptionType
.
unknown
,
);
expect
(
EncryptionType
.
fromRawValue
(
negative
),
EncryptionType
.
unknown
);
expect
(
EncryptionType
.
fromRawValue
(
outOfRange
),
EncryptionType
.
unknown
);
});
test
(
'can be converted to raw value'
,
()
{
...
...
test/enums/phone_type_test.dart
View file @
bb8a123
...
...
@@ -23,8 +23,8 @@ void main() {
const
int
negative
=
-
1
;
const
int
outOfRange
=
5
;
expect
(()
=>
PhoneType
.
fromRawValue
(
negative
),
PhoneType
.
unknown
);
expect
(()
=>
PhoneType
.
fromRawValue
(
outOfRange
),
PhoneType
.
unknown
);
expect
(
PhoneType
.
fromRawValue
(
negative
),
PhoneType
.
unknown
);
expect
(
PhoneType
.
fromRawValue
(
outOfRange
),
PhoneType
.
unknown
);
});
test
(
'can be converted to raw value'
,
()
{
...
...
Please
register
or
login
to post a comment