blob: 4a64560e939173203f131bae04d9a4f06e599075 [file] [log] [blame]
/*
* Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
* for details. All rights reserved. Use of this source code is governed by a
* BSD-style license that can be found in the LICENSE file.
*/
/**
* @assertion int get length
* Returns the number of elements in the list.
* @description Checks that the number of elements is returned.
* @author msyabro
*/
import "dart:typed_data";
import "../../../Utils/expect.dart";
pack(v) => new Float32x4.splat(v);
O() => new Float32x4.zero();
void check(array, length) {
var l = new Float32x4List.fromList(array);
Expect.equals(length, l.length);
}
main() {
check([], 0);
check([pack(1.0)], 1);
check([pack(1.0), pack(2.0), pack(3.0), pack(4.0), pack(5.0)], 5);
check([O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(),
O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(),
O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(),
O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(),
O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O(), O()], 150);
}