diff options
Diffstat (limited to 'Tests/RunCMake/string/Uuid.cmake')
-rw-r--r-- | Tests/RunCMake/string/Uuid.cmake | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Tests/RunCMake/string/Uuid.cmake b/Tests/RunCMake/string/Uuid.cmake new file mode 100644 index 0000000..2613d26 --- /dev/null +++ b/Tests/RunCMake/string/Uuid.cmake @@ -0,0 +1,17 @@ +set(UUID_DNS_NAMESPACE 6ba7b810-9dad-11d1-80b4-00c04fd430c8) + +string(UUID WWW_EXAMPLE_COM_MD5_UUID + NAMESPACE ${UUID_DNS_NAMESPACE} NAME www.example.com TYPE MD5) + +if(NOT WWW_EXAMPLE_COM_MD5_UUID STREQUAL "5df41881-3aed-3515-88a7-2f4a814cf09e") + message(SEND_ERROR + "UUID did not create the expected MD5 result: ${WWW_EXAMPLE_COM_MD5_UUID}") +endif() + +string(UUID WWW_EXAMPLE_COM_SHA1_UUID + NAMESPACE ${UUID_DNS_NAMESPACE} NAME www.example.com TYPE SHA1 UPPER) + +if(NOT WWW_EXAMPLE_COM_SHA1_UUID STREQUAL "2ED6657D-E927-568B-95E1-2665A8AEA6A2") + message(SEND_ERROR + "UUID did not create the expected SHA1 result: ${WWW_EXAMPLE_COM_SHA1_UUID}") +endif() |