diff --git a/tests/AzimuthalIntegrationTest.cpp b/tests/AzimuthalIntegrationTest.cpp index efa0ea6d..caa10f5a 100644 --- a/tests/AzimuthalIntegrationTest.cpp +++ b/tests/AzimuthalIntegrationTest.cpp @@ -189,7 +189,10 @@ TEST_CASE("AzimuthalIntegrationProfile","[AzimuthalIntegration]") { REQUIRE(plot.GetPlots()[0].x.size() == mapping.GetBinNumber()); REQUIRE(plot.GetPlots()[0].y.size() == mapping.GetBinNumber()); - for (int i = 0; i < mapping.GetBinNumber(); i++) { + REQUIRE(plot.GetPlots()[0].x[0] == Catch::Approx(mapping.GetBinToQ()[0])); + REQUIRE(std::isnan(plot.GetPlots()[0].y[0])); + + for (int i = 1; i < mapping.GetBinNumber(); i++) { REQUIRE(plot.GetPlots()[0].x[i] == Catch::Approx(mapping.GetBinToQ()[i])); REQUIRE(plot.GetPlots()[0].y[i] == Catch::Approx(i * 4)); } @@ -209,8 +212,8 @@ TEST_CASE("AzimuthalIntegrationProfile_operatorAdd","[AzimuthalIntegration]") { std::vector count(mapping.GetBinNumber()); for (int i = 0; i < mapping.GetBinNumber(); i++) { - sum[i] = i * i * 4; - count[i] = i; + sum[i] = (i + 1) * i * 4; + count[i] = i + 1; } REQUIRE_NOTHROW(profile0.Add(sum, count)); REQUIRE_NOTHROW(profile1 += profile0);