Skip to content

Commit

Permalink
Add negative integer int key check
Browse files Browse the repository at this point in the history
  • Loading branch information
maurolacy committed Dec 23, 2021
1 parent db38562 commit 036beb1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/storage-plus/src/keys_old.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ mod test {
assert_eq!(1, path.len());
assert_eq!(4242i32.to_be_bytes(), path[0].as_ref());

// let k: IntKeyOld<i32> = -4242i32.into();
// let path = k.key();
// assert_eq!(1, path.len());
// assert_eq!((-4242i32).to_be_bytes(), path[0].as_ref());
let k: IntKeyOld<i32> = IntKeyOld::<i32>::from(-4242i32);
let path = k.key();
assert_eq!(1, path.len());
assert_eq!((-4242i32).to_be_bytes(), path[0].as_ref());
}
}

0 comments on commit 036beb1

Please sign in to comment.