71 std::vector<int> widths = { 100000, 150000, 200000, 250000, 400000 };
73 for(
int width : widths )
76 int minCornerRadius = width / 2;
79 BOOST_CHECK_GT( minCornerRadius, 0 );
80 BOOST_CHECK_LE( minCornerRadius, width );
83 width, minCornerRadius ) );
100 int minCornerRadius = width / 2;
114 std::vector<TestCase> testCases = {
115 { 500000, 600000,
true },
116 { 250000, 600000,
true },
117 { 500000, 250000,
true },
118 { 250000, 250000,
true },
119 { 200000, 600000,
false },
120 { 500000, 200000,
false },
123 for(
const auto& tc : testCases )
126 int maxCrFromAmp = tc.amplitude / 2;
127 int maxCrFromSpacing = tc.spacing / 2;
128 int maxCr = std::min( maxCrFromAmp, maxCrFromSpacing );
130 bool wouldFit = maxCr >= minCornerRadius;
135 "amp=%d, spacing=%d: maxCr=%d, minRequired=%d, fits=%s (expected %s)",
136 tc.amplitude, tc.spacing, maxCr, minCornerRadius,
137 wouldFit ?
"yes" :
"no", tc.shouldFit ?
"yes" :
"no" ) );
BOOST_CHECK_EQUAL(result, "25.4")