Add unit test to make sure heap allocation of chai works

This commit is contained in:
Jason Turner
2014-02-26 10:50:33 -07:00
parent 20b40d3970
commit b2b9efebe3
2 changed files with 14 additions and 0 deletions

View File

@@ -232,6 +232,10 @@ if(BUILD_TESTING)
target_link_libraries(simultaneous_chaiscript_test ${LIBS} ${EXTRA_LINKER_FLAGS})
add_test(NAME Simultaneous_Chaiscript_Test COMMAND simultaneous_chaiscript_test)
add_executable(heap_allocated_chaiscript_test unittests/heap_allocated_chaiscript_test.cpp)
target_link_libraries(heap_allocated_chaiscript_test ${LIBS} ${EXTRA_LINKER_FLAGS})
add_test(NAME Heap_Allocated_Chaiscript_Test COMMAND heap_allocated_chaiscript_test)
add_executable(c_linkage_test unittests/c_linkage_test.cpp)
target_link_libraries(c_linkage_test ${LIBS} ${EXTRA_LINKER_FLAGS})
add_test(NAME C_Linkage_Test COMMAND c_linkage_test)

View File

@@ -0,0 +1,10 @@
#include <chaiscript/chaiscript.hpp>
int main()
{
chaiscript::ChaiScript *chai = new chaiscript::ChaiScript();
delete chai;
return EXIT_SUCCESS;
}