summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/Tuple/prototype/indexOf/undefined-throws-type-error.js
blob: da72398b79ce9f2eb779531e9a40c810ae111d4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// |reftest| skip-if(!this.hasOwnProperty("Tuple"))
// Copyright (c) 2012 Ecma International.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
description: Tuple.prototype.indexOf applied to undefined throws a TypeError
---*/


assertThrowsInstanceOf(function() {
  Tuple.prototype.indexOf.call(undefined);
}, TypeError);

assertThrowsInstanceOf(function() {
  Tuple.prototype.indexOf.call(null);
}, TypeError);

reportCompare(0, 0);