diff --git a/src/swcio.cpp b/src/swcio.cpp index 63eae66d5dd07ed1ccae74cc686c0d3e07977475..e87eaa1846458f9d00d9b97e7c8c3de4bfc54a2a 100644 --- a/src/swcio.cpp +++ b/src/swcio.cpp @@ -1,7 +1,9 @@ +#include <algorithm> #include <iomanip> #include <map> #include <sstream> #include <unordered_set> + #include <swcio.hpp> namespace nestmc @@ -38,7 +40,7 @@ void cell_record::check_consistency() const if (id_ < 0) { throw std::invalid_argument("negative ids not allowed"); } - + if (parent_id_ < -1) { throw std::invalid_argument("parent_id < -1 not allowed"); } diff --git a/tests/test_swcio.cpp b/tests/test_swcio.cpp index 975840f79712e0b3bd22a2b9e0e990f1238d1925..9d2d0b21781e1f1f20d7026050dd96f070bd9be4 100644 --- a/tests/test_swcio.cpp +++ b/tests/test_swcio.cpp @@ -224,7 +224,7 @@ TEST(swc_parser, from_allen_db) TEST(swc_parser, input_cleaning) { using namespace nestmc::io; - + { // Check duplicates std::stringstream is; @@ -234,7 +234,7 @@ TEST(swc_parser, input_cleaning) is << "2 1 14.566132 34.873772 7.857000 0.717830 1\n"; auto cells = swc_read_cells(is); - EXPECT_EQ(2, cells.size()); + EXPECT_EQ(2u, cells.size()); } { @@ -246,7 +246,7 @@ TEST(swc_parser, input_cleaning) is << "4 1 14.566132 34.873772 7.857000 0.717830 1\n"; auto cells = swc_read_cells(is); - EXPECT_EQ(2, cells.size()); + EXPECT_EQ(2u, cells.size()); } { @@ -259,8 +259,8 @@ TEST(swc_parser, input_cleaning) std::array<cell_record::id_type, 4> expected_id_list = {{ 0, 1, 2, 3 }}; auto cells = swc_read_cells(is); - ASSERT_EQ(4, cells.size()); - + ASSERT_EQ(4u, cells.size()); + auto expected_id = expected_id_list.cbegin(); for (const auto &c : cells) { EXPECT_EQ(*expected_id, c.id()); @@ -283,7 +283,7 @@ TEST(swc_parser, input_cleaning) {{ 0, 1, 2, 3, 4, 5 }}; std::array<cell_record::id_type, 6> expected_parent_list = {{ -1, 0, 1, 1, 0, 4 }}; - ASSERT_EQ(6, cells.size()); + ASSERT_EQ(6u, cells.size()); auto expected_id = expected_id_list.cbegin(); auto expected_parent = expected_parent_list.cbegin(); @@ -293,7 +293,7 @@ TEST(swc_parser, input_cleaning) ++expected_id; ++expected_parent; } - + } } diff --git a/vector b/vector index 9c86d0a84efed0dd739888503d275378df67fe71..a8dfadd460262ebbc1bc22b159efe9e33ad1d359 160000 --- a/vector +++ b/vector @@ -1 +1 @@ -Subproject commit 9c86d0a84efed0dd739888503d275378df67fe71 +Subproject commit a8dfadd460262ebbc1bc22b159efe9e33ad1d359