-// Now we are ready to use `assert_eq!` to test `vec_min`. While we are at it, let's also follow the usual
-// Rust style of putting tests into a *submodule*, to avoid polluting the namespace. The attribute `cfg(test)`
-// at the submodule means that it will only be compiled when building the tests.
-#[cfg(test)]
-mod tests {
- use super::*;
-
- #[test]
- fn test_vec_min() {
- let b1 = BigInt::new(1);
- let b2 = BigInt::new(42);
- let b3 = BigInt::from_vec(vec![0, 1]);
-
- let v1 = vec![b2.clone(), b1.clone(), b3.clone()];
- let v2 = vec![b2.clone(), b3.clone()];
- assert_eq!(vec_min(&v1), Some(&b1));
- assert_eq!(vec_min(&v2), Some(&b2));
- }
+// Now we are ready to use `assert_eq!` to test `vec_min`.
+#[test]
+fn test_vec_min() {
+ let b1 = BigInt::new(1);
+ let b2 = BigInt::new(42);
+ let b3 = BigInt::from_vec(vec![0, 1]);
+
+ let v1 = vec![b2.clone(), b1.clone(), b3.clone()];
+ let v2 = vec![b2.clone(), b3.clone()];
+ assert_eq!(vec_min(&v1), Some(&b1));
+ assert_eq!(vec_min(&v2), Some(&b2));