Skip to content

Commit 10fd5e8

Browse files
committed
assert the test for Bézout coefficients
1 parent 6d20102 commit 10fd5e8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -631,12 +631,13 @@ macro_rules! impl_integer_for_isize {
631631

632632
#[test]
633633
fn test_extended_gcd_lcm() {
634+
use std::fmt::Debug;
634635
use traits::NumAssign;
635636
use ExtendedGcd;
636637

637-
fn check<A: Copy + Integer + NumAssign>(a: A, b: A) -> bool {
638+
fn check<A: Copy + Debug + Integer + NumAssign>(a: A, b: A) {
638639
let ExtendedGcd { gcd, x, y, .. } = a.extended_gcd(&b);
639-
gcd == x * a + y * b
640+
assert_eq!(gcd, x * a + y * b);
640641
}
641642

642643
use core::iter::once;

0 commit comments

Comments
 (0)