summaryrefslogtreecommitdiff
path: root/app/bin/unittest/CMakeLists.txt
blob: ce5f2f4028129443152b67e28ab6ba4e7bb1d159 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# build unit tests for the xtrkcad library
#

# dxf formatting

add_executable(dxfformattest
				dxfformattest.c
				../dxfformat.c
			  )

target_link_libraries(dxfformattest
                      dynstring
					 ${LIBS})

add_test(DXFOutputTest dxfformattest)

# path manipulation

add_executable( pathstest
				pathstest.c
				)

target_link_libraries(pathstest
                      dynstring
					  xtrkcad-wlib
					  ${LIBS})

add_test(PathsTest pathstest)

# handling of default settings

add_executable( defaultstest
				defaultstest.c
				)

target_link_libraries(defaultstest
                      xtrkcad-wlib
					  ${LIBS})

add_test(DefaultsTest defaultstest)

#

add_executable(shortentest
			  shortentest.c
			  ../shortentext.c
			 )

target_link_libraries(shortentest
					${LIBS})

add_test(ShortenTest shortentest)

# parts catalog
# disabled because it pulls in too many dependencies

# add_test(CatalogTest catalogtest)

# # parameter files for test cases:
# # - two manufacturers
# # - two scales from same manufacturer

# set (TESTXTP 
# 	"atl83ho.xtp" "atlasn.xtp" "HO-Peco-Code83.xtp"
# 	)

# foreach(testfile IN LISTS TESTXTP )
# 	configure_file ( ${CMAKE_CURRENT_SOURCE_DIR}/testfiles/${testfile}
#                 ${CMAKE_CURRENT_BINARY_DIR}
# 				COPYONLY )
# endforeach()

# add_executable(catalogtest
# 				catalogtest.c
# 				../partcatalog.c
# 				../paths.c
# 				../stringxtc.c
# 				../levenshtein.c
# 				)

# target_link_libraries(catalogtest
# 					dynstring
# 					${CMOCKA_LIBRARIES}
# 					)


set_target_properties(
	dxfformattest 
#	catalogtest
	shortentest
	defaultstest
	pathstest
 	PROPERTIES FOLDER UnitTests
 )