Skip to content

Commit

Permalink
Move tests to 'tests' subdirectory per [DIRECTORY.TESTS].
Browse files Browse the repository at this point in the history
  • Loading branch information
camio committed Nov 13, 2024
1 parent dac2342 commit 3b97077
Show file tree
Hide file tree
Showing 17 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Coverage
run: |
lcov --directory ./build --capture --output-file ./build/coverage_all.info
lcov --remove ./build/coverage_all.info -o ./build/coverage.info '/usr/include/*' "$PWD/src/utf_view/tests/*"
lcov --remove ./build/coverage_all.info -o ./build/coverage.info '/usr/include/*' "$PWD/tests/utf_view/*"
- name: Coveralls
uses: coverallsapp/github-action@master
with:
Expand Down
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,7 @@ add_subdirectory(src/utf_view)
if (UTF_VIEW_BUILD_PAPER)
add_subdirectory(paper)
endif()

if(UTF_VIEW_BUILD_TESTING)
add_subdirectory(tests/utf_view)
endif()
6 changes: 0 additions & 6 deletions src/utf_view/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
add_library(utf_view INTERFACE)

include(GNUInstallDirs)
include_directories(${CMAKE_CURRENT_SOURCE_DIR})

target_include_directories(
utf_view
Expand All @@ -29,8 +28,3 @@ install(
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${CMAKE_PROJECT_NAME}
FILES_MATCHING
PATTERN "*.hpp")

# Tests
if(UTF_VIEW_BUILD_TESTING)
add_subdirectory(tests)
endif()
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
# (See accompanying file LICENSE.txt or copy at
# https://www.boost.org/LICENSE_1_0.txt)

include_directories(${CMAKE_CURRENT_SOURCE_DIR})

add_library(
utf_view_test_lib
STATIC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@

#include <utf_view/code_unit_view.hpp>
#include <utf_view/detail/constexpr_unless_msvc.hpp>
#include <framework.hpp>
#include <test_iterators.hpp>
#include <ranges>
#include <string_view>
#include <tests/framework.hpp>
#include <tests/test_iterators.hpp>

namespace utf_view::tests {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// https://www.boost.org/LICENSE_1_0.txt)

#include <utf_view/detail/concepts.hpp>
#include <tests/std_archetypes/iterator.hpp>
#include <std_archetypes/iterator.hpp>

namespace utf_view::tests {

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
// (See accompanying file LICENSE.txt or copy at
// https://www.boost.org/LICENSE_1_0.txt)

#include <framework.hpp>
#include <cstdlib>
#include <iostream>
#include <tests/framework.hpp>

int main() {
for (auto& [test_name, test] : utf_view::tests::framework::tests()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
// https://www.boost.org/LICENSE_1_0.txt)

#include <utf_view/null_term.hpp>
#include <std_archetypes/iterator.hpp>
#include <concepts>
#include <cstddef>
#include <cstdint>
#include <iterator>
#include <ranges>
#include <tests/std_archetypes/iterator.hpp>
#include <utility>

namespace utf_view::tests {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// (See accompanying file LICENSE.txt or copy at
// https://www.boost.org/LICENSE_1_0.txt)

#include <framework.hpp>
#include <utf_view/code_unit_view.hpp>
#include <utf_view/null_term.hpp>
#include <utf_view/to_utf_view.hpp>
Expand All @@ -15,7 +16,6 @@
#include <stdexcept>
#include <string>
#include <string_view>
#include <tests/framework.hpp>
#include <vector>

namespace utf_view::tests {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// (See accompanying file LICENSE.txt or copy at
// https://www.boost.org/LICENSE_1_0.txt)

#include <tests/std_archetypes/exposition_only.hpp>
#include <std_archetypes/exposition_only.hpp>

namespace utf_view::tests::std_archetypes {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
#ifndef UTF_VIEW_TESTS_STD_ARCHETYPES_ITERATOR_HPP
#define UTF_VIEW_TESTS_STD_ARCHETYPES_ITERATOR_HPP

#include <std_archetypes/exposition_only.hpp>
#include <concepts>
#include <cstddef>
#include <cstdint>
#include <iterator>
#include <tests/std_archetypes/exposition_only.hpp>

namespace utf_view::tests::std_archetypes {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
// (See accompanying file LICENSE.txt or copy at
// https://www.boost.org/LICENSE_1_0.txt)

#include <std_archetypes/iterator.hpp>
#include <iterator>
#include <tests/std_archetypes/iterator.hpp>

namespace utf_view::tests::std_archetypes {

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
#include <utf_view/detail/constexpr_unless_msvc.hpp>
#include <utf_view/detail/erroneous_behavior_global.hpp>
#include <utf_view/to_utf_view.hpp>
#include <framework.hpp>
#include <test_iterators.hpp>
#include <algorithm>
#include <cstddef>
#include <cstring>
Expand All @@ -17,8 +19,6 @@
#include <ranges>
#include <sstream>
#include <string>
#include <tests/framework.hpp>
#include <tests/test_iterators.hpp>
#include <utility>

#include <iostream>
Expand Down

0 comments on commit 3b97077

Please sign in to comment.