Skip to content

Commit

Permalink
De-cluttering test printouts
Browse files Browse the repository at this point in the history
- Removed unnecessary test printouts in the code
- Updated vcpkgGitCommitId to ae360361a434310ffee36d84eb01c033b648fb22 in multiple workflows
- Modified classify_cells function to be const
  • Loading branch information
acgetchell committed Oct 10, 2023
1 parent 5eb1578 commit 09d913d
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codecov-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Restore artifacts or setup vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: 7e4d2ff73b643ca2c685c6cfe0783a0f62cfb15c
vcpkgGitCommitId: ae360361a434310ffee36d84eb01c033b648fb22

- name: Configure
run: cmake -G Ninja -D CMAKE_BUILD_TYPE=RelWithDebInfo -D ENABLE_TESTING:BOOL=TRUE -D ENABLE_COVERAGE:BOOL=TRUE -S . -B build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
- name: Restore artifacts or setup vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: 7e4d2ff73b643ca2c685c6cfe0783a0f62cfb15c
vcpkgGitCommitId: ae360361a434310ffee36d84eb01c033b648fb22

- name: Configure
run: cmake --preset=build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux-clang-pkgx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Restore artifacts or setup vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: 7e4d2ff73b643ca2c685c6cfe0783a0f62cfb15c
vcpkgGitCommitId: ae360361a434310ffee36d84eb01c033b648fb22

- name: Configure
run: cmake --preset=build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux-clang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Restore artifacts or setup vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: 7e4d2ff73b643ca2c685c6cfe0783a0f62cfb15c
vcpkgGitCommitId: ae360361a434310ffee36d84eb01c033b648fb22

- name: Configure
run: cmake --preset=build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux-gcc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Restore artifacts or setup vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: 7e4d2ff73b643ca2c685c6cfe0783a0f62cfb15c
vcpkgGitCommitId: ae360361a434310ffee36d84eb01c033b648fb22

- name: Configure
run: cmake --preset=build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Restore artifacts or setup vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: 7e4d2ff73b643ca2c685c6cfe0783a0f62cfb15c
vcpkgGitCommitId: ae360361a434310ffee36d84eb01c033b648fb22

- name: Configure
run: cmake --preset=build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Restore artifacts or setup vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: 7e4d2ff73b643ca2c685c6cfe0783a0f62cfb15c
vcpkgGitCommitId: ae360361a434310ffee36d84eb01c033b648fb22

- name: Configure
run: cmake -G Ninja -D CMAKE_BUILD_TYPE=RelWithDebInfo -D ENABLE_TESTING:BOOL=TRUE -D ENABLE_COVERAGE:BOOL=TRUE -S . -B build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows-msvc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Restore artifacts, or setup vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: 7e4d2ff73b643ca2c685c6cfe0783a0f62cfb15c
vcpkgGitCommitId: ae360361a434310ffee36d84eb01c033b648fb22

- name: Install vcpkg packages and configure CMake
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows-pkgx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Restore artifacts, or setup vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: 7e4d2ff73b643ca2c685c6cfe0783a0f62cfb15c
vcpkgGitCommitId: ae360361a434310ffee36d84eb01c033b648fb22

- name: Install vcpkg packages and configure CMake
run: |
Expand Down
7 changes: 5 additions & 2 deletions include/Foliated_triangulation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,10 @@ namespace foliated_triangulations
std::inserter(vertices_to_remove, vertices_to_remove.begin()),
find_bad_vertex<dimension>);
// Remove the vertices
fmt::print("There are {} invalid vertices.\n", vertices_to_remove.size());
#ifndef NDEBUG
spdlog::warn("There are {} invalid vertices.\n",
vertices_to_remove.size());
#endif
t_triangulation.remove(vertices_to_remove.begin(),
vertices_to_remove.end());
assert(t_triangulation.tds().is_valid());
Expand Down Expand Up @@ -1493,7 +1496,7 @@ namespace foliated_triangulations
/// @brief Classify cells
/// @param cells The container of simplices to classify
/// @return A container of simplices with Cell_type written to cell->info()
[[nodiscard]] static auto classify_cells(Cell_container const& cells)
[[nodiscard]] auto classify_cells(Cell_container const& cells) const
-> Cell_container
{
assert(cells.size() == number_of_finite_cells());
Expand Down
4 changes: 4 additions & 0 deletions tests/Foliated_triangulation_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -858,8 +858,10 @@ SCENARIO("FoliatedTriangulation_3 functions from Delaunay3" *
{
CHECK_FALSE(triangulation.is_initialized());
// Human verification
#ifndef NDEBUG
fmt::print("Unfixed triangulation:\n");
triangulation.print_cells();
#endif
}
THEN("After being fixed, Delaunay3 functions work as expected.")
{
Expand All @@ -883,7 +885,9 @@ SCENARIO("FoliatedTriangulation_3 functions from Delaunay3" *
fmt::print("Base Delaunay dimension is: {}\n",
triangulation.dimension());
// Human verification
#ifndef NDEBUG
utilities::print_delaunay(triangulation.delaunay());
#endif
}
}
WHEN("Constructing the default triangulation.")
Expand Down
4 changes: 3 additions & 1 deletion tests/Geometry_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,13 @@ SCENARIO("3-Geometry classification" * doctest::test_suite("geometry"))
triangulation.number_of_vertices()));

// Human verification
triangulation.print_cells();
fmt::print("There are {} edges.\n", geometry.N1);
fmt::print("There are {} timelike edges and {} spacelike edges.\n",
geometry.N1_TL, geometry.N1_SL);
#ifndef NDEBUG
triangulation.print_cells();
triangulation.print_edges();
#endif
fmt::print(
"There are {} vertices with a max timevalue of {} and a min "
"timevalue of {}.\n",
Expand Down

0 comments on commit 09d913d

Please sign in to comment.