| sameValue: function(i, e, m) { |
| function bigIntRShift(x, y) { |
| let o = {valueOf: () => 4n}; |
| for (let i = 0; i < 10000; i++) { |
| let r = bigIntRShift(0b10001n, o); |
| assert.sameValue(r, 1n, 0b10001n + " >> {valueOf: () => 4n} = " + r); |
| o2 = {valueOf: () => 0b10000n}; |
| for (let i = 0; i < 10000; i++) { |
| let r = bigIntRShift(o2, o); |
| assert.sameValue(r, 1n, "{valueOf: () => 0b10000n} >> {valueOf: () => 4n} = " + r); |
| let r = bigIntRShift(0b11n, o); |
| assert.sameValue(r, 0n, 0b11n + " >> Object(0b10n) = " + r); |
| assert.sameValue(r, 0b11000n, "Object(0b1100001n) * Object(10n) = " + r); |