diff options
author | Neil Fuller <nfuller@google.com> | 2015-02-12 10:13:45 +0000 |
---|---|---|
committer | Neil Fuller <nfuller@google.com> | 2015-05-07 13:16:18 +0000 |
commit | d6a213526251896b7f9928334a17ae0dd97669ba (patch) | |
tree | 816f9e042fd3110fd8a02a3b79bc4e9c17725a91 /core/tests | |
parent | dbf62ace0dcb671f5eaa97c0dfa75e39bc9c88be (diff) | |
download | frameworks_base-d6a213526251896b7f9928334a17ae0dd97669ba.zip frameworks_base-d6a213526251896b7f9928334a17ae0dd97669ba.tar.gz frameworks_base-d6a213526251896b7f9928334a17ae0dd97669ba.tar.bz2 |
Remove FloatMath methods from the API
Also removing FloatMathTest. The tests are being
moved into a legacy CTS suite.
Bug: https://code.google.com/p/android/issues/detail?id=36199
Change-Id: I397fd6bcc4d988db6301245f9d47460bd6c28821
Diffstat (limited to 'core/tests')
-rw-r--r-- | core/tests/coretests/src/android/util/FloatMathTest.java | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/core/tests/coretests/src/android/util/FloatMathTest.java b/core/tests/coretests/src/android/util/FloatMathTest.java deleted file mode 100644 index f479e2b..0000000 --- a/core/tests/coretests/src/android/util/FloatMathTest.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (C) 2007 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package android.util; - -import junit.framework.TestCase; -import android.test.suitebuilder.annotation.SmallTest; - -public class FloatMathTest extends TestCase { - - @SmallTest - public void testSqrt() { - assertEquals(7, FloatMath.sqrt(49), 0); - assertEquals(10, FloatMath.sqrt(100), 0); - assertEquals(0, FloatMath.sqrt(0), 0); - assertEquals(1, FloatMath.sqrt(1), 0); - } - - @SmallTest - public void testFloor() { - assertEquals(78, FloatMath.floor(78.89f), 0); - assertEquals(-79, FloatMath.floor(-78.89f), 0); - } - - @SmallTest - public void testCeil() { - assertEquals(79, FloatMath.ceil(78.89f), 0); - assertEquals(-78, FloatMath.ceil(-78.89f), 0); - } - - @SmallTest - public void testSin() { - assertEquals(0.0, FloatMath.sin(0), 0); - assertEquals(0.8414709848078965f, FloatMath.sin(1), 0); - } - - @SmallTest - public void testCos() { - assertEquals(1.0f, FloatMath.cos(0), 0); - assertEquals(0.5403023058681398f, FloatMath.cos(1), 0); - } -} |