Skip to content

Commit 9e0fb44

Browse files
committed
if a unitary schema name begins with fail_, expect it to fail
1 parent a6ff331 commit 9e0fb44

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

test/CMakeLists.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1-
21
#
32
# Adding unittest for unitary schemas
43
#
54
FILE(GLOB UNITARY_SCHEMAS "${CMAKE_CURRENT_SOURCE_DIR}/unitary_schemas/*.exp")
65
FOREACH(UNITARY_SCHEMA ${UNITARY_SCHEMAS})
76
GET_FILENAME_COMPONENT(SCHEMA_NAME ${UNITARY_SCHEMA} NAME_WE)
8-
# setting test_name
97
SET(TEST_NAME test_unit_${SCHEMA_NAME})
10-
# add test
118
ADD_TEST(${TEST_NAME} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/check-express ${UNITARY_SCHEMA})
129
set_tests_properties( ${TEST_NAME} PROPERTIES LABELS unitary_schemas )
10+
#if the file name begins with fail_, then testing it should result in an error.
11+
if( UNITARY_SCHEMA MATCHES "fail_.*" )
12+
set_tests_properties( ${TEST_NAME} PROPERTIES WILL_FAIL true )
13+
endif( UNITARY_SCHEMA MATCHES "fail_.*" )
1314
ENDFOREACH(UNITARY_SCHEMA ${UNITARY_SCHEMAS})
1415

1516
add_subdirectory(p21)

0 commit comments

Comments
 (0)