From 647e001d49bfc2e30d396edb3b1a77cf3ef927ab Mon Sep 17 00:00:00 2001 From: SysRay Date: Mon, 3 Jun 2024 17:18:51 +0200 Subject: [PATCH] format --- core/networking/networking.h | 1 - core/tests/core/semaphore/entry.cpp | 24 ++++++++++-------------- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/core/networking/networking.h b/core/networking/networking.h index a5b7c75..9c61b55 100644 --- a/core/networking/networking.h +++ b/core/networking/networking.h @@ -160,6 +160,5 @@ class INetworking { virtual int httpsSetSslVersion(int id, SceSslVersion version) = 0; }; - __APICALL INetworking& accessNetworking(); #undef __APICALL diff --git a/core/tests/core/semaphore/entry.cpp b/core/tests/core/semaphore/entry.cpp index 2d04aaf..9b92579 100644 --- a/core/tests/core/semaphore/entry.cpp +++ b/core/tests/core/semaphore/entry.cpp @@ -17,7 +17,7 @@ TEST(core_semaphore, init) { pthread::getThreadId_fake.return_val = 4; constexpr int initCount = 1; - constexpr int maxCount = 10; + constexpr int maxCount = 10; { auto sem = createSemaphore_fifo("test", initCount, maxCount); @@ -39,7 +39,7 @@ TEST(core_semaphore, polling_1) { pthread::getThreadId_fake.return_val = 4; constexpr int initCount = 1; - constexpr int maxCount = 10; + constexpr int maxCount = 10; auto sem = createSemaphore_fifo("test", initCount, maxCount); @@ -91,7 +91,7 @@ TEST(core_semaphore, signal_1) { pthread::getThreadId_fake.return_val = 4; constexpr int initCount = 1; - constexpr int maxCount = 10; + constexpr int maxCount = 10; auto sem = createSemaphore_fifo("test", initCount, maxCount); @@ -121,7 +121,7 @@ TEST(core_semaphore, signal_1) { auto fut = std::async(std::launch::async, [&sem] { { uint32_t micros = 1; - auto res = sem->wait(2, µs); // wait timeout + auto res = sem->wait(2, µs); // wait timeout EXPECT_EQ(res, getErr(ErrCode::_ETIMEDOUT)); } }); @@ -138,8 +138,7 @@ TEST(core_semaphore, signal_1) { EXPECT_EQ(res, Ok); } }); - std::this_thread::sleep_for( - std::chrono::microseconds(100)); // this or mock condition var + std::this_thread::sleep_for(std::chrono::microseconds(100)); // this or mock condition var auto resSignal = sem->signal(1); EXPECT_EQ(resSignal, Ok); @@ -159,7 +158,7 @@ TEST(core_semaphore, signal_2) { }; constexpr int initCount = 0; - constexpr int maxCount = 10; + constexpr int maxCount = 10; auto sem = createSemaphore_fifo("test", initCount, maxCount); EXPECT_EQ(sem->getSignalCounter(), 0); @@ -180,8 +179,7 @@ TEST(core_semaphore, signal_2) { EXPECT_EQ(res, Ok); } }); - std::this_thread::sleep_for( - std::chrono::microseconds(100)); // this or mock condition var + std::this_thread::sleep_for(std::chrono::microseconds(100)); // this or mock condition var { auto resSignal = sem->signal(2); @@ -216,8 +214,7 @@ TEST(core_semaphore, signal_2) { EXPECT_EQ(res, Ok); } }); - std::this_thread::sleep_for( - std::chrono::microseconds(100)); // this or mock condition var + std::this_thread::sleep_for(std::chrono::microseconds(100)); // this or mock condition var { auto resSignal = sem->signal(4); @@ -244,7 +241,7 @@ TEST(core_semaphore, signal_exit) { }; constexpr int initCount = 0; - constexpr int maxCount = 10; + constexpr int maxCount = 10; auto sem = createSemaphore_fifo("test", initCount, maxCount); EXPECT_EQ(sem->getSignalCounter(), 0); @@ -262,8 +259,7 @@ TEST(core_semaphore, signal_exit) { EXPECT_EQ(res, getErr(ErrCode::_ECANCELED)); } }); - std::this_thread::sleep_for( - std::chrono::microseconds(100)); // this or mock condition var + std::this_thread::sleep_for(std::chrono::microseconds(100)); // this or mock condition var auto resSignal = sem->signal(2); EXPECT_EQ(resSignal, Ok);