]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/test/common/test_random.cc
import 15.2.0 Octopus source
[ceph.git] / ceph / src / test / common / test_random.cc
index 85bb732b4752d434094db3bba0844cf89c40294f..667b69c789ee4c7b9442e6255b488c8cf51a7e4e 100644 (file)
@@ -152,12 +152,6 @@ TEST(util, test_random)
     type_check_ok(min, max);
   }
  
-  // min > max should not explode:
-  {
-    float min = 1.0, max = 0.0;
-    type_check_ok(min, max);
-  }
-
   // When combining types, everything should convert to the largest type:
   {
     // Check with integral types:
@@ -200,6 +194,17 @@ TEST(util, test_random_class_interface)
     ceph::util::random_number_generator<int> rng(1234);   // seed
   }
  
+  // Test deduction guides:
+  {
+    { ceph::util::random_number_generator rng(1234); }
+    { ceph::util::random_number_generator rng(1234.1234); }
+
+    {
+    int x = 1234;
+    ceph::util::random_number_generator rng(x);
+    }
+  }
+
   {
     int a = rng_i();
     int b = rng_i();