Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Commit

Permalink
deps: update ChakraCore to chakra-core/ChakraCore@396234826c
Browse files Browse the repository at this point in the history
[MERGE #4632 @obastemur] string-test: fix localCompare test

Merge pull request #4632 from obastemur:fix_test_strcmp

spec asks for `<`, `=`, or `>` while our baseline was expecting a particular output.

Reviewed-By: chakrabot <chakrabot@users.noreply.github.com>
  • Loading branch information
obastemur authored and chakrabot committed Feb 2, 2018
1 parent e41955f commit 91356f0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 0 additions & 4 deletions deps/chakrashim/core/test/Strings/compare.baseline

This file was deleted.

13 changes: 9 additions & 4 deletions deps/chakrashim/core/test/Strings/compare.js
Original file line number Diff line number Diff line change
Expand Up @@ -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")
1 change: 0 additions & 1 deletion deps/chakrashim/core/test/Strings/rlexe.xml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@
<test>
<default>
<files>compare.js</files>
<baseline>compare.baseline</baseline>
</default>
</test>
<test>
Expand Down

0 comments on commit 91356f0

Please sign in to comment.