File: asi.js

package info (click to toggle)
qtdeclarative-opensource-src 5.15.2%2Bdfsg-6
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 259,220 kB
  • sloc: javascript: 512,396; cpp: 493,894; xml: 8,892; python: 3,304; ansic: 2,764; sh: 206; makefile: 59; php: 27
file content (66 lines) | stat: -rw-r--r-- 1,393 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-meta-properties-runtime-semantics-evaluation
es6id: 12.3.8.1
description: NewTarget is composed of three distinct tokens
---*/

var newTarget = null;

var withSpaces = function() {
  newTarget = new   .   target;
};

withSpaces();
assert.sameValue(newTarget, undefined, 'tokens seperated by whitespace');

new withSpaces();
assert.sameValue(newTarget, withSpaces, 'tokens separateed by whitespace');

newTarget = null;

var withLineBreaks = function() {
  newTarget = new

.

target;
};

withLineBreaks();
assert.sameValue(newTarget, undefined, 'tokens seperated by line breaks');

new withLineBreaks();
assert.sameValue(newTarget, withLineBreaks, 'tokens seperated by line breaks');

var withSLDC = function() {
  newTarget = new/* */./* */target;
};

withSLDC();
assert.sameValue(
  newTarget, undefined, 'tokens separated by SingleLineDelimitedComments'
);

new withSLDC();
assert.sameValue(
  newTarget, withSLDC, 'tokens separated by SingleLineDelimitedComments'
);


var withMLC = function() {
  newTarget = new/*
  */./*
  */target;
};

withMLC();
assert.sameValue(
  newTarget, undefined, 'tokens separated by MultiLineComments'
);

new withMLC();
assert.sameValue(
  newTarget, withMLC, 'tokens separated by MultiLineComments'
);