Commit 6033c022 authored by Mitch Sturba's avatar Mitch Sturba
Browse files

Merge branch 'sturbam-master-patch-09647' into 'master'

version_3.0:fully_documented

See merge request !2
parents 65de1cc3 24885267
//Group 12: Tony Alas, Jameel Jiwani, Nathan Seit, Mitchell Sturba
package trigCode;
public class Trig {
......
//Group 12: Tony Alas, Jameel Jiwani, Nathan Seit, Mitchell Sturba
package trigCode;
import static org.junit.jupiter.api.Assertions.*;
......@@ -7,6 +8,7 @@ import org.junit.jupiter.api.Test;
public class TrigTest {
//Variable Decleration
Trig t;
double x;
double x1;
......@@ -16,6 +18,7 @@ public class TrigTest {
double x5;
static double PI = 3.1415926535;
//Setting up the variables
@BeforeEach
void setUp() throws Exception {
t = new Trig();
......@@ -27,6 +30,7 @@ public class TrigTest {
x5 = 180;
}
//Tests to ensure that the Cos funciton in Trig works properly
@Test
void testTrigCos() {
// to do... write test cases for cosine
......@@ -36,6 +40,7 @@ public class TrigTest {
assertEquals(t.trigCos(x3), Math.cos(x3), 0.000005);
}
//Tests to ensure that the Sin funciton in Trig works properly
@Test
void testTrigSin() {
assertEquals(t.trigSin(x), Math.sin(x), 0.000005);
......@@ -43,7 +48,8 @@ public class TrigTest {
assertEquals(t.trigSin(x2), Math.sin(x2), 0.000005);
assertEquals(t.trigSin(x3), Math.sin(x3), 0.000005);
}
//Tests to ensure that the Tan funciton in Trig works properly
@Test
void testTrigTan() {
assertEquals(t.trigTan(x), Math.tan(x), 0.000005);
......@@ -52,7 +58,7 @@ public class TrigTest {
assertEquals(t.trigTan(x3), Math.tan(x3), 0.000005);
}
//Tests to ensure that the degree to rad funciton in Trig works properly
@Test
void testDegToRad()
{
......@@ -63,6 +69,7 @@ public class TrigTest {
assertEquals(t.convertDegreesToRadians(x5), Math.toRadians(x5), 0.000005);
}
//Tests to ensure that the rad to degree funciton in Trig works properly
@Test
void testRadToDeg()
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment