1/* 2 * Copyright (c) 2024 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16package com.huawei.migrationtool.test.sts; 17 18export class binary_operations { 19 private sum1 : int = 3 + 2; 20 private sum2 : int = 3 + 2 - 4 + 1; 21 private sub1 : int = 8 - 3; 22 private sub2 : int = 8 - 3 + 8; 23 private rem1 : int = 5 % 3; 24 private rem2 : int = 5 % 3 - 2 * 8; 25 private mult1 : float = 6.2 * 3.14; 26 private mult2 : double = 6.2 * (3.7 + 8.18) / 2.2; 27 private div1 : float = 4.2 / 2.3; 28 private div2 : double = 4.2 / (2.2 - 0.1) + (3.3 / 6.1); 29 private lsh : int = 7 << 2; 30 private rsh1 : int = 7 >> 2; 31 private rsh2 : int = 7 >>> 2; 32 private bit1 : int = 7 & 3; 33 private bit2 : int = 7 | 3; 34 private bit3 : int = 7 ^ 3; 35 private b1 : boolean = 3 < 8; 36 private b2 : boolean = 3 <= 7; 37 private b3 : boolean = 3 >= 7; 38 private b4 : boolean = 3 > 8; 39 private b5 : boolean = 7 == 8; 40 private b6 : boolean = 7 != 4; 41 private b7 : boolean = (7 < 3) && (8 > 1); 42 private b8 : boolean = (7 < 3) || (8 > 1); 43} 44