[Cmake-commits] CMake branch, next, updated. v2.8.9-868-gc53454e

Rolf Eike Beer eike at sf-mail.de
Sat Sep 29 09:53:44 EDT 2012


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  c53454e28a212205b3b846a8ddec18d220a7b8db (commit)
       via  55d05d70ebc1fa94afd13c4a5389b4e85ed37a9e (commit)
      from  eefe125c7a6930201c6910a6ca66be08112bcd5c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c53454e28a212205b3b846a8ddec18d220a7b8db
commit c53454e28a212205b3b846a8ddec18d220a7b8db
Merge: eefe125 55d05d7
Author:     Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Sat Sep 29 09:53:42 2012 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sat Sep 29 09:53:42 2012 -0400

    Merge topic 'start-contributing-irc-session' into next
    
    55d05d7 Add tests for list() invalid arguments


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=55d05d70ebc1fa94afd13c4a5389b4e85ed37a9e
commit 55d05d70ebc1fa94afd13c4a5389b4e85ed37a9e
Author:     Petr Kmoch <petr.kmoch at gmail.com>
AuthorDate: Sat Sep 29 14:41:07 2012 +0200
Commit:     Rolf Eike Beer <eike at sf-mail.de>
CommitDate: Sat Sep 29 15:52:49 2012 +0200

    Add tests for list() invalid arguments
    
    Add tests for error reporting when list() arguments are invalid.

