aboutsummaryrefslogtreecommitdiffstats
path: root/test/built-ins/String/prototype/localeCompare/S15.5.4.9_A1_T2.js
blob: 65aa3fbf311ad31298d0dd977dcb1a1bfe595044 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Copyright 2009 the Sputnik authors.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
info: String.prototype.localeCompare(that)
es5id: 15.5.4.9_A1_T2
description: >
    Call string_1.localeCompare(string_2) is equal
    -string_2.localeCompare(string_1)
---*/

//CHECK#1
var str1 = "h";
var str2 = "H";
if (str1.localeCompare(str2) !== -str2.localeCompare(str1)) {
  $ERROR('#1.1: var str1 = "h"; var str2 = "H"; str1.localeCompare(str2)===-str2.localeCompare(str1). Actual: ' + str1.localeCompare(str2));
}