summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Jamroot.jam3
-rw-r--r--slicer/ice/testSpecifics.cpp4
-rw-r--r--slicer/json/testSpecifics.cpp3
-rw-r--r--slicer/test/compilation.cpp2
-rw-r--r--slicer/test/preprocessor.cpp6
-rw-r--r--slicer/xml/serializer.cpp6
-rw-r--r--slicer/xml/testSpecifics.cpp3
7 files changed, 17 insertions, 10 deletions
diff --git a/Jamroot.jam b/Jamroot.jam
index b1dc307..63b7689 100644
--- a/Jamroot.jam
+++ b/Jamroot.jam
@@ -67,7 +67,10 @@ project
<toolset>tidy:<exclude>db/bin/tidy/debug/checker-none/cxxstd-17-iso/visibility-hidden/testModels.h
<toolset>tidy:<exclude>ice/cpp/*
<toolset>tidy:<define>ICE_IGNORE_VERSION
+ <toolset>tidy:<define>ICE_MEMBER
<toolset>tidy:<define>__x86_64
+ <toolset>tidy:<librarydef>boost
+ <toolset>tidy:<librarydef>std
;
build-project slicer ;
diff --git a/slicer/ice/testSpecifics.cpp b/slicer/ice/testSpecifics.cpp
index 50742e4..3786112 100644
--- a/slicer/ice/testSpecifics.cpp
+++ b/slicer/ice/testSpecifics.cpp
@@ -1,10 +1,12 @@
#define BOOST_TEST_MODULE ice_specifics
-#include "serializer.h"
#include <boost/test/unit_test.hpp>
+
+#include "serializer.h"
#include <slicer.h>
#include <types.h>
// LCOV_EXCL_START
+// cppcheck-suppress unknownMacro
BOOST_TEST_DONT_PRINT_LOG_VALUE(TestModule::IsoDate)
// LCOV_EXCL_STOP
diff --git a/slicer/json/testSpecifics.cpp b/slicer/json/testSpecifics.cpp
index ba85e5e..92c699b 100644
--- a/slicer/json/testSpecifics.cpp
+++ b/slicer/json/testSpecifics.cpp
@@ -1,6 +1,7 @@
#define BOOST_TEST_MODULE json_specifics
-#include "serializer.h"
#include <boost/test/unit_test.hpp>
+
+#include "serializer.h"
#include <slicer/slicer.h>
#include <types.h>
diff --git a/slicer/test/compilation.cpp b/slicer/test/compilation.cpp
index c633fd4..42f0759 100644
--- a/slicer/test/compilation.cpp
+++ b/slicer/test/compilation.cpp
@@ -7,7 +7,9 @@
#include <types.h>
// LCOV_EXCL_START
+// cppcheck-suppress unknownMacro
BOOST_TEST_DONT_PRINT_LOG_VALUE(std::type_info)
+// cppcheck-suppress unknownMacro
BOOST_TEST_DONT_PRINT_LOG_VALUE(Slicer::ModelPartType)
// LCOV_EXCL_STOP
diff --git a/slicer/test/preprocessor.cpp b/slicer/test/preprocessor.cpp
index 506eb1e..463683c 100644
--- a/slicer/test/preprocessor.cpp
+++ b/slicer/test/preprocessor.cpp
@@ -28,11 +28,9 @@ total()
void
process(Slicer::Slicer & s, const ComponentsCount::value_type & c)
{
-#if BOOST_VERSION / 100 >= 1060
- BOOST_TEST_CONTEXT(c.first)
-#endif
- {
+ BOOST_TEST_CONTEXT(c.first) {
s.slicePath = rootDir / c.first;
+ // cppcheck-suppress assertWithSideEffect
BOOST_REQUIRE_EQUAL(c.second, s.Execute());
}
}
diff --git a/slicer/xml/serializer.cpp b/slicer/xml/serializer.cpp
index ad55ae5..1ac6a63 100644
--- a/slicer/xml/serializer.cpp
+++ b/slicer/xml/serializer.cpp
@@ -222,14 +222,14 @@ namespace Slicer {
{
auto node = element->get_first_child();
while (node) {
- if (auto element = dynamic_cast<const xmlpp::Element *>(node)) {
+ if (auto childElement = dynamic_cast<const xmlpp::Element *>(node)) {
auto emp = dict->GetAnonChild();
emp->Create();
auto key = emp->GetChild(keyName);
auto value = emp->GetChildRef(valueName);
- key->SetValue(XmlValueSource(element->get_name()));
+ key->SetValue(XmlValueSource(childElement->get_name()));
key->Complete();
- DocumentTreeIterateElement(element, value.Child(), value);
+ DocumentTreeIterateElement(childElement, value.Child(), value);
emp->Complete();
}
node = node->get_next_sibling();
diff --git a/slicer/xml/testSpecifics.cpp b/slicer/xml/testSpecifics.cpp
index 16bfab3..d2c2d22 100644
--- a/slicer/xml/testSpecifics.cpp
+++ b/slicer/xml/testSpecifics.cpp
@@ -1,6 +1,7 @@
#define BOOST_TEST_MODULE xml_specifics
-#include "serializer.h"
#include <boost/test/unit_test.hpp>
+
+#include "serializer.h"
#include <libxml++/parsers/domparser.h>
#include <slicer/slicer.h>
#include <types.h>