Skip to content

Commit 1f407d6

Browse files
committed
Formatted the code.
1 parent 1badda9 commit 1f407d6

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

compiler-rt/lib/scudo/standalone/tests/secondary_test.cpp

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,8 @@ TEST(ScudoSecondaryTest, Basic) {
124124
}
125125

126126
struct ScudoSecondaryAllocatorTest : public Test {
127-
using LargeAllocator = scudo::MapAllocator<scudo::SecondaryConfig<TestNoCacheConfig>>;
127+
using LargeAllocator =
128+
scudo::MapAllocator<scudo::SecondaryConfig<TestNoCacheConfig>>;
128129

129130
void SetUp() override { Allocator->init(nullptr); }
130131

@@ -189,7 +190,8 @@ TEST_F(ScudoSecondaryAllocatorTest, Iterate) {
189190
Str.output();
190191
}
191192

192-
struct ScudoSecondaryAllocatorWithReleaseTest : public ScudoSecondaryAllocatorTest {
193+
struct ScudoSecondaryAllocatorWithReleaseTest
194+
: public ScudoSecondaryAllocatorTest {
193195
void SetUp() override { Allocator->init(nullptr, /*ReleaseToOsInterval=*/0); }
194196

195197
void performAllocations() {
@@ -224,8 +226,8 @@ struct ScudoSecondaryAllocatorWithReleaseTest : public ScudoSecondaryAllocatorTe
224226
TEST_F(ScudoSecondaryAllocatorWithReleaseTest, ThreadsRace) {
225227
std::thread Threads[16];
226228
for (scudo::uptr I = 0; I < ARRAY_SIZE(Threads); I++)
227-
Threads[I] =
228-
std::thread(&ScudoSecondaryAllocatorWithReleaseTest::performAllocations, this);
229+
Threads[I] = std::thread(
230+
&ScudoSecondaryAllocatorWithReleaseTest::performAllocations, this);
229231
{
230232
std::unique_lock<std::mutex> Lock(Mutex);
231233
Ready = true;
@@ -369,17 +371,14 @@ TEST_F(ScudoSecondaryAllocatorCacheTest, Options) {
369371

370372
// Various valid combinations.
371373
EXPECT_TRUE(Cache->setOption(scudo::Option::MaxCacheEntriesCount, 4U));
372-
EXPECT_TRUE(
373-
Cache->setOption(scudo::Option::MaxCacheEntrySize, 1UL << 20));
374+
EXPECT_TRUE(Cache->setOption(scudo::Option::MaxCacheEntrySize, 1UL << 20));
374375
EXPECT_TRUE(Cache->canCache(1UL << 18));
375-
EXPECT_TRUE(
376-
Cache->setOption(scudo::Option::MaxCacheEntrySize, 1UL << 17));
376+
EXPECT_TRUE(Cache->setOption(scudo::Option::MaxCacheEntrySize, 1UL << 17));
377377
EXPECT_FALSE(Cache->canCache(1UL << 18));
378378
EXPECT_TRUE(Cache->canCache(1UL << 16));
379379
EXPECT_TRUE(Cache->setOption(scudo::Option::MaxCacheEntriesCount, 0U));
380380
EXPECT_FALSE(Cache->canCache(1UL << 16));
381381
EXPECT_TRUE(Cache->setOption(scudo::Option::MaxCacheEntriesCount, 4U));
382-
EXPECT_TRUE(
383-
Cache->setOption(scudo::Option::MaxCacheEntrySize, 1UL << 20));
382+
EXPECT_TRUE(Cache->setOption(scudo::Option::MaxCacheEntrySize, 1UL << 20));
384383
EXPECT_TRUE(Cache->canCache(1UL << 16));
385384
}

0 commit comments

Comments
 (0)