Skip to content

Commit eab9d3b

Browse files
mysticatearwaldron
authored andcommitted
update tests to follow review
1 parent 7b1a828 commit eab9d3b

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

test/language/expressions/object/literal-property-name-bigint.js

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2019 Igalia S.L, Toru Nagashima. All rights reserved.
1+
// Copyright (C) 2020 Igalia S.L, Toru Nagashima. All rights reserved.
22
// This code is governed by the BSD license found in the LICENSE file.
33

44
/*---
@@ -33,28 +33,22 @@ let o = { 999999999999999999n: true }; // greater than max safe integer
3333
assert.sameValue(o["999999999999999999"], true,
3434
"the property name must be the string representation of the numeric value.");
3535

36-
o = { 1n: "foo" };
37-
assert.sameValue(o[1n], "foo");
38-
assert.sameValue(o[1], "foo");
39-
assert.sameValue(o["1"], "foo");
40-
4136
// MethodDeclaration
4237

4338
o = { 1n() { return "bar"; } };
44-
assert.sameValue(o[1n](), "bar");
45-
assert.sameValue(o[1](), "bar");
46-
assert.sameValue(o["1"](), "bar");
39+
assert.sameValue(o["1"](), "bar",
40+
"the property name must be the string representation of the numeric value.");
4741

4842
class C {
4943
1n() { return "baz"; }
5044
}
5145

5246
let c = new C();
53-
assert.sameValue(c[1n](), "baz");
54-
assert.sameValue(c[1](), "baz");
55-
assert.sameValue(c["1"](), "baz");
47+
assert.sameValue(c["1"](), "baz",
48+
"the property name must be the string representation of the numeric value.");
5649

5750
// Destructuring
5851

59-
let {1n: a} = {1n: "foo"};
60-
assert.sameValue(a, "foo");
52+
let { 1n: a } = { "1": "foo" };
53+
assert.sameValue(a, "foo",
54+
"the property name must be the string representation of the numeric value.");

0 commit comments

Comments
 (0)