From 232ced8c8c352b2c8deeb693fddd735cca2b7be4 Mon Sep 17 00:00:00 2001 From: kongr45gpen <electrovesta@gmail.com> Date: Sun, 18 Nov 2018 15:53:18 +0200 Subject: [PATCH] Add basic style checking for tests and fix some issues --- ci/cppcheck.sh | 2 +- ci/vera.sh | 2 +- tests/Message.cpp | 2 +- tests/Services/TestService.cpp | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ci/cppcheck.sh b/ci/cppcheck.sh index a8335c61..6da4d336 100755 --- a/ci/cppcheck.sh +++ b/ci/cppcheck.sh @@ -10,4 +10,4 @@ echo -e "\033[0;34mRunning cppcheck...\033[0m" cd "$(dirname "$0")/.." -cppcheck --enable=all --error-exitcode=1 -I inc src +cppcheck --enable=all --error-exitcode=1 -I inc src tests diff --git a/ci/vera.sh b/ci/vera.sh index 9f7d0b6a..b758842f 100755 --- a/ci/vera.sh +++ b/ci/vera.sh @@ -10,4 +10,4 @@ echo -e "\033[0;34mRunning vera++...\033[0m" cd "$(dirname "$0")/.." -vera++ --error --profile custom `find src inc -type f -regextype posix-egrep -regex '.*\.(cpp|hpp|c|h)'` +vera++ --error --profile custom `find src inc tests -type f -regextype posix-egrep -regex '.*\.(cpp|hpp|c|h)'` diff --git a/tests/Message.cpp b/tests/Message.cpp index f7698e3b..dafd2c8d 100644 --- a/tests/Message.cpp +++ b/tests/Message.cpp @@ -68,7 +68,7 @@ TEST_CASE("Requirement 7.3.2 (Boolean)", "[message][ecss]") { REQUIRE(message.dataSize == 2); - CHECK(!message.readBoolean()); + CHECK_FALSE(message.readBoolean()); CHECK(message.readBoolean()); } diff --git a/tests/Services/TestService.cpp b/tests/Services/TestService.cpp index 0a5233a6..a94934ad 100644 --- a/tests/Services/TestService.cpp +++ b/tests/Services/TestService.cpp @@ -30,4 +30,3 @@ TEST_CASE("TM[17,3]", "[service][st17]") { REQUIRE(response.dataSize == 2); CHECK(response.readEnum16() == 40); } - -- GitLab