# A parking fee calculator taken through three requirement changes, with
# each version kept so the changes can be compared. start is the first
# version; v1, v2, and v3 follow changes 1, 2, and 3; v2-prep is the
# refactoring done before change 2. The comparison tests run each version
# over the same 378 stays and check it against the version before.
add_library(tst_parking_versions STATIC
  start/fee.cpp v1/fee.cpp v2-prep/fee.cpp v2/fee.cpp v3/fee.cpp)
target_include_directories(tst_parking_versions PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

lld_add_example(tst_parking_demo SOURCES main.cpp EXPECTED_OUTPUT expected_output.txt)
target_link_libraries(tst_parking_demo PRIVATE tst_parking_versions)

lld_add_test(tst_parking_compat_tests SOURCES tests/test_compat.cpp LABELS unit)
target_link_libraries(tst_parking_compat_tests PRIVATE tst_parking_versions)

lld_add_test(tst_parking_rule_tests SOURCES tests/test_rules.cpp LABELS unit)
target_link_libraries(tst_parking_rule_tests PRIVATE tst_parking_versions)
