summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Kahler <itsbattledash@gmail.com>2022-08-04 17:18:50 (GMT)
committerBrad King <brad.king@kitware.com>2022-08-04 19:50:59 (GMT)
commite0d3e6e147acfec93351c4ca719777677fc835ba (patch)
treec21049d58379c38e26f8d58a893153ca13a80609
parente95059c867c1ec25f23aa48f9fe4dc8330e25879 (diff)
downloadCMake-e0d3e6e147acfec93351c4ca719777677fc835ba.zip
CMake-e0d3e6e147acfec93351c4ca719777677fc835ba.tar.gz
CMake-e0d3e6e147acfec93351c4ca719777677fc835ba.tar.bz2
string(JSON): Fix typo in error message
`s/then/than/` in a comparison.
-rw-r--r--Source/cmStringCommand.cxx2
-rw-r--r--Tests/RunCMake/string/JSON.cmake6
2 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmStringCommand.cxx b/Source/cmStringCommand.cxx
index fe311d1..c12d1fe 100644
--- a/Source/cmStringCommand.cxx
+++ b/Source/cmStringCommand.cxx
@@ -1014,7 +1014,7 @@ int ParseIndex(
Json::ArrayIndex index = static_cast<Json::ArrayIndex>(lindex);
if (index >= max) {
cmAlphaNum sizeStr{ max };
- throw json_error({ "expected an index less then "_s, sizeStr.View(),
+ throw json_error({ "expected an index less than "_s, sizeStr.View(),
" got '"_s, str, "'"_s },
progress);
}
diff --git a/Tests/RunCMake/string/JSON.cmake b/Tests/RunCMake/string/JSON.cmake
index ab4194d..255c16a 100644
--- a/Tests/RunCMake/string/JSON.cmake
+++ b/Tests/RunCMake/string/JSON.cmake
@@ -129,7 +129,7 @@ assert_strequal("${error}" "member '0' not found")
string(JSON result ERROR_VARIABLE error GET "${json1}" array 10)
assert_strequal("${result}" "array-10-NOTFOUND")
-assert_strequal("${error}" "expected an index less then 4 got '10'")
+assert_strequal("${error}" "expected an index less than 4 got '10'")
string(JSON result ERROR_VARIABLE error GET "${json1}" array 2 some notThere)
assert_strequal("${result}" "array-2-some-notThere-NOTFOUND")
@@ -240,7 +240,7 @@ endif()
string(JSON result ERROR_VARIABLE error MEMBER "${json1}" values 100)
assert_strequal("${result}" "values-100-NOTFOUND")
-assert_strequal("${error}" "expected an index less then 5 got '100'")
+assert_strequal("${error}" "expected an index less than 5 got '100'")
# Test length loops
string(JSON arrayLength ERROR_VARIABLE error LENGTH "${json1}" types array)
@@ -301,7 +301,7 @@ assert_json_equal("${error}" "${result}"
string(JSON result ERROR_VARIABLE error REMOVE ${json2} array 100)
assert_strequal("${result}" "array-100-NOTFOUND")
-assert_strequal("${error}" "expected an index less then 4 got '100'")
+assert_strequal("${error}" "expected an index less than 4 got '100'")
# Test SET
string(JSON result ERROR_VARIABLE error SET ${json2} new 5)