diff options
author | David Cole <david.cole@kitware.com> | 2009-11-06 15:07:10 (GMT) |
---|---|---|
committer | David Cole <david.cole@kitware.com> | 2009-11-06 15:07:10 (GMT) |
commit | d6fe0438c1d5c6ecd5ebc0377781175ce14ac251 (patch) | |
tree | 7ac99f9ad88911211a8c003f2f19d2b4754f1543 /Tests/CMakeTests/StringTestScript.cmake | |
parent | 10762565e95b9cac08b7a0b643fdc5bf39bb2b96 (diff) | |
download | CMake-d6fe0438c1d5c6ecd5ebc0377781175ce14ac251.zip CMake-d6fe0438c1d5c6ecd5ebc0377781175ce14ac251.tar.gz CMake-d6fe0438c1d5c6ecd5ebc0377781175ce14ac251.tar.bz2 |
Fix issue #9851 - only seed the random number generator on the first call to STRING(RANDOM or if given the new RANDOM_SEED argument. Add test and documentation of new argument.
Diffstat (limited to 'Tests/CMakeTests/StringTestScript.cmake')
-rw-r--r-- | Tests/CMakeTests/StringTestScript.cmake | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Tests/CMakeTests/StringTestScript.cmake b/Tests/CMakeTests/StringTestScript.cmake index 652d81b..3703856 100644 --- a/Tests/CMakeTests/StringTestScript.cmake +++ b/Tests/CMakeTests/StringTestScript.cmake @@ -182,6 +182,14 @@ elseif(testname STREQUAL random_with_various_alphabets) # pass string(RANDOM LENGTH 1 ALPHABET "Q" v) message(STATUS "v='${v}'") + # seed values -- 2 same, then 1 different + string(RANDOM LENGTH 32 ALPHABET "ACGT" RANDOM_SEED 987654 v) + message(STATUS "v='${v}'") + string(RANDOM LENGTH 32 ALPHABET "ACGT" RANDOM_SEED 987654 v) + message(STATUS "v='${v}'") + string(RANDOM LENGTH 32 ALPHABET "ACGT" RANDOM_SEED 876543 v) + message(STATUS "v='${v}'") + # alphabet of many colors - use all the crazy keyboard characters string(RANDOM LENGTH 78 ALPHABET "~`!@#$%^&*()_-+={}[]\\|:\\;'\",.<>/?" v) message(STATUS "v='${v}'") |