File: S15.1.2.3_A2_T10.js

package info (click to toggle)
qtdeclarative-opensource-src-gles 5.15.17%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 258,992 kB
  • sloc: javascript: 512,415; cpp: 497,385; xml: 8,892; python: 3,304; ansic: 2,764; sh: 206; makefile: 46; php: 27
file content (42 lines) | stat: -rw-r--r-- 1,290 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// Copyright 2009 the Sputnik authors.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
info: Operator remove leading StrWhiteSpaceChar
es5id: 15.1.2.3_A2_T10
es6id: 18.2.4
esid: sec-parsefloat-string
description: "StrWhiteSpaceChar :: USP"
---*/

//CHECK#
var n;
var count = 0;
var errorCount = 0;
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"];
for (var index = 0; index < uspU.length; index++) {
  var result = true;
  n = false;
  if (parseFloat(uspU[index] + "1.1") !== parseFloat("1.1")) {
    $ERROR('#1.' + uspS[index] + ' ');
    result = false;
  }
  if (parseFloat(uspU[index] + uspU[index] + uspU[index] + "1.1") !== parseFloat("1.1")) {
    $ERROR('#2.' + uspS[index] + ' ');
    result = false;
  }
  n = parseFloat(uspU[index]);
  if (!(n !== n)) {
    $ERROR('#3.' + uspS[index] + ' ');
    result = false;
  }
  if (result !== true) {
    errorCount++;
  }
  count++;
}

if (errorCount > 0) {
  $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count);
}