blob: aad3dda4227e2737eb10f9c5896c8e9d21034327 [file] [log] [blame]
// Copyright (c) 2016, 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.
// @dart = 2.9
/// @assertion
/// Description Operator Associativity Precedence
/// Bitwise XOR ˆ Left 10
/// @description Test that '^' bitwise operator has precedence (10).
/// Compare with Bitwise OR operator (precedence 9). Test that '^' has
/// priority higher than '|'
/// @author sgrekhov@unipro.ru
import "../../../Utils/expect.dart";
main() {
Expect.equals(1 | (7 ^ 3) | 4, 1 | 7 ^ 3 | 4);
Expect.notEquals((1 | 7) ^ (3 | 4), 1 | 7 ^ 3 | 4);
Expect.notEquals(((1 | 7) ^ 3) | 4, 1 | 7 ^ 3 | 4);
Expect.notEquals(1 | (7 ^ (3 | 4)), 1 | 7 ^ 3 | 4);
}