aboutsummaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/device.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/tests/device.rs b/src/tests/device.rs
index 60ca33a..c2c5336 100644
--- a/src/tests/device.rs
+++ b/src/tests/device.rs
@@ -33,6 +33,10 @@ fn connect_pro() {
assert!(::connect().is_ok());
assert!(::Pro::connect().is_ok());
assert!(::Storage::connect().is_err());
+ match ::connect().unwrap() {
+ ::DeviceWrapper::Pro(_) => assert!(true),
+ ::DeviceWrapper::Storage(_) => assert!(false),
+ };
}
#[test]
@@ -41,6 +45,10 @@ fn connect_storage() {
assert!(::connect().is_ok());
assert!(::Pro::connect().is_err());
assert!(::Storage::connect().is_ok());
+ match ::connect().unwrap() {
+ ::DeviceWrapper::Pro(_) => assert!(false),
+ ::DeviceWrapper::Storage(_) => assert!(true),
+ };
}
fn assert_empty_serial_number() {