mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Rename tests for consistency (#3592)
I started with the output of styleguide#217, then renamed a few classes to fix compilation. ntcore's StorageTest needed some manual renaming since it put the Test word in the middle instead of at the end. One limitation of wpiformat is test cases that were only named "Test" were unmodified, and an error was generated. These test cases were manually given more descriptive names: * TimedRobotTest mode test cases had "Mode" appended to the name. Java tests were renamed to match. * UvAsyncTest and UvAsyncFunctionTest cases were given alternate names
This commit is contained in:
@@ -83,7 +83,8 @@ static Base64TestParam sample[] = {
|
||||
"mQgc28gb24uLi4K"},
|
||||
};
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(Base64Sample, Base64Test, ::testing::ValuesIn(sample));
|
||||
INSTANTIATE_TEST_SUITE_P(Base64SampleTests, Base64Test,
|
||||
::testing::ValuesIn(sample));
|
||||
|
||||
static Base64TestParam standard[] = {
|
||||
{0, "", ""},
|
||||
@@ -96,7 +97,7 @@ static Base64TestParam standard[] = {
|
||||
{2, "\xff\xef", "/+8="},
|
||||
};
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(Base64Standard, Base64Test,
|
||||
INSTANTIATE_TEST_SUITE_P(Base64StandardTests, Base64Test,
|
||||
::testing::ValuesIn(standard));
|
||||
|
||||
} // namespace wpi
|
||||
|
||||
@@ -12,14 +12,14 @@
|
||||
|
||||
namespace wpi {
|
||||
|
||||
TEST(WorkerThread, Future) {
|
||||
TEST(WorkerThreadTest, Future) {
|
||||
WorkerThread<int(bool)> worker;
|
||||
future<int> f =
|
||||
worker.QueueWork([](bool v) -> int { return v ? 1 : 2; }, true);
|
||||
ASSERT_EQ(f.get(), 1);
|
||||
}
|
||||
|
||||
TEST(WorkerThread, FutureVoid) {
|
||||
TEST(WorkerThreadTest, FutureVoid) {
|
||||
int callbacks = 0;
|
||||
WorkerThread<void(int)> worker;
|
||||
future<void> f = worker.QueueWork(
|
||||
@@ -32,7 +32,7 @@ TEST(WorkerThread, FutureVoid) {
|
||||
ASSERT_EQ(callbacks, 1);
|
||||
}
|
||||
|
||||
TEST(WorkerThread, Loop) {
|
||||
TEST(WorkerThreadTest, Loop) {
|
||||
int callbacks = 0;
|
||||
WorkerThread<int(bool)> worker;
|
||||
auto loop = uv::Loop::Create();
|
||||
@@ -50,7 +50,7 @@ TEST(WorkerThread, Loop) {
|
||||
ASSERT_EQ(callbacks, 1);
|
||||
}
|
||||
|
||||
TEST(WorkerThread, LoopVoid) {
|
||||
TEST(WorkerThreadTest, LoopVoid) {
|
||||
int callbacks = 0;
|
||||
WorkerThread<void(bool)> worker;
|
||||
auto loop = uv::Loop::Create();
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
namespace wpi {
|
||||
|
||||
TEST(Future, Then) {
|
||||
TEST(FutureTest, Then) {
|
||||
promise<bool> inPromise;
|
||||
future<int> outFuture =
|
||||
inPromise.get_future().then([](bool v) { return v ? 5 : 6; });
|
||||
@@ -19,7 +19,7 @@ TEST(Future, Then) {
|
||||
ASSERT_EQ(outFuture.get(), 5);
|
||||
}
|
||||
|
||||
TEST(Future, ThenSame) {
|
||||
TEST(FutureTest, ThenSame) {
|
||||
promise<bool> inPromise;
|
||||
future<bool> outFuture =
|
||||
inPromise.get_future().then([](bool v) { return !v; });
|
||||
@@ -28,7 +28,7 @@ TEST(Future, ThenSame) {
|
||||
ASSERT_EQ(outFuture.get(), false);
|
||||
}
|
||||
|
||||
TEST(Future, ThenFromVoid) {
|
||||
TEST(FutureTest, ThenFromVoid) {
|
||||
promise<void> inPromise;
|
||||
future<int> outFuture = inPromise.get_future().then([] { return 5; });
|
||||
|
||||
@@ -36,7 +36,7 @@ TEST(Future, ThenFromVoid) {
|
||||
ASSERT_EQ(outFuture.get(), 5);
|
||||
}
|
||||
|
||||
TEST(Future, ThenToVoid) {
|
||||
TEST(FutureTest, ThenToVoid) {
|
||||
promise<bool> inPromise;
|
||||
future<void> outFuture = inPromise.get_future().then([](bool v) {});
|
||||
|
||||
@@ -44,7 +44,7 @@ TEST(Future, ThenToVoid) {
|
||||
ASSERT_TRUE(outFuture.is_ready());
|
||||
}
|
||||
|
||||
TEST(Future, ThenVoidVoid) {
|
||||
TEST(FutureTest, ThenVoidVoid) {
|
||||
promise<void> inPromise;
|
||||
future<void> outFuture = inPromise.get_future().then([] {});
|
||||
|
||||
@@ -52,7 +52,7 @@ TEST(Future, ThenVoidVoid) {
|
||||
ASSERT_TRUE(outFuture.is_ready());
|
||||
}
|
||||
|
||||
TEST(Future, Implicit) {
|
||||
TEST(FutureTest, Implicit) {
|
||||
promise<bool> inPromise;
|
||||
future<int> outFuture = inPromise.get_future();
|
||||
|
||||
@@ -60,7 +60,7 @@ TEST(Future, Implicit) {
|
||||
ASSERT_EQ(outFuture.get(), 1);
|
||||
}
|
||||
|
||||
TEST(Future, MoveSame) {
|
||||
TEST(FutureTest, MoveSame) {
|
||||
promise<bool> inPromise;
|
||||
future<bool> outFuture1 = inPromise.get_future();
|
||||
future<bool> outFuture(std::move(outFuture1));
|
||||
@@ -69,7 +69,7 @@ TEST(Future, MoveSame) {
|
||||
ASSERT_EQ(outFuture.get(), true);
|
||||
}
|
||||
|
||||
TEST(Future, MoveVoid) {
|
||||
TEST(FutureTest, MoveVoid) {
|
||||
promise<void> inPromise;
|
||||
future<void> outFuture1 = inPromise.get_future();
|
||||
future<void> outFuture(std::move(outFuture1));
|
||||
|
||||
@@ -116,7 +116,7 @@ static_assert(is_callable_v<t, o8>, "");
|
||||
|
||||
namespace wpi {
|
||||
|
||||
TEST(Signal, FunctionTraits) {
|
||||
TEST(SignalTest, FunctionTraits) {
|
||||
auto l1 = [](int, char, float) {};
|
||||
auto l2 = [&](int, char, float) mutable {};
|
||||
auto l3 = [&](auto...) mutable {};
|
||||
|
||||
@@ -63,7 +63,7 @@ struct object {
|
||||
|
||||
namespace wpi {
|
||||
|
||||
TEST(Signal, Recursive) {
|
||||
TEST(SignalTest, Recursive) {
|
||||
object<int> i1(-1);
|
||||
object<int> i2(10);
|
||||
|
||||
@@ -75,7 +75,7 @@ TEST(Signal, Recursive) {
|
||||
ASSERT_EQ(i1.v, i2.v);
|
||||
}
|
||||
|
||||
TEST(Signal, SelfRecursive) {
|
||||
TEST(SignalTest, SelfRecursive) {
|
||||
int i = 0;
|
||||
|
||||
wpi::sig::Signal_r<int> s;
|
||||
|
||||
@@ -68,7 +68,7 @@ struct o {
|
||||
|
||||
namespace wpi {
|
||||
|
||||
TEST(SignalExtended, FreeConnection) {
|
||||
TEST(SignalExtendedTest, FreeConnection) {
|
||||
sum = 0;
|
||||
Signal<int> sig;
|
||||
sig.connect_extended(f);
|
||||
@@ -79,7 +79,7 @@ TEST(SignalExtended, FreeConnection) {
|
||||
ASSERT_EQ(sum, 1);
|
||||
}
|
||||
|
||||
TEST(SignalExtended, StaticConnection) {
|
||||
TEST(SignalExtendedTest, StaticConnection) {
|
||||
sum = 0;
|
||||
Signal<int> sig;
|
||||
sig.connect_extended(&s::sf);
|
||||
@@ -90,7 +90,7 @@ TEST(SignalExtended, StaticConnection) {
|
||||
ASSERT_EQ(sum, 1);
|
||||
}
|
||||
|
||||
TEST(SignalExtended, PmfConnection) {
|
||||
TEST(SignalExtendedTest, PmfConnection) {
|
||||
sum = 0;
|
||||
Signal<int> sig;
|
||||
s p;
|
||||
@@ -102,7 +102,7 @@ TEST(SignalExtended, PmfConnection) {
|
||||
ASSERT_EQ(sum, 1);
|
||||
}
|
||||
|
||||
TEST(SignalExtended, FunctionObjectConnection) {
|
||||
TEST(SignalExtendedTest, FunctionObjectConnection) {
|
||||
sum = 0;
|
||||
Signal<int> sig;
|
||||
sig.connect_extended(o{});
|
||||
@@ -113,7 +113,7 @@ TEST(SignalExtended, FunctionObjectConnection) {
|
||||
ASSERT_EQ(sum, 1);
|
||||
}
|
||||
|
||||
TEST(SignalExtended, LambdaConnection) {
|
||||
TEST(SignalExtendedTest, LambdaConnection) {
|
||||
sum = 0;
|
||||
Signal<int> sig;
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ void connect_emit(Signal_mt<int>& sig) {
|
||||
|
||||
namespace wpi {
|
||||
|
||||
TEST(Signal, ThreadedMix) {
|
||||
TEST(SignalTest, ThreadedMix) {
|
||||
sum = 0;
|
||||
|
||||
Signal_mt<int> sig;
|
||||
@@ -83,7 +83,7 @@ TEST(Signal, ThreadedMix) {
|
||||
}
|
||||
}
|
||||
|
||||
TEST(Signal, ThreadedEmission) {
|
||||
TEST(SignalTest, ThreadedEmission) {
|
||||
sum = 0;
|
||||
|
||||
Signal_mt<int> sig;
|
||||
|
||||
@@ -72,7 +72,7 @@ static_assert(trait::is_callable_v<trait::typelist<int>, decltype(&s::f1),
|
||||
|
||||
namespace wpi {
|
||||
|
||||
TEST(Signal, TrackShared) {
|
||||
TEST(SignalTest, TrackShared) {
|
||||
sum = 0;
|
||||
Signal<int> sig;
|
||||
|
||||
@@ -95,7 +95,7 @@ TEST(Signal, TrackShared) {
|
||||
ASSERT_EQ(sum, 5);
|
||||
}
|
||||
|
||||
TEST(Signal, TrackOther) {
|
||||
TEST(SignalTest, TrackOther) {
|
||||
sum = 0;
|
||||
Signal<int> sig;
|
||||
|
||||
@@ -118,7 +118,7 @@ TEST(Signal, TrackOther) {
|
||||
ASSERT_EQ(sum, 5);
|
||||
}
|
||||
|
||||
TEST(Signal, TrackOverloadedFunctionObject) {
|
||||
TEST(SignalTest, TrackOverloadedFunctionObject) {
|
||||
sum = 0;
|
||||
Signal<int> sig;
|
||||
Signal<double> sig1;
|
||||
@@ -143,7 +143,7 @@ TEST(Signal, TrackOverloadedFunctionObject) {
|
||||
ASSERT_EQ(sum, 5);
|
||||
}
|
||||
|
||||
TEST(Signal, TrackGenericLambda) {
|
||||
TEST(SignalTest, TrackGenericLambda) {
|
||||
std::stringstream s;
|
||||
|
||||
auto f = [&](auto a, auto... args) {
|
||||
|
||||
@@ -100,7 +100,7 @@ struct o8 {
|
||||
|
||||
namespace wpi {
|
||||
|
||||
TEST(Signal, FreeConnection) {
|
||||
TEST(SignalTest, FreeConnection) {
|
||||
sum = 0;
|
||||
Signal<int> sig;
|
||||
|
||||
@@ -113,7 +113,7 @@ TEST(Signal, FreeConnection) {
|
||||
ASSERT_EQ(sum, 4);
|
||||
}
|
||||
|
||||
TEST(Signal, StaticConnection) {
|
||||
TEST(SignalTest, StaticConnection) {
|
||||
sum = 0;
|
||||
Signal<int> sig;
|
||||
|
||||
@@ -126,7 +126,7 @@ TEST(Signal, StaticConnection) {
|
||||
ASSERT_EQ(sum, 4);
|
||||
}
|
||||
|
||||
TEST(Signal, PmfConnection) {
|
||||
TEST(SignalTest, PmfConnection) {
|
||||
sum = 0;
|
||||
Signal<int> sig;
|
||||
s p;
|
||||
@@ -144,7 +144,7 @@ TEST(Signal, PmfConnection) {
|
||||
ASSERT_EQ(sum, 8);
|
||||
}
|
||||
|
||||
TEST(Signal, ConstPmfConnection) {
|
||||
TEST(SignalTest, ConstPmfConnection) {
|
||||
sum = 0;
|
||||
Signal<int> sig;
|
||||
const s p;
|
||||
@@ -158,7 +158,7 @@ TEST(Signal, ConstPmfConnection) {
|
||||
ASSERT_EQ(sum, 4);
|
||||
}
|
||||
|
||||
TEST(Signal, FunctionObjectConnection) {
|
||||
TEST(SignalTest, FunctionObjectConnection) {
|
||||
sum = 0;
|
||||
Signal<int> sig;
|
||||
|
||||
@@ -175,7 +175,7 @@ TEST(Signal, FunctionObjectConnection) {
|
||||
ASSERT_EQ(sum, 8);
|
||||
}
|
||||
|
||||
TEST(Signal, OverloadedFunctionObjectConnection) {
|
||||
TEST(SignalTest, OverloadedFunctionObjectConnection) {
|
||||
sum = 0;
|
||||
Signal<int> sig;
|
||||
Signal<double> sig1;
|
||||
@@ -189,7 +189,7 @@ TEST(Signal, OverloadedFunctionObjectConnection) {
|
||||
ASSERT_EQ(sum, 5);
|
||||
}
|
||||
|
||||
TEST(Signal, LambdaConnection) {
|
||||
TEST(SignalTest, LambdaConnection) {
|
||||
sum = 0;
|
||||
Signal<int> sig;
|
||||
|
||||
@@ -202,7 +202,7 @@ TEST(Signal, LambdaConnection) {
|
||||
ASSERT_EQ(sum, 4);
|
||||
}
|
||||
|
||||
TEST(Signal, GenericLambdaConnection) {
|
||||
TEST(SignalTest, GenericLambdaConnection) {
|
||||
std::stringstream s;
|
||||
|
||||
auto f = [&](auto a, auto... args) {
|
||||
@@ -229,7 +229,7 @@ TEST(Signal, GenericLambdaConnection) {
|
||||
ASSERT_EQ(s.str(), "1foo4.1");
|
||||
}
|
||||
|
||||
TEST(Signal, LvalueEmission) {
|
||||
TEST(SignalTest, LvalueEmission) {
|
||||
sum = 0;
|
||||
Signal<int> sig;
|
||||
|
||||
@@ -243,7 +243,7 @@ TEST(Signal, LvalueEmission) {
|
||||
ASSERT_EQ(sum, 4);
|
||||
}
|
||||
|
||||
TEST(Signal, Mutation) {
|
||||
TEST(SignalTest, Mutation) {
|
||||
int res = 0;
|
||||
Signal<int&> sig;
|
||||
|
||||
@@ -256,7 +256,7 @@ TEST(Signal, Mutation) {
|
||||
ASSERT_EQ(res, 4);
|
||||
}
|
||||
|
||||
TEST(Signal, CompatibleArgs) {
|
||||
TEST(SignalTest, CompatibleArgs) {
|
||||
long ll = 0; // NOLINT(runtime/int)
|
||||
std::string ss;
|
||||
short ii = 0; // NOLINT(runtime/int)
|
||||
@@ -276,7 +276,7 @@ TEST(Signal, CompatibleArgs) {
|
||||
ASSERT_EQ(ii, 1);
|
||||
}
|
||||
|
||||
TEST(Signal, Disconnection) {
|
||||
TEST(SignalTest, Disconnection) {
|
||||
// test removing only connected
|
||||
{
|
||||
sum = 0;
|
||||
@@ -328,7 +328,7 @@ TEST(Signal, Disconnection) {
|
||||
}
|
||||
}
|
||||
|
||||
TEST(Signal, ScopedConnection) {
|
||||
TEST(SignalTest, ScopedConnection) {
|
||||
sum = 0;
|
||||
Signal<int> sig;
|
||||
|
||||
@@ -361,7 +361,7 @@ TEST(Signal, ScopedConnection) {
|
||||
ASSERT_EQ(sum, 4);
|
||||
}
|
||||
|
||||
TEST(Signal, ConnectionBlocking) {
|
||||
TEST(SignalTest, ConnectionBlocking) {
|
||||
sum = 0;
|
||||
Signal<int> sig;
|
||||
|
||||
@@ -379,7 +379,7 @@ TEST(Signal, ConnectionBlocking) {
|
||||
ASSERT_EQ(sum, 8);
|
||||
}
|
||||
|
||||
TEST(Signal, ConnectionBlocker) {
|
||||
TEST(SignalTest, ConnectionBlocker) {
|
||||
sum = 0;
|
||||
Signal<int> sig;
|
||||
|
||||
@@ -398,7 +398,7 @@ TEST(Signal, ConnectionBlocker) {
|
||||
ASSERT_EQ(sum, 8);
|
||||
}
|
||||
|
||||
TEST(Signal, SignalBlocking) {
|
||||
TEST(SignalTest, SignalBlocking) {
|
||||
sum = 0;
|
||||
Signal<int> sig;
|
||||
|
||||
@@ -416,7 +416,7 @@ TEST(Signal, SignalBlocking) {
|
||||
ASSERT_EQ(sum, 6);
|
||||
}
|
||||
|
||||
TEST(Signal, AllDisconnection) {
|
||||
TEST(SignalTest, AllDisconnection) {
|
||||
sum = 0;
|
||||
Signal<int> sig;
|
||||
|
||||
@@ -430,7 +430,7 @@ TEST(Signal, AllDisconnection) {
|
||||
ASSERT_EQ(sum, 3);
|
||||
}
|
||||
|
||||
TEST(Signal, ConnectionCopyingMoving) {
|
||||
TEST(SignalTest, ConnectionCopyingMoving) {
|
||||
sum = 0;
|
||||
Signal<int> sig;
|
||||
|
||||
@@ -459,7 +459,7 @@ TEST(Signal, ConnectionCopyingMoving) {
|
||||
ASSERT_EQ(sum, 9);
|
||||
}
|
||||
|
||||
TEST(Signal, ScopedConnectionMoving) {
|
||||
TEST(SignalTest, ScopedConnectionMoving) {
|
||||
sum = 0;
|
||||
Signal<int> sig;
|
||||
|
||||
@@ -485,7 +485,7 @@ TEST(Signal, ScopedConnectionMoving) {
|
||||
ASSERT_EQ(sum, 10);
|
||||
}
|
||||
|
||||
TEST(Signal, SignalMoving) {
|
||||
TEST(SignalTest, SignalMoving) {
|
||||
sum = 0;
|
||||
Signal<int> sig;
|
||||
|
||||
@@ -525,7 +525,7 @@ struct object {
|
||||
Signal<T> s;
|
||||
};
|
||||
|
||||
TEST(Signal, Loop) {
|
||||
TEST(SignalTest, Loop) {
|
||||
object<int> i1(0);
|
||||
object<int> i2(3);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
namespace wpi::uv {
|
||||
|
||||
TEST(UvAsyncFunction, Test) {
|
||||
TEST(UvAsyncFunctionTest, Basic) {
|
||||
int prepare_cb_called = 0;
|
||||
int async_cb_called[2] = {0, 0};
|
||||
int close_cb_called = 0;
|
||||
@@ -62,7 +62,7 @@ TEST(UvAsyncFunction, Test) {
|
||||
}
|
||||
}
|
||||
|
||||
TEST(UvAsyncFunction, Ref) {
|
||||
TEST(UvAsyncFunctionTest, Ref) {
|
||||
int prepare_cb_called = 0;
|
||||
int val = 0;
|
||||
|
||||
@@ -96,7 +96,7 @@ TEST(UvAsyncFunction, Ref) {
|
||||
}
|
||||
}
|
||||
|
||||
TEST(UvAsyncFunction, Movable) {
|
||||
TEST(UvAsyncFunctionTest, Movable) {
|
||||
int prepare_cb_called = 0;
|
||||
|
||||
std::thread theThread;
|
||||
@@ -133,7 +133,7 @@ TEST(UvAsyncFunction, Movable) {
|
||||
}
|
||||
}
|
||||
|
||||
TEST(UvAsyncFunction, CallIgnoreResult) {
|
||||
TEST(UvAsyncFunctionTest, CallIgnoreResult) {
|
||||
int prepare_cb_called = 0;
|
||||
|
||||
std::thread theThread;
|
||||
@@ -165,7 +165,7 @@ TEST(UvAsyncFunction, CallIgnoreResult) {
|
||||
}
|
||||
}
|
||||
|
||||
TEST(UvAsyncFunction, VoidCall) {
|
||||
TEST(UvAsyncFunctionTest, VoidCall) {
|
||||
int prepare_cb_called = 0;
|
||||
|
||||
std::thread theThread;
|
||||
@@ -195,7 +195,7 @@ TEST(UvAsyncFunction, VoidCall) {
|
||||
}
|
||||
}
|
||||
|
||||
TEST(UvAsyncFunction, WaitFor) {
|
||||
TEST(UvAsyncFunctionTest, WaitFor) {
|
||||
int prepare_cb_called = 0;
|
||||
|
||||
std::thread theThread;
|
||||
@@ -228,7 +228,7 @@ TEST(UvAsyncFunction, WaitFor) {
|
||||
}
|
||||
}
|
||||
|
||||
TEST(UvAsyncFunction, VoidWaitFor) {
|
||||
TEST(UvAsyncFunctionTest, VoidWaitFor) {
|
||||
int prepare_cb_called = 0;
|
||||
|
||||
std::thread theThread;
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
namespace wpi::uv {
|
||||
|
||||
TEST(UvAsync, Test) {
|
||||
TEST(UvAsyncTest, CallbackOnly) {
|
||||
std::atomic_int async_cb_called{0};
|
||||
int prepare_cb_called = 0;
|
||||
int close_cb_called = 0;
|
||||
@@ -101,7 +101,7 @@ TEST(UvAsync, Test) {
|
||||
}
|
||||
}
|
||||
|
||||
TEST(UvAsync, Data) {
|
||||
TEST(UvAsyncTest, Data) {
|
||||
int prepare_cb_called = 0;
|
||||
int async_cb_called[2] = {0, 0};
|
||||
int close_cb_called = 0;
|
||||
@@ -149,7 +149,7 @@ TEST(UvAsync, Data) {
|
||||
}
|
||||
}
|
||||
|
||||
TEST(UvAsync, DataRef) {
|
||||
TEST(UvAsyncTest, DataRef) {
|
||||
int prepare_cb_called = 0;
|
||||
int val = 0;
|
||||
|
||||
|
||||
@@ -8,21 +8,21 @@
|
||||
|
||||
namespace wpi::uv {
|
||||
|
||||
TEST(UvSimpleBufferPool, ConstructDefault) {
|
||||
TEST(UvSimpleBufferPoolTest, ConstructDefault) {
|
||||
SimpleBufferPool<> pool;
|
||||
auto buf1 = pool.Allocate();
|
||||
ASSERT_EQ(buf1.len, 4096u); // NOLINT
|
||||
pool.Release({&buf1, 1});
|
||||
}
|
||||
|
||||
TEST(UvSimpleBufferPool, ConstructSize) {
|
||||
TEST(UvSimpleBufferPoolTest, ConstructSize) {
|
||||
SimpleBufferPool<4> pool{8192};
|
||||
auto buf1 = pool.Allocate();
|
||||
ASSERT_EQ(buf1.len, 8192u); // NOLINT
|
||||
pool.Release({&buf1, 1});
|
||||
}
|
||||
|
||||
TEST(UvSimpleBufferPool, ReleaseReuse) {
|
||||
TEST(UvSimpleBufferPoolTest, ReleaseReuse) {
|
||||
SimpleBufferPool<4> pool;
|
||||
auto buf1 = pool.Allocate();
|
||||
auto buf1copy = buf1;
|
||||
@@ -36,7 +36,7 @@ TEST(UvSimpleBufferPool, ReleaseReuse) {
|
||||
pool.Release({&buf2, 1});
|
||||
}
|
||||
|
||||
TEST(UvSimpleBufferPool, ClearRemaining) {
|
||||
TEST(UvSimpleBufferPoolTest, ClearRemaining) {
|
||||
SimpleBufferPool<4> pool;
|
||||
auto buf1 = pool.Allocate();
|
||||
pool.Release({&buf1, 1});
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
namespace wpi::uv {
|
||||
|
||||
TEST(UvGetAddrInfo, BothNull) {
|
||||
TEST(UvGetAddrInfoTest, BothNull) {
|
||||
int fail_cb_called = 0;
|
||||
|
||||
auto loop = Loop::Create();
|
||||
@@ -48,7 +48,7 @@ TEST(UvGetAddrInfo, BothNull) {
|
||||
ASSERT_EQ(fail_cb_called, 1);
|
||||
}
|
||||
|
||||
TEST(UvGetAddrInfo, FailedLookup) {
|
||||
TEST(UvGetAddrInfoTest, FailedLookup) {
|
||||
int fail_cb_called = 0;
|
||||
|
||||
auto loop = Loop::Create();
|
||||
@@ -65,7 +65,7 @@ TEST(UvGetAddrInfo, FailedLookup) {
|
||||
ASSERT_EQ(fail_cb_called, 1);
|
||||
}
|
||||
|
||||
TEST(UvGetAddrInfo, Basic) {
|
||||
TEST(UvGetAddrInfoTest, Basic) {
|
||||
int getaddrinfo_cbs = 0;
|
||||
|
||||
auto loop = Loop::Create();
|
||||
@@ -80,7 +80,7 @@ TEST(UvGetAddrInfo, Basic) {
|
||||
}
|
||||
|
||||
#ifndef _WIN32
|
||||
TEST(UvGetAddrInfo, Concurrent) {
|
||||
TEST(UvGetAddrInfoTest, Concurrent) {
|
||||
int getaddrinfo_cbs = 0;
|
||||
int callback_counts[CONCURRENT_COUNT];
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
namespace wpi::uv {
|
||||
|
||||
TEST(UvGetNameInfo, BasicIp4) {
|
||||
TEST(UvGetNameInfoTest, BasicIp4) {
|
||||
int getnameinfo_cbs = 0;
|
||||
|
||||
auto loop = Loop::Create();
|
||||
@@ -51,7 +51,7 @@ TEST(UvGetNameInfo, BasicIp4) {
|
||||
ASSERT_EQ(getnameinfo_cbs, 1);
|
||||
}
|
||||
|
||||
TEST(UvGetNameInfo, BasicIp6) {
|
||||
TEST(UvGetNameInfoTest, BasicIp6) {
|
||||
int getnameinfo_cbs = 0;
|
||||
|
||||
auto loop = Loop::Create();
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
namespace wpi::uv {
|
||||
|
||||
TEST(UvLoop, Walk) {
|
||||
TEST(UvLoopTest, Walk) {
|
||||
int seen_timer_handle = 0;
|
||||
|
||||
auto loop = Loop::Create();
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
namespace wpi::uv {
|
||||
|
||||
TEST(UvTimer, StartAndStop) {
|
||||
TEST(UvTimerTest, StartAndStop) {
|
||||
auto loop = Loop::Create();
|
||||
auto handleNoRepeat = Timer::Create(loop);
|
||||
auto handleRepeat = Timer::Create(loop);
|
||||
@@ -55,7 +55,7 @@ TEST(UvTimer, StartAndStop) {
|
||||
ASSERT_TRUE(checkTimerRepeatEvent);
|
||||
}
|
||||
|
||||
TEST(UvTimer, Repeat) {
|
||||
TEST(UvTimerTest, Repeat) {
|
||||
auto loop = Loop::Create();
|
||||
auto handle = Timer::Create(loop);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user