summaryrefslogtreecommitdiff
path: root/Tests
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2022-10-17 00:06:11 +0200
committerLinus Groh <mail@linusgroh.de>2022-12-03 23:52:23 +0000
commitd26aabff0401690d6dd1332558b40f5cb64e4428 (patch)
treefd56d0ab5b672814a1a2fb7b8a92fefb01f24e6f /Tests
parent8639d8bc212dcb45aff80405b4b0f6b1ef1087e7 (diff)
downloadserenity-d26aabff0401690d6dd1332558b40f5cb64e4428.zip
Everywhere: Run clang-format
Diffstat (limited to 'Tests')
-rw-r--r--Tests/AK/TestBitCast.cpp2
-rw-r--r--Tests/AK/TestSpan.cpp2
-rw-r--r--Tests/AK/TestTypeTraits.cpp8
-rw-r--r--Tests/LibRegex/Regex.cpp3
4 files changed, 8 insertions, 7 deletions
diff --git a/Tests/AK/TestBitCast.cpp b/Tests/AK/TestBitCast.cpp
index baf270f9b6..29ae53f305 100644
--- a/Tests/AK/TestBitCast.cpp
+++ b/Tests/AK/TestBitCast.cpp
@@ -9,7 +9,7 @@
#include <AK/BitCast.h>
template<typename A, typename B>
-void check_cast_both_ways(const A& a, const B& b)
+void check_cast_both_ways(A const& a, B const& b)
{
EXPECT_EQ((bit_cast<A, B>(b)), a);
EXPECT_EQ((bit_cast<B, A>(a)), b);
diff --git a/Tests/AK/TestSpan.cpp b/Tests/AK/TestSpan.cpp
index 7cac637cc9..27add01cc1 100644
--- a/Tests/AK/TestSpan.cpp
+++ b/Tests/AK/TestSpan.cpp
@@ -103,7 +103,7 @@ TEST_CASE(can_subspan_as_intended)
{
static constexpr u16 buffer[8] { 1, 2, 3, 4, 5, 6, 7, 8 };
- constexpr Span<const u16> span { buffer, 8 };
+ constexpr Span<u16 const> span { buffer, 8 };
constexpr auto slice = span.slice(3, 2);
static_assert(slice.size() == 2u);
diff --git a/Tests/AK/TestTypeTraits.cpp b/Tests/AK/TestTypeTraits.cpp
index b1c464c90c..ad7753e7de 100644
--- a/Tests/AK/TestTypeTraits.cpp
+++ b/Tests/AK/TestTypeTraits.cpp
@@ -166,7 +166,7 @@ TEST_CASE(IsAssignable)
EXPECT_TRAIT_TRUE(IsTriviallyMoveAssignable, A);
struct B {
- B& operator=(const B&) { return *this; }
+ B& operator=(B const&) { return *this; }
B& operator=(B&&) { return *this; }
};
EXPECT_TRAIT_TRUE(IsCopyAssignable, B);
@@ -175,7 +175,7 @@ TEST_CASE(IsAssignable)
EXPECT_TRAIT_FALSE(IsTriviallyMoveAssignable, B);
struct C {
- C& operator=(const C&) = delete;
+ C& operator=(C const&) = delete;
C& operator=(C&&) = delete;
};
EXPECT_TRAIT_FALSE(IsCopyAssignable, C);
@@ -194,7 +194,7 @@ TEST_CASE(IsConstructible)
EXPECT_TRAIT_TRUE(IsTriviallyMoveConstructible, A);
struct B {
- B(const B&)
+ B(B const&)
{
}
B(B&&)
@@ -207,7 +207,7 @@ TEST_CASE(IsConstructible)
EXPECT_TRAIT_FALSE(IsTriviallyMoveConstructible, B);
struct C {
- C(const C&) = delete;
+ C(C const&) = delete;
C(C&&) = delete;
};
EXPECT_TRAIT_FALSE(IsCopyConstructible, C);
diff --git a/Tests/LibRegex/Regex.cpp b/Tests/LibRegex/Regex.cpp
index 15e972a24d..e93e1d43b4 100644
--- a/Tests/LibRegex/Regex.cpp
+++ b/Tests/LibRegex/Regex.cpp
@@ -24,7 +24,8 @@ static PosixOptions match_test_api_options(const PosixOptions options)
}
template<typename... Flags>
-static constexpr ECMAScriptFlags combine_flags(Flags&&... flags) requires((IsSame<Flags, ECMAScriptFlags> && ...))
+static constexpr ECMAScriptFlags combine_flags(Flags&&... flags)
+requires((IsSame<Flags, ECMAScriptFlags> && ...))
{
return static_cast<ECMAScriptFlags>((static_cast<regex::FlagsUnderlyingType>(flags) | ...));
}