We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 578da35 commit 0f54b08Copy full SHA for 0f54b08
aave-core/aave-math/tests/wad_ray_math_tests.move
@@ -454,4 +454,13 @@ module aave_math::wad_ray_math_tests {
454
let b = 1;
455
ray_div_down(a, b);
456
}
457
+
458
+ #[test]
459
+ #[expected_failure(abort_code = EOVERFLOW, location = aave_math::wad_ray_math)]
460
+ fun test_ray_mul_down_overflow() {
461
+ // a * b overflows at a = floor(U256_MAX / b) + 1 (choose b > 0)
462
+ let b = 1000000000000000000000000000; // 1 RAY
463
+ let a = get_u256_max_for_testing() / b + 1;
464
+ ray_mul_down(a, b);
465
+ }
466
0 commit comments