Tests: Simplify RunCMake.{if,while} unbalanced parenthesis cases

This commit is contained in:
Brad King
2022-03-03 16:49:28 -05:00
parent 371235e0d7
commit 47d197745a
4 changed files with 11 additions and 16 deletions

View File

@@ -1,7 +1,7 @@
CMake Error at unbalanced-parenthesis\.cmake:[0-9]+ \(if\):
if given arguments:
"NOT" "\(" "IN_LIST" "some_list"
"\("
mismatched parenthesis in condition
Call Stack \(most recent call first\):

View File

@@ -1,8 +1,5 @@
set(var_with_paren "(")
set(some_list "")
if(NOT ${var_with_paren} IN_LIST some_list)
message(STATUS "Never prints")
else()
message(STATUS "Never prints")
set(paren "(")
if(${paren})
message(STATUS "Condition incorrectly true")
endif()
message(STATUS "Code incorrectly accepted")

View File

@@ -1,7 +1,7 @@
CMake Error at unbalanced-parenthesis.cmake:[0-9]+ \(while\):
had incorrect arguments:
"NOT" "\(" "IN_LIST" "some_list"
"\("
mismatched parenthesis in condition
Call Stack \(most recent call first\):

View File

@@ -1,8 +1,6 @@
set(var_with_paren "(")
set(some_list "")
while(NOT ${var_with_paren} IN_LIST some_list)
message(STATUS "Never prints")
set(paren "(")
while(${paren})
message(STATUS "Condition incorrectly true")
break()
endwhile()
message(STATUS "Never prints")
message(STATUS "Code incorrectly accepted")