blob: a6ffe3c5ebab83ada7f7e29ea5076e84bf71930f [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 Int32x4 lessThan(Float32x4 other)
/// Relational less than.
/// @description Checks that the returned [Int32x4] contains correct values.
/// @author msyabro
import "dart:typed_data";
import "../../../Utils/expect.dart";
check(op1, op2, expected) {
var res = op1.lessThan(op2);
Expect.equals(expected.x, res.x);
Expect.equals(expected.y, res.y);
Expect.equals(expected.z, res.z);
Expect.equals(expected.w, res.w);
main() {
check(new Float32x4(.0, .0, .0, .0), new Float32x4(.0, .0, .0, .0),
new Int32x4.bool(false, false, false, false));
check(new Float32x4(-1.0, -1.0, -.02, -1.32), new Float32x4(.0, .0, .0, .0),
new Int32x4.bool(true, true, true, true));
check( new Float32x4(1.0, 2.0, 1e-3, .04e-2),
new Float32x4(1.0, 10.0, 1e-2, 0.23e40),
new Int32x4.bool(false, true, true, true));