Make JsMap public #1315
Annotations
10 errors
Test:
Jint.Tests/Runtime/ArrayTests.cs#L146
Jint.Runtime.JavaScriptException : adder must be callable
---- Jint.Runtime.JavaScriptException+JavaScriptErrorWrapperException : adder must be callable
|
Test:
Jint.Tests/Runtime/ArrayTests.cs#L170
Jint.Runtime.JavaScriptException : adder must be callable
---- Jint.Runtime.JavaScriptException+JavaScriptErrorWrapperException : adder must be callable
|
Test:
Jint.Tests.Test262/Generated/Tests262Harness.Tests.built-ins.generated.cs#L12896
built-ins/Map/bigint-number-same-value.js
Jint.Runtime.JavaScriptException: adder must be callable
---> Error: adder must be callable
at Map built-ins/Map/bigint-number-same-value.js:26:11
at built-ins/Map/bigint-number-same-value.js:23:15
--- End of inner exception stack trace ---
at Jint.Engine.ScriptEvaluation(ScriptRecord scriptRecord, ParserOptions parserOptions) in /home/runner/work/jint/jint/Jint/Engine.cs:line 458
at Jint.Engine.ExecuteWithConstraints[T](Boolean strict, Func`1 callback) in /home/runner/work/jint/jint/Jint/Engine.cs:line 818
at Jint.Tests.Test262.Test262Test.ExecuteTest(Engine engine, Test262File file) in /home/runner/work/jint/jint/Jint.Tests.Test262/Test262Test.cs:line 102
at Jint.Tests.Test262.Test262Test.RunTestCode(String test, Boolean strict) in /home/runner/work/jint/jint/Jint.Tests.Test262/Generated/Tests262Harness.Test262Test.generated.cs:line 77
01: "use strict";
02: // Copyright (C) 2021 Rick Waldron. All rights reserved.
03: // This code is governed by the BSD license found in the LICENSE file.
04: /*---
05: esid: sec-map.prototype.set
06: description: >
07: Observing the expected behavior of keys when a BigInt and Number have
08: the same value.
09: info: |
10: Map.prototype.set ( key , value )
11:
12: ...
13: Let p be the Record {[[key]]: key, [[value]]: value}.
14: Append p as the last element of entries.
15: ...
16:
17: features: [BigInt]
18: ---*/
19:
20: const number = 9007199254740991;
21: const bigint = 9007199254740991n;
22:
23: const m = new Map([
24: [number, number],
25: [bigint, bigint],
26: ]);
27:
28: assert.sameValue(m.size, 2);
29: assert.sameValue(m.has(number), true);
30: assert.sameValue(m.has(bigint), true);
31:
32: assert.sameValue(m.get(number), number);
33: assert.sameValue(m.get(bigint), bigint);
34:
35: m.delete(number);
36: assert.sameValue(m.size, 1);
37: assert.sameValue(m.has(number), false);
38: m.delete(bigint);
39: assert.sameValue(m.size, 0);
40: assert.sameValue(m.has(bigint), false);
41:
42: m.set(number, number);
43: assert.sameValue(m.size, 1);
44: m.set(bigint, bigint);
45: assert.sameValue(m.size, 2);
46:
|
Test:
Jint.Tests.Test262/Generated/Tests262Harness.Tests.built-ins.generated.cs#L12896
built-ins/Map/bigint-number-same-value.js
Jint.Runtime.JavaScriptException: adder must be callable
---> Error: adder must be callable
at Map built-ins/Map/bigint-number-same-value.js:25:11
at built-ins/Map/bigint-number-same-value.js:22:15
--- End of inner exception stack trace ---
at Jint.Engine.ScriptEvaluation(ScriptRecord scriptRecord, ParserOptions parserOptions) in /home/runner/work/jint/jint/Jint/Engine.cs:line 458
at Jint.Engine.ExecuteWithConstraints[T](Boolean strict, Func`1 callback) in /home/runner/work/jint/jint/Jint/Engine.cs:line 818
at Jint.Tests.Test262.Test262Test.ExecuteTest(Engine engine, Test262File file) in /home/runner/work/jint/jint/Jint.Tests.Test262/Test262Test.cs:line 102
at Jint.Tests.Test262.Test262Test.RunTestCode(String test, Boolean strict) in /home/runner/work/jint/jint/Jint.Tests.Test262/Generated/Tests262Harness.Test262Test.generated.cs:line 77
01: // Copyright (C) 2021 Rick Waldron. All rights reserved.
02: // This code is governed by the BSD license found in the LICENSE file.
03: /*---
04: esid: sec-map.prototype.set
05: description: >
06: Observing the expected behavior of keys when a BigInt and Number have
07: the same value.
08: info: |
09: Map.prototype.set ( key , value )
10:
11: ...
12: Let p be the Record {[[key]]: key, [[value]]: value}.
13: Append p as the last element of entries.
14: ...
15:
16: features: [BigInt]
17: ---*/
18:
19: const number = 9007199254740991;
20: const bigint = 9007199254740991n;
21:
22: const m = new Map([
23: [number, number],
24: [bigint, bigint],
25: ]);
26:
27: assert.sameValue(m.size, 2);
28: assert.sameValue(m.has(number), true);
29: assert.sameValue(m.has(bigint), true);
30:
31: assert.sameValue(m.get(number), number);
32: assert.sameValue(m.get(bigint), bigint);
33:
34: m.delete(number);
35: assert.sameValue(m.size, 1);
36: assert.sameValue(m.has(number), false);
37: m.delete(bigint);
38: assert.sameValue(m.size, 0);
39: assert.sameValue(m.has(bigint), false);
40:
41: m.set(number, number);
42: assert.sameValue(m.size, 1);
43: m.set(bigint, bigint);
44: assert.sameValue(m.size, 2);
45:
|
Test:
Jint.Tests.Test262/Generated/Tests262Harness.Tests.built-ins.generated.cs#L12896
built-ins/Map/get-set-method-failure.js
Jint.Runtime.JavaScriptException: Expected a Test262Error but got a TypeError
---> Error: Expected a Test262Error but got a TypeError
at assert.throws (expectedErrorConstructor, func, message) harness/assert.js:95:13
at built-ins/Map/get-set-method-failure.js:24:1
--- End of inner exception stack trace ---
at Jint.Engine.ScriptEvaluation(ScriptRecord scriptRecord, ParserOptions parserOptions) in /home/runner/work/jint/jint/Jint/Engine.cs:line 458
at Jint.Engine.ExecuteWithConstraints[T](Boolean strict, Func`1 callback) in /home/runner/work/jint/jint/Jint/Engine.cs:line 818
at Jint.Tests.Test262.Test262Test.ExecuteTest(Engine engine, Test262File file) in /home/runner/work/jint/jint/Jint.Tests.Test262/Test262Test.cs:line 102
at Jint.Tests.Test262.Test262Test.RunTestCode(String test, Boolean strict) in /home/runner/work/jint/jint/Jint.Tests.Test262/Generated/Tests262Harness.Test262Test.generated.cs:line 77
01: // Copyright (C) 2015 the V8 project authors. All rights reserved.
02: // This code is governed by the BSD license found in the LICENSE file.
03: /*---
04: esid: sec-map-iterable
05: description: >
06: new Map returns abrupt from getting Map.prototype.set.
07: info: |
08: Map ( [ iterable ] )
09:
10: ...
11: 7. Else,
12: a. Let adder be Get(map, "add").
13: b. ReturnIfAbrupt(adder).
14: ---*/
15:
16: Object.defineProperty(Map.prototype, 'set', {
17: get: function() {
18: throw new Test262Error();
19: }
20: });
21:
22: new Map();
23:
24: assert.throws(Test262Error, function() {
25: new Map([]);
26: });
27:
|
Test:
Jint.Tests.Test262/Generated/Tests262Harness.Tests.built-ins.generated.cs#L12896
built-ins/Map/get-set-method-failure.js
Jint.Runtime.JavaScriptException: Expected a Test262Error but got a TypeError
---> Error: Expected a Test262Error but got a TypeError
at assert.throws (expectedErrorConstructor, func, message) harness/assert.js:95:13
at built-ins/Map/get-set-method-failure.js:25:1
--- End of inner exception stack trace ---
at Jint.Engine.ScriptEvaluation(ScriptRecord scriptRecord, ParserOptions parserOptions) in /home/runner/work/jint/jint/Jint/Engine.cs:line 458
at Jint.Engine.ExecuteWithConstraints[T](Boolean strict, Func`1 callback) in /home/runner/work/jint/jint/Jint/Engine.cs:line 818
at Jint.Tests.Test262.Test262Test.ExecuteTest(Engine engine, Test262File file) in /home/runner/work/jint/jint/Jint.Tests.Test262/Test262Test.cs:line 102
at Jint.Tests.Test262.Test262Test.RunTestCode(String test, Boolean strict) in /home/runner/work/jint/jint/Jint.Tests.Test262/Generated/Tests262Harness.Test262Test.generated.cs:line 77
01: "use strict";
02: // Copyright (C) 2015 the V8 project authors. All rights reserved.
03: // This code is governed by the BSD license found in the LICENSE file.
04: /*---
05: esid: sec-map-iterable
06: description: >
07: new Map returns abrupt from getting Map.prototype.set.
08: info: |
09: Map ( [ iterable ] )
10:
11: ...
12: 7. Else,
13: a. Let adder be Get(map, "add").
14: b. ReturnIfAbrupt(adder).
15: ---*/
16:
17: Object.defineProperty(Map.prototype, 'set', {
18: get: function() {
19: throw new Test262Error();
20: }
21: });
22:
23: new Map();
24:
25: assert.throws(Test262Error, function() {
26: new Map([]);
27: });
28:
|
Test:
Jint.Tests.Test262/Generated/Tests262Harness.Tests.built-ins.generated.cs#L12896
built-ins/Map/iterable-calls-set.js
Jint.Runtime.JavaScriptException: adder must be callable
---> Error: adder must be callable
at Map built-ins/Map/iterable-calls-set.js:35:11
at built-ins/Map/iterable-calls-set.js:35:15
--- End of inner exception stack trace ---
at Jint.Engine.ScriptEvaluation(ScriptRecord scriptRecord, ParserOptions parserOptions) in /home/runner/work/jint/jint/Jint/Engine.cs:line 458
at Jint.Engine.ExecuteWithConstraints[T](Boolean strict, Func`1 callback) in /home/runner/work/jint/jint/Jint/Engine.cs:line 818
at Jint.Tests.Test262.Test262Test.ExecuteTest(Engine engine, Test262File file) in /home/runner/work/jint/jint/Jint.Tests.Test262/Test262Test.cs:line 102
at Jint.Tests.Test262.Test262Test.RunTestCode(String test, Boolean strict) in /home/runner/work/jint/jint/Jint.Tests.Test262/Generated/Tests262Harness.Test262Test.generated.cs:line 77
01: // Copyright (C) 2015 the V8 project authors. All rights reserved.
02: // This code is governed by the BSD license found in the LICENSE file.
03: /*---
04: esid: sec-map-iterable
05: description: >
06: new Map calls `set` for each item on the iterable argument in order.
07: info: |
08: Map ( [ iterable ] )
09:
10: ...
11: 9. Repeat
12: ...
13: k. Let status be Call(adder, map, «k.[[value]], v.[[value]]»).
14: ...
15: includes: [compareArray.js]
16: ---*/
17:
18: var mapSet = Map.prototype.set;
19: var counter = 0;
20:
21: var iterable = [
22: ["foo", 1],
23: ["bar", 2]
24: ];
25: var results = [];
26: var _this = [];
27:
28: Map.prototype.set = function(k, v) {
29: counter++;
30: results.push([k, v]);
31: _this.push(this);
32: mapSet.call(this, k, v);
33: };
34:
35: var map = new Map(iterable);
36:
37: assert.sameValue(counter, 2, "`Map.prototype.set` called twice.");
38:
39: assert.compareArray(results[0], iterable[0]);
40: assert.compareArray(results[1], iterable[1]);
41: assert.sameValue(_this[0], map);
42: assert.sameValue(_this[1], map);
43:
|
Test:
Jint.Tests.Test262/Generated/Tests262Harness.Tests.built-ins.generated.cs#L12896
built-ins/Map/iterable-calls-set.js
Jint.Runtime.JavaScriptException: adder must be callable
---> Error: adder must be callable
at Map built-ins/Map/iterable-calls-set.js:36:11
at built-ins/Map/iterable-calls-set.js:36:15
--- End of inner exception stack trace ---
at Jint.Engine.ScriptEvaluation(ScriptRecord scriptRecord, ParserOptions parserOptions) in /home/runner/work/jint/jint/Jint/Engine.cs:line 458
at Jint.Engine.ExecuteWithConstraints[T](Boolean strict, Func`1 callback) in /home/runner/work/jint/jint/Jint/Engine.cs:line 818
at Jint.Tests.Test262.Test262Test.ExecuteTest(Engine engine, Test262File file) in /home/runner/work/jint/jint/Jint.Tests.Test262/Test262Test.cs:line 102
at Jint.Tests.Test262.Test262Test.RunTestCode(String test, Boolean strict) in /home/runner/work/jint/jint/Jint.Tests.Test262/Generated/Tests262Harness.Test262Test.generated.cs:line 77
01: "use strict";
02: // Copyright (C) 2015 the V8 project authors. All rights reserved.
03: // This code is governed by the BSD license found in the LICENSE file.
04: /*---
05: esid: sec-map-iterable
06: description: >
07: new Map calls `set` for each item on the iterable argument in order.
08: info: |
09: Map ( [ iterable ] )
10:
11: ...
12: 9. Repeat
13: ...
14: k. Let status be Call(adder, map, «k.[[value]], v.[[value]]»).
15: ...
16: includes: [compareArray.js]
17: ---*/
18:
19: var mapSet = Map.prototype.set;
20: var counter = 0;
21:
22: var iterable = [
23: ["foo", 1],
24: ["bar", 2]
25: ];
26: var results = [];
27: var _this = [];
28:
29: Map.prototype.set = function(k, v) {
30: counter++;
31: results.push([k, v]);
32: _this.push(this);
33: mapSet.call(this, k, v);
34: };
35:
36: var map = new Map(iterable);
37:
38: assert.sameValue(counter, 2, "`Map.prototype.set` called twice.");
39:
40: assert.compareArray(results[0], iterable[0]);
41: assert.compareArray(results[1], iterable[1]);
42: assert.sameValue(_this[0], map);
43: assert.sameValue(_this[1], map);
44:
|
Test:
Jint.Tests.Test262/Generated/Tests262Harness.Tests.built-ins.generated.cs#L12896
built-ins/Map/iterator-close-after-set-failure.js
Jint.Runtime.JavaScriptException: Expected a Test262Error but got a TypeError
---> Error: Expected a Test262Error but got a TypeError
at assert.throws (expectedErrorConstructor, func, message) harness/assert.js:95:13
at built-ins/Map/iterator-close-after-set-failure.js:37:1
--- End of inner exception stack trace ---
at Jint.Engine.ScriptEvaluation(ScriptRecord scriptRecord, ParserOptions parserOptions) in /home/runner/work/jint/jint/Jint/Engine.cs:line 458
at Jint.Engine.ExecuteWithConstraints[T](Boolean strict, Func`1 callback) in /home/runner/work/jint/jint/Jint/Engine.cs:line 818
at Jint.Tests.Test262.Test262Test.ExecuteTest(Engine engine, Test262File file) in /home/runner/work/jint/jint/Jint.Tests.Test262/Test262Test.cs:line 102
at Jint.Tests.Test262.Test262Test.RunTestCode(String test, Boolean strict) in /home/runner/work/jint/jint/Jint.Tests.Test262/Generated/Tests262Harness.Test262Test.generated.cs:line 77
01: // Copyright (C) 2015 the V8 project authors. All rights reserved.
02: // This code is governed by the BSD license found in the LICENSE file.
03: /*---
04: esid: sec-map-iterable
05: description: >
06: The iterator is closed when `Map.prototype.set` throws an error.
07: info: |
08: Map ( [ iterable ] )
09:
10: ...
11: 9. Repeat
12: ...
13: k. Let status be Call(adder, map, «k.[[value]], v.[[value]]»).
14: l. If status is an abrupt completion, return IteratorClose(iter, status).
15: features: [Symbol.iterator]
16: ---*/
17:
18: var count = 0;
19: var iterable = {};
20: iterable[Symbol.iterator] = function() {
21: return {
22: next: function() {
23: return {
24: value: [],
25: done: false
26: };
27: },
28: return: function() {
29: count += 1;
30: }
31: };
32: };
33: Map.prototype.set = function() {
34: throw new Test262Error();
35: }
36:
37: assert.throws(Test262Error, function() {
38: new Map(iterable);
39: });
40:
41: assert.sameValue(count, 1);
42:
|
Test:
Jint.Tests.Test262/Generated/Tests262Harness.Tests.built-ins.generated.cs#L12896
built-ins/Map/iterator-close-after-set-failure.js
Jint.Runtime.JavaScriptException: Expected a Test262Error but got a TypeError
---> Error: Expected a Test262Error but got a TypeError
at assert.throws (expectedErrorConstructor, func, message) harness/assert.js:95:13
at built-ins/Map/iterator-close-after-set-failure.js:38:1
--- End of inner exception stack trace ---
at Jint.Engine.ScriptEvaluation(ScriptRecord scriptRecord, ParserOptions parserOptions) in /home/runner/work/jint/jint/Jint/Engine.cs:line 458
at Jint.Engine.ExecuteWithConstraints[T](Boolean strict, Func`1 callback) in /home/runner/work/jint/jint/Jint/Engine.cs:line 818
at Jint.Tests.Test262.Test262Test.ExecuteTest(Engine engine, Test262File file) in /home/runner/work/jint/jint/Jint.Tests.Test262/Test262Test.cs:line 102
at Jint.Tests.Test262.Test262Test.RunTestCode(String test, Boolean strict) in /home/runner/work/jint/jint/Jint.Tests.Test262/Generated/Tests262Harness.Test262Test.generated.cs:line 77
01: "use strict";
02: // Copyright (C) 2015 the V8 project authors. All rights reserved.
03: // This code is governed by the BSD license found in the LICENSE file.
04: /*---
05: esid: sec-map-iterable
06: description: >
07: The iterator is closed when `Map.prototype.set` throws an error.
08: info: |
09: Map ( [ iterable ] )
10:
11: ...
12: 9. Repeat
13: ...
14: k. Let status be Call(adder, map, «k.[[value]], v.[[value]]»).
15: l. If status is an abrupt completion, return IteratorClose(iter, status).
16: features: [Symbol.iterator]
17: ---*/
18:
19: var count = 0;
20: var iterable = {};
21: iterable[Symbol.iterator] = function() {
22: return {
23: next: function() {
24: return {
25: value: [],
26: done: false
27: };
28: },
29: return: function() {
30: count += 1;
31: }
32: };
33: };
34: Map.prototype.set = function() {
35: throw new Test262Error();
36: }
37:
38: assert.throws(Test262Error, function() {
39: new Map(iterable);
40: });
41:
42: assert.sameValue(count, 1);
43:
|
Loading