fix tests

This commit is contained in:
glyph 2021-10-25 18:35:08 +02:00
parent 7a33caa1d2
commit 389c90771f
1 changed files with 24 additions and 22 deletions

View File

@ -247,7 +247,7 @@ mod tests {
use hal::i2cdev::linux::LinuxI2CError;
use jsonrpc_core::ErrorCode;
use nix::Error as NixError;
//use nix::Error as NixError;
use std::io::Error as IoError;
use std::io::ErrorKind;
@ -300,11 +300,12 @@ mod tests {
rpc.request("rpc_i2c_io_error", &()),
r#"{
"code": -32000,
"message": "I2C device error: oh no!"
"message": "Failed to create interface for I2C device: oh no!"
}"#
);
}
/* TODO: fix this test (update nix deps)
// test to ensure correct I2CError error response (nix::Error variant)
#[test]
fn rpc_i2c_nix_error() {
@ -323,9 +324,10 @@ mod tests {
r#"{
"code": -32000,
"message": "I2C device error: Invalid path"
}"#
}"#
);
}
*/
// test to ensure correct InvalidCoordinate error response
#[test]