forked from TheAlgorithms/Java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGaussianTest.java
More file actions
32 lines (26 loc) · 829 Bytes
/
GaussianTest.java
File metadata and controls
32 lines (26 loc) · 829 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package com.thealgorithms.maths;
import org.junit.jupiter.api.Test;
import java.util.ArrayList;
import static com.thealgorithms.maths.Gaussian.gaussian;
import static org.junit.jupiter.api.Assertions.assertEquals;
public class GaussianTest {
// easy pass test for the whole class. Matrix of 2*3.
@Test
void passTest1()
{
ArrayList<Double> list = new ArrayList<Double>();
ArrayList<Double> gaussian = new ArrayList<Double>();
ArrayList<Double> answer = new ArrayList<Double>();
answer.add(0.0);
answer.add(1.0);
int matrixSize = 2;
list.add(1.0);
list.add(1.0);
list.add(1.0);
list.add(2.0);
list.add(1.0);
list.add(1.0);
gaussian=gaussian(matrixSize,list);
assertEquals(answer,gaussian);
}
}