summaryrefslogtreecommitdiffstats
path: root/js/src/tests/ecma_7/TypedObject/arrayzerolen.js
blob: c8cdf2f5423ac9a0e312a2fcbda8170e03a24545 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// |reftest| skip-if(!this.hasOwnProperty("TypedObject"))
var BUGNUMBER = 926401;
var summary = 'TypedObjects ArrayType implementation';

// Test creation of zero-length array

function runTest() {
  var T = TypedObject;
  var Color = new T.StructType({'r': T.uint8, 'g': T.uint8, 'b': T.uint8});
  var Rainbow = Color.array(0);
  var theOneISawWasJustBlack = new Rainbow([]);
  if (typeof reportCompare === "function")
    reportCompare(true, true);
  print("Tests complete");
}

runTest();