# these commands should just do nothing if the list is already empty
set(result"")
list(REMOVE_DUPLICATESresult)
TEST("REMOVE_DUPLICATES empty result""")
list(REVERSEresult)
TEST("REVERSE empty result""")
list(SORTresult)
TEST("SORT empty result""")
set(No-Arguments-RESULT1)
set(No-Arguments-STDERR".*CMake Error at (@CMAKE_CURRENT_SOURCE_DIR@/)?List-No-Arguments.cmake:1 \\(list\\):.*list must be called with at least two arguments.*")
set(Length-Too-Many-Arguments-STDERR".*CMake Error at (@CMAKE_CURRENT_SOURCE_DIR@/)?List-Length-Too-Many-Arguments.cmake:1 \\(list\\):.*list sub-command LENGTH requires two arguments.*")
set(Reverse-Too-Many-Arguments-RESULT1)
set(Reverse-Too-Many-Arguments-STDERR".*CMake Error at (@CMAKE_CURRENT_SOURCE_DIR@/)?List-Reverse-Too-Many-Arguments.cmake:1 \\(list\\):.*list sub-command REVERSE only takes one argument.*")
set(Remove_Duplicates-Too-Many-Arguments-RESULT1)
set(Remove_Duplicates-Too-Many-Arguments-STDERR".*CMake Error at (@CMAKE_CURRENT_SOURCE_DIR@/)?List-Remove_Duplicates-Too-Many-Arguments.cmake:1 \\(list\\):.*list sub-command REMOVE_DUPLICATES only takes one argument.*")
set(Sort-Too-Many-Arguments-RESULT1)
set(Sort-Too-Many-Arguments-STDERR".*CMake Error at (@CMAKE_CURRENT_SOURCE_DIR@/)?List-Sort-Too-Many-Arguments.cmake:1 \\(list\\):.*list sub-command SORT only takes one argument.*")
set(Invalid-Subcommand-RESULT1)
set(Invalid-Subcommand-STDERR".*CMake Error at (@CMAKE_CURRENT_SOURCE_DIR@/)?List-Invalid-Subcommand.cmake:1 \\(list\\):.*list does not recognize sub-command NO_SUCH_SUBCOMMAND.*")
foreach(cmdGetInsertRemove_At)
set(${cmd}-Invalid-Index-RESULT1)
set(${cmd}-Invalid-Index-STDERR".*CMake Error at (@CMAKE_CURRENT_SOURCE_DIR@/)?List-${cmd}-Invalid-Index.cmake:2 \\(list\\):.*list index: 3 out of range \\(-3, 2\\).*")
set(${cmd}-Nonexistent-List-STDERR".*CMake Error at (@CMAKE_CURRENT_SOURCE_DIR@/)?List-${cmd}-Nonexistent-List.cmake:2 \\(list\\):.*sub-command ${Cmd} requires list to be present.*")
endforeach()
set(Get-CMP0007-Warn-RESULT0)
set(Get-CMP0007-Warn-STDERR".*CMake Warning \\(dev\\) at (@CMAKE_CURRENT_SOURCE_DIR@/)?List-Get-CMP0007-Warn.cmake:3 \\(list\\):.*Policy CMP0007 is not set:.*")
check_cmake_test(List
No-Arguments
Length-Too-Many-Arguments
Reverse-Too-Many-Arguments
Remove_Duplicates-Too-Many-Arguments
Sort-Too-Many-Arguments
Invalid-Subcommand
Get-Invalid-Index
Insert-Invalid-Index
Remove_Item-Nonexistent-List
Reverse-Nonexistent-List
Remove_Duplicates-Nonexistent-List
Sort-Nonexistent-List
Remove_At-Nonexistent-List
Remove_At-Invalid-Index
Get-CMP0007-Warn
)
set(thelist""NEWOLD)
foreach(_pol${thelist})
cmake_policy(SETCMP0007${_pol})
list(GETthelist1thevalue)
if(NOTthevalueSTREQUAL_pol)
message(SEND_ERROR"returned element '${thevalue}', but expected '${_pol}'")