修复
This commit is contained in:
@@ -14,13 +14,14 @@ endif()
|
||||
if(STRUCTIVE_BUILD_TESTS)
|
||||
add_executable(structive_property_extensions_test "${CMAKE_CURRENT_LIST_DIR}/tests/presentation_test.cpp")
|
||||
target_link_libraries(structive_property_extensions_test PRIVATE structive::property_extensions)
|
||||
target_include_directories(structive_property_extensions_test PRIVATE "${CMAKE_CURRENT_LIST_DIR}/../tests")
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
|
||||
target_compile_options(structive_property_extensions_test PRIVATE -Wall -Wextra -Wpedantic)
|
||||
endif()
|
||||
add_test(NAME structive_property_extensions_test COMMAND structive_property_extensions_test)
|
||||
set_tests_properties(structive_property_extensions_test PROPERTIES LABELS "unit;extensions")
|
||||
set(header structive/property/extensions/presentation.hpp)
|
||||
set(target structive_header_structive_property_extensions_presentation_hpp)
|
||||
set(target structive_header_extensions_presentation_hpp)
|
||||
set(source "${CMAKE_CURRENT_BINARY_DIR}/structive_header_tests/${target}.cpp")
|
||||
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/structive_header_tests")
|
||||
file(WRITE "${source}" "#include <${header}>\nint main() {\n return 0;\n}\n")
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
#include <structive/property/extensions/presentation.hpp>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include "test.hpp"
|
||||
#include <type_traits>
|
||||
using namespace structive;
|
||||
#define REQUIRE(expression) do { if (!(expression)) { std::fprintf(stderr, "REQUIRE failed: %s:%d: %s\n", __FILE__, __LINE__, #expression); std::abort(); } } while (false)
|
||||
struct Device : Property_Object<Device> {
|
||||
int temperature{20};
|
||||
int pressure{100};
|
||||
|
||||
Reference in New Issue
Block a user