blob: 1e2a5bd157925ec292582a23b03e97e8328a9a9b [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 offsetInBytes
/// Returns the offset in bytes into the underlying byte buffer of this view.
/// @description Checks that [offsetInBytes] is read-only and can't be set
/// @author msyabro
import "dart:typed_data";
import "../../../Utils/expect.dart";
Float32x4 pack(v) => new Float32x4.splat(v);
void check(List<Float32x4> array) {
dynamic l = new Float32x4List.fromList(array);
Expect.throws(() { l.offsetInBytes = 0; }, (e) => e is NoSuchMethodError);
}
main() {
check([]);
check([pack(1.0)]);
check(new Float32x4List(100));
}