File tree Expand file tree Collapse file tree 4 files changed +53
-27
lines changed
test/built-ins/String/prototype Expand file tree Collapse file tree 4 files changed +53
-27
lines changed Original file line number Diff line number Diff line change 2
2
// This code is governed by the BSD license found in the LICENSE file.
3
3
4
4
/*---
5
- esid: pending
6
- description: Behavoir when "this" value is a boolean.
5
+ esid: sec-string.prototype.trimEnd
6
+ description: Behavior when "this" value is a boolean.
7
+ info: |
8
+ TrimString
9
+ 2. Let S be ? ToString(str).
10
+
11
+ ToString
12
+ Argument Type: Boolean
13
+ Result:
14
+ If argument is true, return "true".
15
+ If argument is false, return "false".
16
+ features: [string-trimming]
7
17
---*/
8
18
9
- var trimStart = String . prototype . trimStart
19
+ var trimEnd = String . prototype . trimEnd
10
20
11
21
assert . sameValue (
12
- trimStart . call ( true ) ,
13
- 'true' ,
14
- 'String.prototype.trimStart .call(true)'
22
+ trimEnd . call ( true ) ,
23
+ 'true' ,
24
+ 'String.prototype.trimEnd .call(true)'
15
25
) ;
16
26
17
27
assert . sameValue (
18
- String . prototype . trimStart . call ( false ) ,
19
- 'false' ,
20
- 'String.prototype.trimStart .call(false)'
28
+ String . prototype . trimEnd . call ( false ) ,
29
+ 'false' ,
30
+ 'String.prototype.trimEnd .call(false)'
21
31
) ;
Original file line number Diff line number Diff line change 2
2
// This code is governed by the BSD license found in the LICENSE file.
3
3
4
4
/*---
5
- esid: pending
5
+ esid: sec-string.prototype.trimEnd
6
6
description: Type error when "this" value is a Symbol
7
7
info: |
8
8
TrimString
@@ -11,11 +11,14 @@ info: |
11
11
ToString
12
12
Argument Type: Symbol
13
13
Result: Throw a TypeError exception
14
+ features: [string-trimming]
14
15
---*/
15
16
16
17
var trimEnd = String . prototype . trimEnd ;
17
- var symbol = Symbol ( )
18
+ var symbol = Symbol ( ) ;
18
19
19
- assert . throws ( TypeError , function ( ) {
20
- trimEnd . call ( symbol ) ;
21
- } , 'Symbol()' ) ;
20
+ assert . throws (
21
+ TypeError ,
22
+ function ( ) { trimEnd . call ( symbol ) ; } ,
23
+ 'String.prototype.trimEnd.call(Symbol())'
24
+ ) ;
Original file line number Diff line number Diff line change 2
2
// This code is governed by the BSD license found in the LICENSE file.
3
3
4
4
/*---
5
- esid: pending
6
- description: Behavoir when "this" value is a boolean.
5
+ esid: sec-string.prototype.trimStart
6
+ description: Behavior when "this" value is a boolean.
7
+ info: |
8
+ TrimString
9
+ 2. Let S be ? ToString(str).
10
+
11
+ ToString
12
+ Argument Type: Boolean
13
+ Result:
14
+ If argument is true, return "true".
15
+ If argument is false, return "false".
16
+ features: [string-trimming]
7
17
---*/
8
18
9
19
var trimStart = String . prototype . trimStart
10
20
11
21
assert . sameValue (
12
- trimStart . call ( true ) ,
13
- 'true' ,
14
- 'String.prototype.trimStart.call(true)'
22
+ trimStart . call ( true ) ,
23
+ 'true' ,
24
+ 'String.prototype.trimStart.call(true)'
15
25
) ;
16
26
17
27
assert . sameValue (
18
- String . prototype . trimStart . call ( false ) ,
19
- 'false' ,
20
- 'String.prototype.trimStart.call(false)'
28
+ String . prototype . trimStart . call ( false ) ,
29
+ 'false' ,
30
+ 'String.prototype.trimStart.call(false)'
21
31
) ;
Original file line number Diff line number Diff line change 2
2
// This code is governed by the BSD license found in the LICENSE file.
3
3
4
4
/*---
5
- esid: pending
5
+ esid: sec-string.prototype.trimStart
6
6
description: Type error when "this" value is a Symbol
7
7
info: |
8
8
TrimString
@@ -11,11 +11,14 @@ info: |
11
11
ToString
12
12
Argument Type: Symbol
13
13
Result: Throw a TypeError exception
14
+ features: [string-trimming]
14
15
---*/
15
16
16
17
var trimStart = String . prototype . trimStart ;
17
- var symbol = Symbol ( )
18
+ var symbol = Symbol ( ) ;
18
19
19
- assert . throws ( TypeError , function ( ) {
20
- trimStart . call ( symbol ) ;
21
- } , 'Symbol()' ) ;
20
+ assert . throws (
21
+ TypeError ,
22
+ function ( ) { trimStart . call ( symbol ) ; } ,
23
+ 'String.prototype.trimStart.call(Symbol())'
24
+ ) ;
You can’t perform that action at this time.
0 commit comments