TerrainGen coverage


terraingen/
Coverage:
low: ≥ 0%
medium: ≥ 75.0%
high: ≥ 90.0%
Lines:
9 / 9
100.0%
Branches:
8 / 8
100.0%
Functions:
1 / 1
100.0%

distribution/synthterrain.cpp
Line Branch Exec Source
1 #include "terraingen/distribution/synthterrain.h"
2
3 #include <stdexcept>
4
5 namespace terraingen {
6
7 15 std::shared_ptr<PowerLawSfd> SynthterrainBoulderDistribution(SynthterrainBoulders boulders) {
8
4/4
✓ Branch 0 taken 4 times.
✓ Branch 1 taken 7 times.
✓ Branch 2 taken 3 times.
✓ Branch 3 taken 1 time.
15 switch (boulders) {
9 4 case SynthterrainBoulders::InterCrater:
10
1/1
✓ Branch 1 taken 4 times.
8 return std::make_shared<PowerLawSfd>(0.0001, 1.75457);
11 7 case SynthterrainBoulders::Haworth:
12
1/1
✓ Branch 1 taken 7 times.
14 return std::make_shared<PowerLawSfd>(0.002, 2.6607);
13 3 case SynthterrainBoulders::ViperSpecification:
14
1/1
✓ Branch 1 taken 3 times.
6 return std::make_shared<PowerLawSfd>(0.0003, 2.482);
15 }
16
1/1
✓ Branch 2 taken 1 time.
1 throw std::invalid_argument("Unknown synthterrain boulder distribution");
17 }
18
19 } // namespace terraingen
20