123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
-
-
- import static org.junit.Assert.*;
- import org.junit.After;
- import org.junit.Before;
- import org.junit.Test;
-
- /**
- * The test class TrigonometryTest.
- *
- * @author (your name)
- * @version (a version number or a date)
- */
- public class TrigonometryTest
- {
- /**
- * Default constructor for test class TrigonometryTest
- */
- public TrigonometryTest()
- {
- }
-
- /**
- * Sets up the test fixture.
- *
- * Called before every test case method.
- */
- @Before
- public void setUp()
- {
- }
-
- /**
- * Tears down the test fixture.
- *
- * Called after every test case method.
- */
- @After
- public void tearDown()
- {
- }
-
- @Test
- public void TanTrigTest()
- {
- assertEquals(-0.5872139151569291, Trigonometry.tan(100), 0.1);
- }
-
- @Test
- public void CosTrigTest()
- {
- assertEquals(0.8623188722876839, Trigonometry.cos(100), 0.1);
- }
-
- @Test
- public void ATanTrigTest()
- {
- assertEquals(1.5607966601082315, Trigonometry.tanInverse(100), 0.1);
- }
-
- @Test
- public void ACosTrigTest()
- {
- assertEquals(3.141592653589793, Trigonometry.cosInverse(-1), 0.1);
- }
-
- @Test
- public void ASinTrigTest()
- {
- assertEquals(-1.5707963267948966, Trigonometry.sinInverse(-1), 0.1);
- }
- }
-
-
-
-
-
|