Fix tests.
This commit is contained in:
parent
b427a9d2e7
commit
308210e615
2 changed files with 5 additions and 4 deletions
|
@ -112,7 +112,7 @@ mod test {
|
||||||
0x1,
|
0x1,
|
||||||
];
|
];
|
||||||
|
|
||||||
let ai = AlgoInfo::try_from(data.to_vec()).unwrap();
|
let ai = AlgoInfo::try_from(&data[..]).unwrap();
|
||||||
|
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
ai,
|
ai,
|
||||||
|
@ -206,7 +206,7 @@ mod test {
|
||||||
0xd,
|
0xd,
|
||||||
];
|
];
|
||||||
|
|
||||||
let ai = AlgoInfo::try_from(data.to_vec()).unwrap();
|
let ai = AlgoInfo::try_from(&data[..]).unwrap();
|
||||||
|
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
ai,
|
ai,
|
||||||
|
@ -360,7 +360,7 @@ mod test {
|
||||||
0x4, 0x1, 0x97, 0x55, 0x1, 0x5, 0x1,
|
0x4, 0x1, 0x97, 0x55, 0x1, 0x5, 0x1,
|
||||||
];
|
];
|
||||||
|
|
||||||
let ai = AlgoInfo::try_from(data.to_vec()).unwrap();
|
let ai = AlgoInfo::try_from(&data[..]).unwrap();
|
||||||
|
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
ai,
|
ai,
|
||||||
|
|
|
@ -101,12 +101,13 @@ mod test {
|
||||||
use crate::parse::extended_cap::{ExtendedCap, Features};
|
use crate::parse::extended_cap::{ExtendedCap, Features};
|
||||||
use hex_literal::hex;
|
use hex_literal::hex;
|
||||||
use std::collections::HashSet;
|
use std::collections::HashSet;
|
||||||
|
use std::convert::TryFrom;
|
||||||
use std::iter::FromIterator;
|
use std::iter::FromIterator;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_ec() {
|
fn test_ec() {
|
||||||
let data = hex!("7d 00 0b fe 08 00 00 ff 00 00");
|
let data = hex!("7d 00 0b fe 08 00 00 ff 00 00");
|
||||||
let ec = ExtendedCap::from(&data).unwrap();
|
let ec = ExtendedCap::try_from(&data[..]).unwrap();
|
||||||
|
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
ec,
|
ec,
|
||||||
|
|
Loading…
Reference in a new issue