CMakeLists.txt 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. function(add_catch_test name)
  2. add_executable("test_${name}" main.cpp "${name}.cpp")
  3. add_test("test_${name}" "test_${name}")
  4. target_include_directories("test_${name}"
  5. SYSTEM BEFORE PUBLIC
  6. ${CATCH_INCLUDE_DIRS}
  7. )
  8. endfunction()
  9. add_catch_test(nullptr)
  10. add_catch_test(crtp)
  11. add_catch_test(class_init)
  12. add_catch_test(time)
  13. target_link_libraries(test_time time)
  14. add_catch_test(node)
  15. target_link_libraries(test_node nodes)
  16. add_catch_test(node_tree)
  17. target_link_libraries(test_node_tree document)
  18. add_catch_test(interpolate_node)
  19. target_link_libraries(test_interpolate_node nodes)
  20. add_catch_test(node_tree_modules)
  21. target_link_libraries(test_node_tree_modules document)
  22. add_catch_test(serialize)
  23. target_link_libraries(test_serialize nodes)
  24. add_catch_test(parse)
  25. target_link_libraries(test_parse time)
  26. add_catch_test(actions)
  27. target_link_libraries(test_actions document)
  28. add_catch_test(notify)
  29. target_link_libraries(test_notify document)
  30. add_catch_test(type_constraint)
  31. add_catch_test(link_storage)
  32. target_link_libraries(test_link_storage document)
  33. add_catch_test(new_node)
  34. target_link_libraries(test_new_node nodes)
  35. option(ENABLE_RNITE_DOCUMENT_TESTER "Enable .rnite file testing" ON)
  36. if (ENABLE_RNITE_DOCUMENT_TESTER)
  37. ## New node tests
  38. add_executable(node_tester node_tester.cpp)
  39. target_link_libraries(node_tester nodes filters)
  40. function(add_node_test name)
  41. add_test(node_tester_${name} node_tester "${CMAKE_CURRENT_SOURCE_DIR}/data/${name}.rnite")
  42. endfunction()
  43. add_node_test(sanity)
  44. add_node_test(serialize)
  45. add_node_test(boolean)
  46. add_node_test(dynamic)
  47. add_node_test(numeric)
  48. add_node_test(frames)
  49. add_node_test(interpolate)
  50. add_node_test(notags)
  51. add_node_test(to_string)
  52. add_node_test(string)
  53. add_node_test(format)
  54. add_node_test(transform_tree)
  55. add_node_test(point)
  56. add_node_test(random)
  57. add_node_test(list)
  58. add_node_test(list_format)
  59. add_node_test(sorting)
  60. add_node_test(custom_property)
  61. add_node_test(zdepth)
  62. add_node_test(string_anchors)
  63. add_node_test(external)
  64. add_node_test(svg_render)
  65. endif()