diff --git a/Tests/CMakeTests/List-Get-Invalid-Index.cmake b/Tests/CMakeTests/List-Get-Invalid-Index.cmake
new file mode 100644
index 0000000..178295a
--- /dev/null
+++ b/Tests/CMakeTests/List-Get-Invalid-Index.cmake
@@ -0,0 +1,2 @@
+set(mylist alpha bravo charlie)
+list(GET mylist 3 result)
diff --git a/Tests/CMakeTests/List-Insert-Invalid-Index.cmake b/Tests/CMakeTests/List-Insert-Invalid-Index.cmake
new file mode 100644
index 0000000..4103d97
--- /dev/null
+++ b/Tests/CMakeTests/List-Insert-Invalid-Index.cmake
@@ -0,0 +1,2 @@
+set(mylist alpha bravo charlie)
+list(INSERT mylist 3 delta)
diff --git a/Tests/CMakeTests/List-Invalid-Subcommand.cmake b/Tests/CMakeTests/List-Invalid-Subcommand.cmake
new file mode 100644
index 0000000..40f2345
--- /dev/null
+++ b/Tests/CMakeTests/List-Invalid-Subcommand.cmake
@@ -0,0 +1 @@
+list(NO_SUCH_SUBCOMMAND)
diff --git a/Tests/CMakeTests/List-Remove_At-Invalid-Index.cmake b/Tests/CMakeTests/List-Remove_At-Invalid-Index.cmake
new file mode 100644
index 0000000..d4f3921
--- /dev/null
+++ b/Tests/CMakeTests/List-Remove_At-Invalid-Index.cmake
@@ -0,0 +1,2 @@
+set(mylist alpha bravo charlie)
+list(REMOVE_AT mylist 3)
diff --git a/Tests/CMakeTests/List-Remove_At-Nonexistent-List.cmake b/Tests/CMakeTests/List-Remove_At-Nonexistent-List.cmake
new file mode 100644
index 0000000..5266c7f
--- /dev/null
+++ b/Tests/CMakeTests/List-Remove_At-Nonexistent-List.cmake
@@ -0,0 +1,2 @@
+unset(nosuchlist)
+list(REMOVE_AT nosuchlist 0)
diff --git a/Tests/CMakeTests/List-Remove_Duplicates-Nonexistent-List.cmake b/Tests/CMakeTests/List-Remove_Duplicates-Nonexistent-List.cmake
new file mode 100644
index 0000000..218f227
--- /dev/null
+++ b/Tests/CMakeTests/List-Remove_Duplicates-Nonexistent-List.cmake
@@ -0,0 +1,2 @@
+unset(nosuchlist)
+list(REMOVE_DUPLICATES nosuchlist)
diff --git a/Tests/CMakeTests/List-Remove_Item-Nonexistent-List.cmake b/Tests/CMakeTests/List-Remove_Item-Nonexistent-List.cmake
new file mode 100644
index 0000000..079e7fb
--- /dev/null
+++ b/Tests/CMakeTests/List-Remove_Item-Nonexistent-List.cmake
@@ -0,0 +1,2 @@
+unset(nosuchlist)
+list(REMOVE_ITEM nosuchlist alpha)
diff --git a/Tests/CMakeTests/List-Reverse-Nonexistent-List.cmake b/Tests/CMakeTests/List-Reverse-Nonexistent-List.cmake
new file mode 100644
index 0000000..977e2cc
--- /dev/null
+++ b/Tests/CMakeTests/List-Reverse-Nonexistent-List.cmake
@@ -0,0 +1,2 @@
+unset(nosuchlist)
+list(REVERSE nosuchlist)
diff --git a/Tests/CMakeTests/List-Sort-Nonexistent-List.cmake b/Tests/CMakeTests/List-Sort-Nonexistent-List.cmake
new file mode 100644
index 0000000..8f48e10
--- /dev/null
+++ b/Tests/CMakeTests/List-Sort-Nonexistent-List.cmake
@@ -0,0 +1,2 @@
+unset(nosuchlist)
+list(SORT nosuchlist)
diff --git a/Tests/CMakeTests/ListTest.cmake.in b/Tests/CMakeTests/ListTest.cmake.in
index ccc597c..6869627 100644
--- a/Tests/CMakeTests/ListTest.cmake.in
+++ b/Tests/CMakeTests/ListTest.cmake.in
@@ -140,6 +140,20 @@ set(Sort-Too-Many-Arguments-STDERR ".*CMake Error at (@CMAKE_CURRENT_SOURCE_DIR@
 set(Remove_At-No-Arguments-RESULT 1)
 set(Remove_At-No-Arguments-STDERR ".*CMake Error at (@CMAKE_CURRENT_SOURCE_DIR@/)?List-Remove_At-No-Arguments.cmake:1 \\(list\\):.*list sub-command REMOVE_AT requires at least two arguments.*")
 
+set(Invalid-Subcommand-RESULT 1)
+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(cmd Get Insert Remove_At)
+  set(${cmd}-Invalid-Index-RESULT 1)
+  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\\).*")
+endforeach()
+
+foreach(cmd Remove_Item Reverse Remove_Duplicates Sort Remove_At)
+  string(TOUPPER ${cmd} Cmd)
+  set(${cmd}-Nonexistent-List-RESULT 1)
+  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()
+
 include("@CMAKE_CURRENT_SOURCE_DIR@/CheckCMakeTest.cmake")
 check_cmake_test(List
   No-Arguments
@@ -156,4 +170,13 @@ check_cmake_test(List
   Sort-No-Arguments
   Sort-Too-Many-Arguments
   Remove_At-No-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
 )

-----------------------------------------------------------------------

Summary of changes:
 Tests/CMakeTests/List-Get-Invalid-Index.cmake      |    2 +
 Tests/CMakeTests/List-Insert-Invalid-Index.cmake   |    2 +
 Tests/CMakeTests/List-Invalid-Subcommand.cmake     |    1 +
 .../CMakeTests/List-Remove_At-Invalid-Index.cmake  |    2 +
 .../List-Remove_At-Nonexistent-List.cmake          |    2 +
 .../List-Remove_Duplicates-Nonexistent-List.cmake  |    2 +
 .../List-Remove_Item-Nonexistent-List.cmake        |    2 +
 .../CMakeTests/List-Reverse-Nonexistent-List.cmake |    2 +
 Tests/CMakeTests/List-Sort-Nonexistent-List.cmake  |    2 +
 Tests/CMakeTests/ListTest.cmake.in                 |   23 ++++++++++++++++++++
 10 files changed, 40 insertions(+), 0 deletions(-)
 create mode 100644 Tests/CMakeTests/List-Get-Invalid-Index.cmake
 create mode 100644 Tests/CMakeTests/List-Insert-Invalid-Index.cmake
 create mode 100644 Tests/CMakeTests/List-Invalid-Subcommand.cmake
 create mode 100644 Tests/CMakeTests/List-Remove_At-Invalid-Index.cmake
 create mode 100644 Tests/CMakeTests/List-Remove_At-Nonexistent-List.cmake
 create mode 100644 Tests/CMakeTests/List-Remove_Duplicates-Nonexistent-List.cmake
 create mode 100644 Tests/CMakeTests/List-Remove_Item-Nonexistent-List.cmake
 create mode 100644 Tests/CMakeTests/List-Reverse-Nonexistent-List.cmake
 create mode 100644 Tests/CMakeTests/List-Sort-Nonexistent-List.cmake


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list