From 02bdbe7a11c4a6a85a0f742ffcf83d95e729921f Mon Sep 17 00:00:00 2001 From: Brad Bishop Date: Thu, 13 Dec 2018 11:50:34 -0500 Subject: types: Add build testcase Add a basic compile time test that ensures types.hpp can build on its own. Change-Id: Idbf8a68feb1bf30b4fb573d254edf3a2f0a6f0cc Signed-off-by: Brad Bishop --- test/Makefile.am | 6 ++++++ test/types_test.cpp | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 test/types_test.cpp diff --git a/test/Makefile.am b/test/Makefile.am index eb95144..ce83bac 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -9,6 +9,12 @@ noinst_LTLIBRARIES = libtest.la TESTS = ${check_PROGRAMS} +types_test_SOURCES = types_test.cpp +types_test_CFLAGS = ${GTEST_CFLAGS} ${GMOCK_CFLAGS} +types_test_LDADD = ${GTEST_LIBS} ${GMOCK_LIBS} +types_test_LDFLAGS = ${OESDK_TESTCASE_FLAGS} +check_PROGRAMS += types-test + extra_yamldir=$(top_srcdir)/example/extra_interfaces.d phosphor_inventory_test_SOURCES = test.cpp diff --git a/test/types_test.cpp b/test/types_test.cpp new file mode 100644 index 0000000..04e13d5 --- /dev/null +++ b/test/types_test.cpp @@ -0,0 +1,38 @@ +#include "../types.hpp" + +/** + * No runtime tests - just make sure we have the right headers included. + */ +using namespace phosphor::inventory::manager; + +struct Empty +{ +}; + +void functionUsingInterfaceVariantType(InterfaceVariantType&) +{ +} +void functionUsingInterfaceType(InterfaceType&) +{ +} +void functionUsingObjectType(ObjectType&) +{ +} +void functionUsingInterface(Interface&) +{ +} +void functionUsingObject(Object&) +{ +} +void functionUsingAction(Action&) +{ +} +void functionUsingFilter(Filter&) +{ +} +void functionUsingPathCondition(PathCondition&) +{ +} +void functionUsingGetProperty(GetProperty&) +{ +} -- cgit v1.2.1