diff --git a/test/Strings/compare.baseline b/test/Strings/compare.baseline deleted file mode 100644 index 43d3823cace..00000000000 --- a/test/Strings/compare.baseline +++ /dev/null @@ -1,4 +0,0 @@ -Basic string compare. -compare ( 'abcd1234' , 'abcd1234' ) = 0 -compare ( 'abcd1234' , '1234567a' ) = 1 -compare ( 'abcd1234' , undef ) = -1 diff --git a/test/Strings/compare.js b/test/Strings/compare.js index 1ef0b2bcec0..c403df99d41 100644 --- a/test/Strings/compare.js +++ b/test/Strings/compare.js @@ -3,11 +3,16 @@ // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. //------------------------------------------------------------------------------------------------------- -WScript.Echo("Basic string compare."); +WScript.LoadScriptFile("..\\UnitTestFramework\\UnitTestFramework.js", "self"); + var str1 = "abcd1234" var str2 = "1234567a" +var str3 = "abcd12345" var str1a = "abcd1234" -WScript.Echo("compare ( '" + str1 + "' , '" + str1a + "' ) = " + str1.localeCompare(str1a)); -WScript.Echo("compare ( '" + str1 + "' , '" + str2 + "' ) = " + str1.localeCompare(str2)); -WScript.Echo("compare ( '" + str1 + "' , undef ) = " + str1.localeCompare()); +assert.isTrue(str1.localeCompare(str1a) == 0); +assert.isTrue(str1.localeCompare(str2) > 0); +assert.isTrue(str1.localeCompare(str3) < 0); +assert.isTrue(str1.localeCompare() < 0); + +console.log("pass") \ No newline at end of file diff --git a/test/Strings/rlexe.xml b/test/Strings/rlexe.xml index 3e4c2c7e220..d6600c82bee 100644 --- a/test/Strings/rlexe.xml +++ b/test/Strings/rlexe.xml @@ -105,7 +105,6 @@ compare.js - compare.baseline