lordgamez commented on code in PR #1671:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1671#discussion_r1341006225
##########
extensions/expression-language/tests/ExpressionLanguageTests.cpp:
##########
@@ -1321,13 +1321,13 @@ TEST_CASE("Now Date", "[expressionNowDate]") {
TEST_CASE("Parse RFC3339 with Expression Language toDate") {
using date::sys_days;
using org::apache::nifi::minifi::utils::timeutils::parseRfc3339;
- using namespace date::literals;
+ using namespace date::literals; // NOLINT(google-build-using-namespace)
using namespace std::literals::chrono_literals;
using std::chrono::milliseconds;
- milliseconds expected_second =
std::chrono::floor<milliseconds>((sys_days(2023_y / 03 / 01) + 19h + 04min +
55s).time_since_epoch());
- milliseconds expected_tenth_second =
std::chrono::floor<milliseconds>((sys_days(2023_y / 03 / 01) + 19h + 04min +
55s + 100ms).time_since_epoch());
- milliseconds expected_milli_second =
std::chrono::floor<milliseconds>((sys_days(2023_y / 03 / 01) + 19h + 04min +
55s + 190ms).time_since_epoch());
+ milliseconds expected_second =
std::chrono::floor<milliseconds>((sys_days{2023_y / 03 / 01} + 19h + 04min +
55s).time_since_epoch()); // NOLINT(whitespace/braces)
+ milliseconds expected_tenth_second =
std::chrono::floor<milliseconds>((sys_days{2023_y / 03 / 01} + 19h + 04min +
55s + 100ms).time_since_epoch()); // NOLINT(whitespace/braces)
+ milliseconds expected_milli_second =
std::chrono::floor<milliseconds>((sys_days{2023_y / 03 / 01} + 19h + 04min +
55s + 190ms).time_since_epoch()); // NOLINT(whitespace/braces)
Review Comment:
I think the clang-tidy check returned false positive here as it recognized
this call as a C-style cast and warned for it, this change was meant to avoid
that warning.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]