kani: Rename tests

The tests currently include the word "add" but they test addition as
well as subtraction. Elect to keep the multiple assertions per test and
just make the names more general.
This commit is contained in:
Tobin C. Harding 2024-04-16 10:03:26 +10:00
parent 17bacc6fb6
commit 5981b15902
No known key found for this signature in database
GPG Key ID: 40BF9E4C269D6607
1 changed files with 4 additions and 4 deletions

View File

@ -1902,7 +1902,7 @@ mod verification {
// CI it fails, so we need to set it higher. // CI it fails, so we need to set it higher.
#[kani::unwind(4)] #[kani::unwind(4)]
#[kani::proof] #[kani::proof]
fn u_amount_add_homomorphic() { fn u_amount_homomorphic() {
let n1 = kani::any::<u64>(); let n1 = kani::any::<u64>();
let n2 = kani::any::<u64>(); let n2 = kani::any::<u64>();
kani::assume(n1.checked_add(n2).is_some()); // assume we don't overflow in the actual test kani::assume(n1.checked_add(n2).is_some()); // assume we don't overflow in the actual test
@ -1932,7 +1932,7 @@ mod verification {
#[kani::unwind(4)] #[kani::unwind(4)]
#[kani::proof] #[kani::proof]
fn u_amount_add_homomorphic_checked() { fn u_amount_homomorphic_checked() {
let n1 = kani::any::<u64>(); let n1 = kani::any::<u64>();
let n2 = kani::any::<u64>(); let n2 = kani::any::<u64>();
assert_eq!( assert_eq!(
@ -1947,7 +1947,7 @@ mod verification {
#[kani::unwind(4)] #[kani::unwind(4)]
#[kani::proof] #[kani::proof]
fn s_amount_add_homomorphic() { fn s_amount_homomorphic() {
let n1 = kani::any::<i64>(); let n1 = kani::any::<i64>();
let n2 = kani::any::<i64>(); let n2 = kani::any::<i64>();
kani::assume(n1.checked_add(n2).is_some()); // assume we don't overflow in the actual test kani::assume(n1.checked_add(n2).is_some()); // assume we don't overflow in the actual test
@ -1980,7 +1980,7 @@ mod verification {
#[kani::unwind(4)] #[kani::unwind(4)]
#[kani::proof] #[kani::proof]
fn s_amount_add_homomorphic_checked() { fn s_amount_homomorphic_checked() {
let n1 = kani::any::<i64>(); let n1 = kani::any::<i64>();
let n2 = kani::any::<i64>(); let n2 = kani::any::<i64>();
assert_eq!( assert_eq!(