szaszm commented on a change in pull request #918:
URL: https://github.com/apache/nifi-minifi-cpp/pull/918#discussion_r501032041



##########
File path: libminifi/test/unit/GeneralUtilsTest.cpp
##########
@@ -32,18 +32,20 @@ TEST_CASE("GeneralUtils::make_unique", "[make_unique]") {
   REQUIRE("test string" == *pstr);
 }
 
-TEST_CASE("GeneralUtils::intdiv_ceil", "[intdiv_ceil]") {
-  REQUIRE(0 == utils::intdiv_ceil(0, 1));
-  REQUIRE(0 == utils::intdiv_ceil(0, 2));
-  REQUIRE(1 == utils::intdiv_ceil(1, 2));
-  REQUIRE(1 == utils::intdiv_ceil(1, 3));
-  REQUIRE(1 == utils::intdiv_ceil(3, 3));
-  REQUIRE(2 == utils::intdiv_ceil(4, 3));
-  REQUIRE(2 == utils::intdiv_ceil(4, 3));
-  REQUIRE(0 == utils::intdiv_ceil(-1, 3));
-  REQUIRE(-1 == utils::intdiv_ceil(-3, 3));
-  REQUIRE(-1 == utils::intdiv_ceil(-4, 3));
-}
+static_assert(0 == utils::intdiv_ceil(0, 1), "");
+static_assert(0 == utils::intdiv_ceil(0, 2), "");
+static_assert(1 == utils::intdiv_ceil(1, 2), "");
+static_assert(1 == utils::intdiv_ceil(1, 3), "");
+static_assert(1 == utils::intdiv_ceil(3, 3), "");
+static_assert(2 == utils::intdiv_ceil(4, 3), "");
+static_assert(2 == utils::intdiv_ceil(4, 3), "");
+static_assert(0 == utils::intdiv_ceil(-1, 3), "");
+static_assert(-1 == utils::intdiv_ceil(-3, 3), "");
+static_assert(-1 == utils::intdiv_ceil(-4, 3), "");
+static_assert(2 == utils::intdiv_ceil(-4, -3), "");
+static_assert(2 == utils::intdiv_ceil(-5, -3), "");
+static_assert(0 == utils::intdiv_ceil(1, -3), "");
+static_assert(-1 == utils::intdiv_ceil(5, -3), "");

Review comment:
       I hope you don't mind me setting you as the author of b11f101 as you 
basically submitted the whole code above




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to