1 function(unittest source name)
5 get_filename_component(ext ${arg} EXT)
7 if(NOT ext OR IS_ABSOLUTE ${arg})
8 list(APPEND ARGS ${arg})
10 list(APPEND ARGS ${CMAKE_CURRENT_BINARY_DIR}/${arg})
14 add_test(NAME py_${name} WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
15 COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/test/${source}.py ${ARGS}
17 set_tests_properties(py_${name} PROPERTIES TIMEOUT 30
18 FAIL_REGULAR_EXPRESSION "ERROR;error"
34 unittest(pid_fuzzy pid_fuzzy)
36 unittest(pid_neuro pid_neuro)
42 unittest(trajbell trajbell)
44 unittest(trajpoly3 trajpoly3)
46 unittest(trajpoly5 trajpoly5)
48 unittest(trajpoly7 trajpoly7)
50 unittest(trajtrap trajtrap)
52 unittest(version version)