MCPcopy Create free account
hub / github.com/colmap/colmap / TEST

Function TEST

src/colmap/math/random_test.cc:42–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40namespace {
41
42TEST(PRNGSeed, Nominal) {
43 EXPECT_TRUE(PRNG == nullptr);
44 SetPRNGSeed();
45 EXPECT_TRUE(PRNG != nullptr);
46 SetPRNGSeed(0);
47 EXPECT_TRUE(PRNG != nullptr);
48 std::thread thread([]() {
49 // Each thread defines their own PRNG instance.
50 EXPECT_TRUE(PRNG == nullptr);
51 SetPRNGSeed();
52 EXPECT_TRUE(PRNG != nullptr);
53 SetPRNGSeed(0);
54 EXPECT_TRUE(PRNG != nullptr);
55 });
56 thread.join();
57}
58
59TEST(Repeatability, Nominal) {
60 constexpr size_t kNumPoints = 100;

Callers

nothing calls this directly

Calls 10

SetPRNGSeedFunction · 0.85
RandomUniformIntegerFunction · 0.85
RandomUniformRealFunction · 0.85
RandomGaussianFunction · 0.85
MeanFunction · 0.85
StdDevFunction · 0.85
ShuffleFunction · 0.85
sizeMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected