File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -803,7 +803,7 @@ mod proofs {
803
803
let same = Step :: forward ( start, 0 ) ;
804
804
assert ! ( start == same) ;
805
805
806
- // Verify that we can add 1 to any address .
806
+ // Manually calculate the expected address after stepping once .
807
807
let expected = match start_raw {
808
808
// Adding 1 to addresses in this range don't require gap jumps, so
809
809
// we can just add 1.
@@ -818,6 +818,11 @@ mod proofs {
818
818
// Adding 1 to this address causes an overflow.
819
819
0xffff_ffff_ffff_ffff => None ,
820
820
} ;
821
+ if let Some ( expected) = expected {
822
+ // Verify that `expected` is a valid address.
823
+ assert ! ( VirtAddr :: try_new( expected) . is_ok( ) ) ;
824
+ }
825
+ // Verify `forward_checked`.
821
826
let next = Step :: forward_checked ( start, 1 ) ;
822
827
assert ! ( next. map( VirtAddr :: as_u64) == expected) ;
823
828
}
You can’t perform that action at this time.
0 commit comments