]> git.lizzy.rs Git - rust.git/commitdiff
deduplicate tests
authorRalf Jung <post@ralfj.de>
Wed, 15 May 2019 12:45:15 +0000 (14:45 +0200)
committerRalf Jung <post@ralfj.de>
Wed, 15 May 2019 16:12:58 +0000 (18:12 +0200)
test-cargo-miri/tests/test.rs

index ce15824f94a225dada3bf6b3e45abdac62083ee1..b4f5563a3a8bcb1212ba05f323b6945bbdf3e8c9 100644 (file)
@@ -1,5 +1,7 @@
 use rand::{SeedableRng, FromEntropy, Rng, rngs::SmallRng};
 
+// Having more than 1 test does seem to make a difference
+// (i.e., this calls ptr::swap which having just one test does not).
 #[test]
 fn simple() {
     assert_eq!(4, 4);
@@ -7,14 +9,6 @@ fn simple() {
 
 // Having more than 1 test does seem to make a difference
 // (i.e., this calls ptr::swap which having just one test does not).
-#[test]
-fn fixed_rng() {
-    let mut rng = rand::rngs::StdRng::seed_from_u64(0xdeadcafe);
-    let x: u32 = rng.gen();
-    let y: u32 = rng.gen();
-    assert_ne!(x, y);
-}
-
 #[test]
 fn entropy_rng() {
     // Use this opportunity to test querying the RNG (needs an external crate, hence tested here and not in the compiletest suite)