Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleans up include ordering #30

Merged
merged 1 commit into from
Oct 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,21 @@ AlwaysBreakTemplateDeclarations: Yes
SortIncludes: true
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^"radiant/TotallyRad.h"'
- Regex: '^"(gtest|gmock|test)/.*"$'
Priority: 0
SortPriority: 0
- Regex: '^"radiant/.*\.h"'
Priority: 0
- Regex: '^"radiant/TotallyRad.h"$'
Priority: 1
SortPriority: 1
- Regex: '^".*\.h"$'
- Regex: '^"radiant/.*\.h"$'
Priority: 1
SortPriority: 2
- Regex: '^<.*>$'
Priority: 1
- Regex: '^".*\.h"$'
Priority: 2
SortPriority: 3
- Regex: '^<.*>$'
Priority: 2
SortPriority: 4

BinPackArguments: false
BinPackParameters: false
Expand Down
4 changes: 2 additions & 2 deletions test/test_Atomic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "gtest/gtest.h"

#define RAD_REQUIRE_EXPLICIT_ATOMIC_ORDERING 0

#include "gtest/gtest.h"

#include "radiant/Atomic.h"
#include "radiant/Utility.h"

Expand Down
5 changes: 3 additions & 2 deletions test/test_EmptyOptimizedPair.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "radiant/EmptyOptimizedPair.h"

#include "gtest/gtest.h"
#include "test/TestAlloc.h"

#include "radiant/EmptyOptimizedPair.h"

#include <vector>

struct Empty
Expand Down
4 changes: 2 additions & 2 deletions test/test_Integer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "radiant/Integer.h"

#include "gtest/gtest.h"

#include "radiant/Integer.h"

// clang-format off

RAD_S_ASSERT(noexcept(rad::i8()));
Expand Down
4 changes: 2 additions & 2 deletions test/test_Iterator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "radiant/Iterator.h"

#include "gtest/gtest.h"

#include "radiant/Iterator.h"

struct Data
{
int value;
Expand Down
4 changes: 2 additions & 2 deletions test/test_Locks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "radiant/Locks.h"

#include "gtest/gtest.h"

#include "radiant/Locks.h"

struct TestLock
{
void LockExclusive() noexcept
Expand Down
7 changes: 4 additions & 3 deletions test/test_Result.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@
#define RAD_ENABLE_NOTHROW_DTOR_ASSERTIONS 0
#define RAD_ENABLE_NOTHROW_MOVE_ASSERTIONS 0

#include "radiant/Result.h"
#include "radiant/Utility.h"

#include "gtest/gtest.h"
#include "test/TestMove.h"
#include "test/TestThrow.h"

#include "radiant/Result.h"
#include "radiant/Utility.h"

#include <string>
#include <utility>

Expand Down
4 changes: 2 additions & 2 deletions test/test_ScopeExit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "radiant/ScopeExit.h"

#include "gtest/gtest.h"

#include "radiant/ScopeExit.h"

namespace
{

Expand Down
3 changes: 2 additions & 1 deletion test/test_SharedPtr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#define RAD_DEFAULT_ALLOCATOR radtest::Allocator

#include "gtest/gtest.h"
#include "test/TestAlloc.h"
#include "test/TestThrow.h"
#define RAD_DEFAULT_ALLOCATOR radtest::Allocator

#include "radiant/SharedPtr.h"

Expand Down
6 changes: 3 additions & 3 deletions test/test_Span.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "radiant/Span.h"
#include "radiant/Utility.h"

#include "gtest/gtest.h"
#include "test/TestThrow.h"

#include "radiant/Span.h"
#include "radiant/Utility.h"

static constexpr auto g_SpanString = rad::MakeSpan("Span String");
static constexpr const uint8_t g_Bytes[] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55,
0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb,
Expand Down
4 changes: 2 additions & 2 deletions test/test_StdTypeTraits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "gtest/gtest.h"

#include "radiant/detail/Meta.h"
#include "radiant/detail/StdTypeTraits.h"

#include "gtest/gtest.h"

namespace rad
{

Expand Down
4 changes: 2 additions & 2 deletions test/test_TypeWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
#define RAD_ENABLE_NOTHROW_DTOR_ASSERTIONS 0
#define RAD_ENABLE_NOTHROW_MOVE_ASSERTIONS 0

#include "radiant/TypeWrapper.h"

#include "gtest/gtest.h"
#include "test/TestThrow.h"

#include "radiant/TypeWrapper.h"

template <typename T>
using TW = rad::TypeWrapper<T>;
using NTO = radtest::NonThrowingObject;
Expand Down
4 changes: 2 additions & 2 deletions test/test_UniqueResource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "radiant/UniqueResource.h"

#include "gtest/gtest.h"

#include "radiant/UniqueResource.h"

static int g_IsValidCalls = 0;
static int g_CloseCalls = 0;
static int g_CloserCalls = 0;
Expand Down
4 changes: 2 additions & 2 deletions test/test_Utility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
#define RAD_ENABLE_NOTHROW_DTOR_ASSERTIONS 0
#define RAD_ENABLE_NOTHROW_MOVE_ASSERTIONS 0

#include "radiant/Utility.h"

#include "gtest/gtest.h"
#include "test/TestMove.h"

#include "radiant/Utility.h"

RAD_S_ASSERT(noexcept(rad::Forward<int>(rad::DeclVal<int>())));
RAD_S_ASSERT(noexcept(rad::Forward<int>(rad::DeclVal<int&>())));
RAD_S_ASSERT(noexcept(rad::Forward<int>(rad::DeclVal<int&&>())));
Expand Down
4 changes: 2 additions & 2 deletions test/test_Vector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
#define RAD_ENABLE_NOTHROW_DTOR_ASSERTIONS 0
#define RAD_ENABLE_NOTHROW_MOVE_ASSERTIONS 0

#define RAD_DEFAULT_ALLOCATOR radtest::Allocator

#include "gtest/gtest.h"
#include "test/TestAlloc.h"

#define RAD_DEFAULT_ALLOCATOR radtest::Allocator

#include "radiant/Vector.h"

#include <vector>
Expand Down
Loading