67 std::vector<int> widths = { 100000, 150000, 200000, 250000, 400000 };
69 for(
int width : widths )
72 int minCornerRadius = width / 2;
75 BOOST_CHECK_GT( minCornerRadius, 0 );
76 BOOST_CHECK_LE( minCornerRadius, width );
79 width, minCornerRadius ) );
96 int minCornerRadius = width / 2;
110 std::vector<TestCase> testCases = {
111 { 500000, 600000,
true },
112 { 250000, 600000,
true },
113 { 500000, 250000,
true },
114 { 250000, 250000,
true },
115 { 200000, 600000,
false },
116 { 500000, 200000,
false },
119 for(
const auto& tc : testCases )
122 int maxCrFromAmp = tc.amplitude / 2;
123 int maxCrFromSpacing = tc.spacing / 2;
124 int maxCr = std::min( maxCrFromAmp, maxCrFromSpacing );
126 bool wouldFit = maxCr >= minCornerRadius;
131 "amp=%d, spacing=%d: maxCr=%d, minRequired=%d, fits=%s (expected %s)",
132 tc.amplitude, tc.spacing, maxCr, minCornerRadius,
133 wouldFit ?
"yes" :
"no", tc.shouldFit ?
"yes" :
"no" ) );
BOOST_CHECK_EQUAL(result, "25.4")