Commit af1bcd17 authored by Dan Melnic's avatar Dan Melnic Committed by Facebook GitHub Bot

Move REGISTER_TYPED_TEST_CASE_P to cpp from h

Summary: Move REGISTER_TYPED_TEST_CASE_P to cpp from h

Reviewed By: yfeldblum

Differential Revision: D26440651

fbshipit-source-id: 7efd63b2f4af3de206cf2abdba33c849145c7834
parent ee856474
...@@ -1120,6 +1120,73 @@ struct IoUringPollSQCQBackendProvider { ...@@ -1120,6 +1120,73 @@ struct IoUringPollSQCQBackendProvider {
} }
}; };
REGISTER_TYPED_TEST_CASE_P(
EventBaseTest,
ReadEvent,
ReadPersist,
ReadImmediate,
WriteEvent,
WritePersist,
WriteImmediate,
ReadWrite,
WriteRead,
ReadWriteSimultaneous,
ReadWritePersist,
ReadPartial,
WritePartial,
DestroyingHandler,
RunAfterDelay,
RunAfterDelayDestruction,
BasicTimeouts,
ReuseTimeout,
RescheduleTimeout,
CancelTimeout,
DestroyingTimeout,
ScheduledFn,
ScheduledFnAt,
RunInThread,
RunInEventBaseThreadAndWait,
RunImmediatelyOrRunInEventBaseThreadAndWaitCross,
RunImmediatelyOrRunInEventBaseThreadAndWaitWithin,
RunImmediatelyOrRunInEventBaseThreadNotLooping,
RepeatedRunInLoop,
RunInLoopNoTimeMeasurement,
RunInLoopStopLoop,
messageAvailableException,
TryRunningAfterTerminate,
CancelRunInLoop,
LoopTermination,
CallbackOrderTest,
AlwaysEnqueueCallbackOrderTest,
IdleTime,
ThisLoop,
EventBaseThreadLoop,
EventBaseThreadName,
RunBeforeLoop,
RunBeforeLoopWait,
StopBeforeLoop,
RunCallbacksOnDestruction,
LoopKeepAlive,
LoopKeepAliveInLoop,
LoopKeepAliveWithLoopForever,
LoopKeepAliveShutdown,
LoopKeepAliveAtomic,
LoopKeepAliveCast);
REGISTER_TYPED_TEST_CASE_P(
EventBaseTest1,
DrivableExecutorTest,
IOExecutorTest,
RequestContextTest,
CancelLoopCallbackRequestContextTest,
TestStarvation,
RunOnDestructionBasic,
RunOnDestructionCancelled,
RunOnDestructionAfterHandleDestroyed,
RunOnDestructionAddCallbackWithinCallback,
InternalExternalCallbackOrderTest,
pidCheck);
// Instantiate the non registered fd tests // Instantiate the non registered fd tests
INSTANTIATE_TYPED_TEST_CASE_P(IoUring, EventBaseTest, IoUringBackendProvider); INSTANTIATE_TYPED_TEST_CASE_P(IoUring, EventBaseTest, IoUringBackendProvider);
INSTANTIATE_TYPED_TEST_CASE_P(IoUring, EventBaseTest1, IoUringBackendProvider); INSTANTIATE_TYPED_TEST_CASE_P(IoUring, EventBaseTest1, IoUringBackendProvider);
......
...@@ -20,6 +20,74 @@ ...@@ -20,6 +20,74 @@
namespace folly { namespace folly {
namespace test { namespace test {
REGISTER_TYPED_TEST_CASE_P(
EventBaseTest,
ReadEvent,
ReadPersist,
ReadImmediate,
WriteEvent,
WritePersist,
WriteImmediate,
ReadWrite,
WriteRead,
ReadWriteSimultaneous,
ReadWritePersist,
ReadPartial,
WritePartial,
DestroyingHandler,
RunAfterDelay,
RunAfterDelayDestruction,
BasicTimeouts,
ReuseTimeout,
RescheduleTimeout,
CancelTimeout,
DestroyingTimeout,
ScheduledFn,
ScheduledFnAt,
RunInThread,
RunInEventBaseThreadAndWait,
RunImmediatelyOrRunInEventBaseThreadAndWaitCross,
RunImmediatelyOrRunInEventBaseThreadAndWaitWithin,
RunImmediatelyOrRunInEventBaseThreadNotLooping,
RepeatedRunInLoop,
RunInLoopNoTimeMeasurement,
RunInLoopStopLoop,
messageAvailableException,
TryRunningAfterTerminate,
CancelRunInLoop,
LoopTermination,
CallbackOrderTest,
AlwaysEnqueueCallbackOrderTest,
IdleTime,
ThisLoop,
EventBaseThreadLoop,
EventBaseThreadName,
RunBeforeLoop,
RunBeforeLoopWait,
StopBeforeLoop,
RunCallbacksOnDestruction,
LoopKeepAlive,
LoopKeepAliveInLoop,
LoopKeepAliveWithLoopForever,
LoopKeepAliveShutdown,
LoopKeepAliveAtomic,
LoopKeepAliveCast);
REGISTER_TYPED_TEST_CASE_P(
EventBaseTest1,
DrivableExecutorTest,
IOExecutorTest,
RequestContextTest,
CancelLoopCallbackRequestContextTest,
TestStarvation,
RunOnDestructionBasic,
RunOnDestructionCancelled,
RunOnDestructionAfterHandleDestroyed,
RunOnDestructionAddCallbackWithinCallback,
InternalExternalCallbackOrderTest,
pidCheck);
struct DefaultBackendProvider { struct DefaultBackendProvider {
static std::unique_ptr<folly::EventBaseBackendBase> getBackend() { static std::unique_ptr<folly::EventBaseBackendBase> getBackend() {
return folly::EventBase::getDefaultBackend(); return folly::EventBase::getDefaultBackend();
......
...@@ -2405,72 +2405,5 @@ TYPED_TEST_P(EventBaseTest1, RunOnDestructionAddCallbackWithinCallback) { ...@@ -2405,72 +2405,5 @@ TYPED_TEST_P(EventBaseTest1, RunOnDestructionAddCallbackWithinCallback) {
} }
EXPECT_EQ(2, callbacksCalled); EXPECT_EQ(2, callbacksCalled);
} }
REGISTER_TYPED_TEST_CASE_P(
EventBaseTest,
ReadEvent,
ReadPersist,
ReadImmediate,
WriteEvent,
WritePersist,
WriteImmediate,
ReadWrite,
WriteRead,
ReadWriteSimultaneous,
ReadWritePersist,
ReadPartial,
WritePartial,
DestroyingHandler,
RunAfterDelay,
RunAfterDelayDestruction,
BasicTimeouts,
ReuseTimeout,
RescheduleTimeout,
CancelTimeout,
DestroyingTimeout,
ScheduledFn,
ScheduledFnAt,
RunInThread,
RunInEventBaseThreadAndWait,
RunImmediatelyOrRunInEventBaseThreadAndWaitCross,
RunImmediatelyOrRunInEventBaseThreadAndWaitWithin,
RunImmediatelyOrRunInEventBaseThreadNotLooping,
RepeatedRunInLoop,
RunInLoopNoTimeMeasurement,
RunInLoopStopLoop,
messageAvailableException,
TryRunningAfterTerminate,
CancelRunInLoop,
LoopTermination,
CallbackOrderTest,
AlwaysEnqueueCallbackOrderTest,
IdleTime,
ThisLoop,
EventBaseThreadLoop,
EventBaseThreadName,
RunBeforeLoop,
RunBeforeLoopWait,
StopBeforeLoop,
RunCallbacksOnDestruction,
LoopKeepAlive,
LoopKeepAliveInLoop,
LoopKeepAliveWithLoopForever,
LoopKeepAliveShutdown,
LoopKeepAliveAtomic,
LoopKeepAliveCast);
REGISTER_TYPED_TEST_CASE_P(
EventBaseTest1,
DrivableExecutorTest,
IOExecutorTest,
RequestContextTest,
CancelLoopCallbackRequestContextTest,
TestStarvation,
RunOnDestructionBasic,
RunOnDestructionCancelled,
RunOnDestructionAfterHandleDestroyed,
RunOnDestructionAddCallbackWithinCallback,
InternalExternalCallbackOrderTest,
pidCheck);
} // namespace test } // namespace test
} // namespace folly } // namespace folly
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment