summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2010-01-08 22:00:04 +0100
committerGravatar Jonathan Beck2010-01-14 18:36:21 +0100
commit54f1ffb0f4b1d4808db76fe8d35c240c22fea819 (patch)
treef8241a7c51bd0cc27adae0b3c3fa31db9c443869 /test
parent4154b898c55314df2d41ad119fd174f5042dd925 (diff)
downloadlibplist-54f1ffb0f4b1d4808db76fe8d35c240c22fea819.tar.gz
libplist-54f1ffb0f4b1d4808db76fe8d35c240c22fea819.tar.bz2
Make tests also work when building outside the source tree
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt25
1 files changed, 13 insertions, 12 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 415d076..f933cc1 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -13,16 +13,17 @@ TARGET_LINK_LIBRARIES(plist_cmp plist)
INCLUDE(CTest)
-ADD_TEST(Empty plist_test data/1.plist)
-ADD_TEST(Small plist_test data/2.plist)
-ADD_TEST(Medium plist_test data/3.plist)
-ADD_TEST(Large plist_test data/4.plist)
-ADD_TEST(Huge plist_test data/5.plist)
-ADD_TEST(Big_Array plist_test data/6.plist)
+SET(TEST_DATA_DIR ${CMAKE_CURRENT_SOURCE_DIR})
+ADD_TEST(Empty plist_test ${TEST_DATA_DIR}/data/1.plist)
+ADD_TEST(Small plist_test ${TEST_DATA_DIR}/data/2.plist)
+ADD_TEST(Medium plist_test ${TEST_DATA_DIR}/data/3.plist)
+ADD_TEST(Large plist_test ${TEST_DATA_DIR}/data/4.plist)
+ADD_TEST(Huge plist_test ${TEST_DATA_DIR}/data/5.plist)
+ADD_TEST(Big_Array plist_test ${TEST_DATA_DIR}/data/6.plist)
-ADD_TEST(EmptyCmp plist_cmp data/1.plist data/1.plist.out)
-ADD_TEST(SmallCmp plist_cmp data/2.plist data/2.plist.out)
-ADD_TEST(MediumCmp plist_cmp data/3.plist data/3.plist.out)
-ADD_TEST(LargeCmp plist_cmp data/4.plist data/4.plist.out)
-ADD_TEST(HugeCmp plist_cmp data/5.plist data/5.plist.out)
-ADD_TEST(Big_ArrayCmp plist_cmp data/6.plist data/6.plist.out)
+ADD_TEST(EmptyCmp plist_cmp ${TEST_DATA_DIR}/data/1.plist ${TEST_DATA_DIR}/data/1.plist.out)
+ADD_TEST(SmallCmp plist_cmp ${TEST_DATA_DIR}/data/2.plist ${TEST_DATA_DIR}/data/2.plist.out)
+ADD_TEST(MediumCmp plist_cmp ${TEST_DATA_DIR}/data/3.plist ${TEST_DATA_DIR}/data/3.plist.out)
+ADD_TEST(LargeCmp plist_cmp ${TEST_DATA_DIR}/data/4.plist ${TEST_DATA_DIR}/data/4.plist.out)
+ADD_TEST(HugeCmp plist_cmp ${TEST_DATA_DIR}/data/5.plist ${TEST_DATA_DIR}/data/5.plist.out)
+ADD_TEST(Big_ArrayCmp plist_cmp ${TEST_DATA_DIR}/data/6.plist ${TEST_DATA_DIR}/data/6.plist.out)