MCPcopy Create free account
hub / github.com/PeterFWS/Structure-PLP-SLAM / TEST

Function TEST

test/PLPSLAM/util/random_array.cc:8–16  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6using namespace PLPSLAM;
7
8TEST(random_array, create_random_array_1)
9{
10 const auto array = util::create_random_array(5, 1, 5);
11
12 EXPECT_EQ(array.size(), 5);
13 // 重複なしのrandom arrayを作成しているので,最小値は1,最大値は5になるはず
14 EXPECT_EQ(*std::min_element(array.begin(), array.end()), 1);
15 EXPECT_EQ(*std::max_element(array.begin(), array.end()), 5);
16}
17
18TEST(random_array, create_random_array_2)
19{

Callers

nothing calls this directly

Calls 4

create_random_arrayFunction · 0.85
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected