Skip to content

Commit 9a1e2f0

Browse files
committed
add include category for test headers
1 parent 62800aa commit 9a1e2f0

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

.clang-format

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,17 @@ MaxEmptyLinesToKeep: 1
7878
# Sorting
7979
IncludeBlocks: Regroup
8080
IncludeCategories:
81-
# "Header.h", "Header.hpp" etc.
81+
# Test headers
8282
- Priority: 1
83+
Regex: '<(catch2|gtest).*>'
84+
# "Header.h", "Header.hpp" etc.
85+
- Priority: 2
8386
Regex: '^\"(.+)\"$'
8487
# Core Library
85-
- Priority: 2
88+
- Priority: 3
8689
Regex: '^<Core\/'
8790
# C++ standard headers
88-
- Priority: 3
91+
- Priority: 4
8992
Regex: '<[[:alnum:]_-]+>'
9093
SortIncludes: true
9194
SortUsingDeclarations: true

library/test/Tests.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
#include <Core/Lib.hpp>
2-
31
#include <catch2/catch_test_macros.hpp>
42

3+
#include <Core/Lib.hpp>
4+
55
TEST_CASE("some_fun")
66
{
77
Lib lib;

0 commit comments

Comments
 (0)