Prototype event-loop.h for queue dependency injection.
Change-Id: I1af3f71a5b0cca741641f872f55dab10474ee064
diff --git a/aos/events/event-loop_param_test.h b/aos/events/event-loop_param_test.h
new file mode 100644
index 0000000..ae215db
--- /dev/null
+++ b/aos/events/event-loop_param_test.h
@@ -0,0 +1,33 @@
+#ifndef _AOS_EVENTS_EVENT_LOOP_PARAM_TEST_H_
+#define _AOS_EVENTS_EVENT_LOOP_PARAM_TEST_H_
+
+#include "aos/events/event-loop.h"
+#include "gtest/gtest.h"
+
+namespace aos {
+namespace testing {
+
+class EventLoopTestFactory {
+ public:
+ virtual ~EventLoopTestFactory() {}
+
+ virtual std::unique_ptr<EventLoop> Make() = 0;
+};
+
+class AbstractEventLoopTest
+ : public ::testing::TestWithParam<std::function<EventLoopTestFactory *()>> {
+ public:
+ AbstractEventLoopTest() { factory_.reset(GetParam()()); }
+
+ std::unique_ptr<EventLoop> Make() { return factory_->Make(); }
+ // You can implement all the usual fixture class members here.
+ // To access the test parameter, call GetParam() from class
+ // TestWithParam<T>.
+ private:
+ std::unique_ptr<EventLoopTestFactory> factory_;
+};
+
+} // namespace testing
+} // namespace aos
+
+#endif // _AOS_EVENTS_EVENT_LOOP_PARAM_TEST_H_