mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
factor::numeric::gcd: Add explicit test for the 0 case
This commit is contained in:
@@ -72,6 +72,10 @@ mod tests {
|
||||
gcd(1, a) == 1
|
||||
}
|
||||
|
||||
fn zero(a: u64) -> bool {
|
||||
gcd(0, a) == a
|
||||
}
|
||||
|
||||
fn divisor(a: u64, b: u64) -> bool {
|
||||
// Test that gcd(a, b) divides a and b
|
||||
let g = gcd(a, b);
|
||||
|
||||
Reference in New Issue
Block a user