diff --git a/oqs/src/kem.rs b/oqs/src/kem.rs index 9f789068c0..061cb82a49 100644 --- a/oqs/src/kem.rs +++ b/oqs/src/kem.rs @@ -125,10 +125,10 @@ macro_rules! implement_kems { #[test] fn test_from_str() { let algo = Algorithm::$kem; - let name = algo.to_string(); + let name = algo.name(); let res = name.parse::(); if res.is_err() { - eprintln!("Failed to parse: {}", name); + assert!(false, "Failed to parse: {:?}", name); } let algo2 = res.unwrap(); assert_eq!(algo, algo2); diff --git a/oqs/src/sig.rs b/oqs/src/sig.rs index fd468ad256..959f64ba6b 100644 --- a/oqs/src/sig.rs +++ b/oqs/src/sig.rs @@ -126,10 +126,10 @@ macro_rules! implement_sigs { #[test] fn test_from_str() { let algo = Algorithm::$sig; - let name = algo.to_string(); + let name = algo.name(); let res = name.parse::(); if res.is_err() { - eprintln!("Failed to parse: {}", name); + assert!(false, "Failed to parse: {:?}", name); } let algo2 = res.unwrap(); assert_eq!(algo, algo2);