Skip to content

Commit d246c92

Browse files
committed
small fixes
1 parent 55d00d4 commit d246c92

5 files changed

Lines changed: 12 additions & 33 deletions

File tree

include/gl/util/ranges.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ template <std::ranges::forward_range R>
3939
inline constexpr auto deref_view =
4040
std::views::transform([](auto&& p) -> decltype(auto) { return *p; });
4141

42-
// TODO: add tests
43-
4442
/// @brief A view concatenating two ranges sequentially (C++20 polyfill for C++26 `std::views::concat`).
4543
///
4644
/// @warning **GCC 13/14 Bug:** Using branching views (like this or `std::ranges::filter_view`)

tests/include/testing/common/wrnsup.hpp

Lines changed: 0 additions & 20 deletions
This file was deleted.

tests/source/gl/test_flat_jagged_vector.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include "doctest.h"
2-
#include "testing/common/wrnsup.hpp"
32

3+
#include <gl/attributes/diagnostics.hpp>
44
#include <gl/types/flat_jagged_vector.hpp>
55

66
#include <algorithm>
@@ -92,9 +92,9 @@ TEST_CASE_FIXTURE(
9292
sut.push_back({1, 2, 3});
9393
sut.push_back({4, 5});
9494

95-
SUPPRESS_WARNING_BEGIN("-Wself-move");
95+
GL_SUPPRESS_WARNING_BEGIN("-Wself-move");
9696
sut = std::move(sut);
97-
SUPPRESS_WARNING_END;
97+
GL_SUPPRESS_WARNING_END;
9898

9999
CHECK_EQ(sut.size(), 2uz);
100100
CHECK_EQ(sut.data_size(), 5uz);

tests/source/gl/test_flat_matrix.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include "doctest.h"
2-
#include "testing/common/wrnsup.hpp"
32

3+
#include <gl/attributes/diagnostics.hpp>
44
#include <gl/types/flat_matrix.hpp>
55

66
#include <algorithm>
@@ -98,9 +98,9 @@ TEST_CASE_FIXTURE(
9898
sut.push_row({1, 2, 3});
9999
sut.push_row({4, 5, 6});
100100

101-
SUPPRESS_WARNING_BEGIN("-Wself-move");
101+
GL_SUPPRESS_WARNING_BEGIN("-Wself-move");
102102
sut = std::move(sut);
103-
SUPPRESS_WARNING_END;
103+
GL_SUPPRESS_WARNING_END;
104104

105105
CHECK_EQ(sut.size(), 2uz);
106106
CHECK_EQ(sut.n_rows(), 2uz);

tests/source/hgl/test_hypergraph.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
#include "doctest.h"
2-
#include "testing/common/wrnsup.hpp"
32
#include "testing/hgl/constants.hpp"
43
#include "testing/hgl/types.hpp"
54

5+
#include <gl/attributes/diagnostics.hpp>
6+
67
#include <hgl/directional_tags.hpp>
78
#include <hgl/hypergraph.hpp>
89
#include <hgl/hypergraph_traits.hpp>
@@ -524,7 +525,7 @@ TEST_CASE_TEMPLATE_DEFINE(
524525
}
525526

526527
SUBCASE("incident_hyperedges and degree should throw if the given vertex (id) is invalid") {
527-
SUPPRESS_WARNING_BEGIN("-Warray-bounds");
528+
GL_SUPPRESS_WARNING_BEGIN("-Warray-bounds");
528529

529530
sut_type sut{constants::n_vertices, constants::n_hyperedges};
530531
CHECK_THROWS_AS(
@@ -535,7 +536,7 @@ TEST_CASE_TEMPLATE_DEFINE(
535536
static_cast<void>(sut.degree(vertex_type{constants::out_of_rng_vid})), std::out_of_range
536537
);
537538

538-
SUPPRESS_WARNING_END;
539+
GL_SUPPRESS_WARNING_END;
539540
}
540541

541542
SUBCASE("incident_hyperedges should return an empty view by default and degree should return 0 "
@@ -656,7 +657,7 @@ TEST_CASE_TEMPLATE_DEFINE(
656657

657658
SUBCASE("incident_vertices and hyperedge_size should throw if the given hyperedge (id) is "
658659
"invalid") {
659-
SUPPRESS_WARNING_BEGIN("-Warray-bounds");
660+
GL_SUPPRESS_WARNING_BEGIN("-Warray-bounds");
660661

661662
sut_type sut{constants::n_vertices, constants::n_hyperedges};
662663
CHECK_THROWS_AS(
@@ -668,7 +669,7 @@ TEST_CASE_TEMPLATE_DEFINE(
668669
std::out_of_range
669670
);
670671

671-
SUPPRESS_WARNING_END;
672+
GL_SUPPRESS_WARNING_END;
672673
}
673674

674675
SUBCASE("incident_vertices should return an empty view by default and hyperedge_size should "

0 commit comments

Comments
 (0)