2011-09-07 08:35:18 +02:00
|
|
|
// Copyright 2009 the Sputnik authors. All rights reserved.
|
|
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
|
2014-07-22 01:09:02 +02:00
|
|
|
/*---
|
|
|
|
info: Operator remove leading StrWhiteSpaceChar
|
2017-06-29 17:10:43 +02:00
|
|
|
esid: sec-parseint-string-radix
|
2014-07-22 01:09:02 +02:00
|
|
|
description: "StrWhiteSpaceChar :: USP"
|
|
|
|
---*/
|
2011-09-07 08:35:18 +02:00
|
|
|
|
2016-06-29 09:39:00 +02:00
|
|
|
var uspU = ["\u1680", "\u2000", "\u2001", "\u2002", "\u2003", "\u2004", "\u2005", "\u2006", "\u2007", "\u2008", "\u2009", "\u200A", "\u202F", "\u205F", "\u3000"];
|
|
|
|
var uspS = ["1680", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "200A", "202F", "205F", "3000"];
|
2011-09-07 08:35:18 +02:00
|
|
|
|
|
|
|
for (var index = 0; index < uspU.length; index++) {
|
2020-09-18 18:06:50 +02:00
|
|
|
assert.sameValue(
|
|
|
|
parseInt(uspU[index] + "1"),
|
|
|
|
parseInt("1"),
|
|
|
|
'parseInt(uspU[index] + "1") must return the same value returned by parseInt("1")'
|
|
|
|
);
|
|
|
|
|
|
|
|
assert.sameValue(
|
|
|
|
parseInt(uspU[index] + uspU[index] + uspU[index] + "1"),
|
|
|
|
parseInt("1"),
|
|
|
|
'parseInt(uspU[index] + uspU[index] + uspU[index] + "1") must return the same value returned by parseInt("1")'
|
|
|
|
);
|
2011-09-07 08:35:18 +02:00
|
|
|
|
2020-09-18 18:06:50 +02:00
|
|
|
let n = parseInt(uspU[index]);
|
|
|
|
assert(n !== n, 'The result of `(n !== n)` is true');
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|