1 /* 2 * Copyright (C) 2008 The Guava Authors 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package com.google.common.math; 17 public class IntMathTest_gwt extends com.google.gwt.junit.client.GWTTestCase { getModuleName()18@Override public String getModuleName() { 19 return "com.google.common.math.testModule"; 20 } testCheckedAdd()21public void testCheckedAdd() throws Exception { 22 com.google.common.math.IntMathTest testCase = new com.google.common.math.IntMathTest(); 23 testCase.testCheckedAdd(); 24 } 25 testCheckedMultiply()26public void testCheckedMultiply() throws Exception { 27 com.google.common.math.IntMathTest testCase = new com.google.common.math.IntMathTest(); 28 testCase.testCheckedMultiply(); 29 } 30 testCheckedPow()31public void testCheckedPow() throws Exception { 32 com.google.common.math.IntMathTest testCase = new com.google.common.math.IntMathTest(); 33 testCase.testCheckedPow(); 34 } 35 testCheckedSubtract()36public void testCheckedSubtract() throws Exception { 37 com.google.common.math.IntMathTest testCase = new com.google.common.math.IntMathTest(); 38 testCase.testCheckedSubtract(); 39 } 40 testDivByZeroAlwaysFails()41public void testDivByZeroAlwaysFails() throws Exception { 42 com.google.common.math.IntMathTest testCase = new com.google.common.math.IntMathTest(); 43 testCase.testDivByZeroAlwaysFails(); 44 } 45 testDivNonZero()46public void testDivNonZero() throws Exception { 47 com.google.common.math.IntMathTest testCase = new com.google.common.math.IntMathTest(); 48 testCase.testDivNonZero(); 49 } 50 testDivNonZeroExact()51public void testDivNonZeroExact() throws Exception { 52 com.google.common.math.IntMathTest testCase = new com.google.common.math.IntMathTest(); 53 testCase.testDivNonZeroExact(); 54 } 55 testFactorial()56public void testFactorial() throws Exception { 57 com.google.common.math.IntMathTest testCase = new com.google.common.math.IntMathTest(); 58 testCase.testFactorial(); 59 } 60 testFactorialNegative()61public void testFactorialNegative() throws Exception { 62 com.google.common.math.IntMathTest testCase = new com.google.common.math.IntMathTest(); 63 testCase.testFactorialNegative(); 64 } 65 testGCD()66public void testGCD() throws Exception { 67 com.google.common.math.IntMathTest testCase = new com.google.common.math.IntMathTest(); 68 testCase.testGCD(); 69 } 70 testGCDNegativePositiveThrows()71public void testGCDNegativePositiveThrows() throws Exception { 72 com.google.common.math.IntMathTest testCase = new com.google.common.math.IntMathTest(); 73 testCase.testGCDNegativePositiveThrows(); 74 } 75 testGCDNegativeZeroThrows()76public void testGCDNegativeZeroThrows() throws Exception { 77 com.google.common.math.IntMathTest testCase = new com.google.common.math.IntMathTest(); 78 testCase.testGCDNegativeZeroThrows(); 79 } 80 testGCDZero()81public void testGCDZero() throws Exception { 82 com.google.common.math.IntMathTest testCase = new com.google.common.math.IntMathTest(); 83 testCase.testGCDZero(); 84 } 85 testLessThanBranchFree()86public void testLessThanBranchFree() throws Exception { 87 com.google.common.math.IntMathTest testCase = new com.google.common.math.IntMathTest(); 88 testCase.testLessThanBranchFree(); 89 } 90 testLog2Exact()91public void testLog2Exact() throws Exception { 92 com.google.common.math.IntMathTest testCase = new com.google.common.math.IntMathTest(); 93 testCase.testLog2Exact(); 94 } 95 testLog2MatchesBigInteger()96public void testLog2MatchesBigInteger() throws Exception { 97 com.google.common.math.IntMathTest testCase = new com.google.common.math.IntMathTest(); 98 testCase.testLog2MatchesBigInteger(); 99 } 100 testLog2NegativeAlwaysThrows()101public void testLog2NegativeAlwaysThrows() throws Exception { 102 com.google.common.math.IntMathTest testCase = new com.google.common.math.IntMathTest(); 103 testCase.testLog2NegativeAlwaysThrows(); 104 } 105 testLog2ZeroAlwaysThrows()106public void testLog2ZeroAlwaysThrows() throws Exception { 107 com.google.common.math.IntMathTest testCase = new com.google.common.math.IntMathTest(); 108 testCase.testLog2ZeroAlwaysThrows(); 109 } 110 testMod()111public void testMod() throws Exception { 112 com.google.common.math.IntMathTest testCase = new com.google.common.math.IntMathTest(); 113 testCase.testMod(); 114 } 115 testModNegativeModulusFails()116public void testModNegativeModulusFails() throws Exception { 117 com.google.common.math.IntMathTest testCase = new com.google.common.math.IntMathTest(); 118 testCase.testModNegativeModulusFails(); 119 } 120 testModZeroModulusFails()121public void testModZeroModulusFails() throws Exception { 122 com.google.common.math.IntMathTest testCase = new com.google.common.math.IntMathTest(); 123 testCase.testModZeroModulusFails(); 124 } 125 testZeroDivIsAlwaysZero()126public void testZeroDivIsAlwaysZero() throws Exception { 127 com.google.common.math.IntMathTest testCase = new com.google.common.math.IntMathTest(); 128 testCase.testZeroDivIsAlwaysZero(); 129 } 130 } 131