Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cse332-22sp
p3-public
Commits
1b04a521
Commit
1b04a521
authored
Feb 16, 2022
by
Aashna Sheth
Browse files
Reworded test names
parent
b84bfed2
Changes
6
Hide whitespace changes
Inline
Side-by-side
src/main/java/paralleltasks/GetPopulationTask.java
View file @
1b04a521
...
...
@@ -18,7 +18,7 @@ public class GetPopulationTask extends RecursiveTask<Integer> {
double
w
,
s
,
e
,
n
;
MapCorners
grid
;
public
GetPopulationTask
(
CensusGroup
[]
censusGroups
,
int
lo
,
int
hi
,
double
w
,
double
s
,
double
e
,
double
n
,
,
MapCorners
grid
)
{
public
GetPopulationTask
(
CensusGroup
[]
censusGroups
,
int
lo
,
int
hi
,
double
w
,
double
s
,
double
e
,
double
n
,
MapCorners
grid
)
{
throw
new
NotYetImplementedException
();
}
...
...
src/test/java/ckpt1/SimpleParallelTests.java
View file @
1b04a521
...
...
@@ -25,28 +25,28 @@ public class SimpleParallelTests extends QueryResponderTests {
*/
@Test
public
void
test
FullMap_
100
_
500
()
{
public
void
test
_getPopulation_full
100
x
500
Map_correctPopulation
()
{
assertEquals
(
312471327
,
STUDENT_100_500
.
getPopulation
(
1
,
1
,
100
,
500
));
}
@Test
public
void
test
L
eftHalf
_
100
_
500
()
{
public
void
test
_getPopulation_l
eftHalf100
x
500
Map_correctPopulation
()
{
assertEquals
(
27820072
,
STUDENT_100_500
.
getPopulation
(
1
,
1
,
50
,
500
));
}
@Test
public
void
test
R
ightHalf
_
100
_
500
()
{
public
void
test
_getPopulation_r
ightHalf100
x
500
Map_correctPopulation
()
{
assertEquals
(
284651255
,
STUDENT_100_500
.
getPopulation
(
51
,
1
,
100
,
500
));
}
@Test
public
void
test
C
enter
_
100
_
500
()
{
public
void
test
_getPopulation_c
enter100
x
500
Map_correctPopulations
()
{
assertEquals
(
7084297
,
STUDENT_100_500
.
getPopulation
(
20
,
200
,
60
,
300
));
assertEquals
(
179539805
,
STUDENT_100_500
.
getPopulation
(
50
,
100
,
90
,
250
));
}
@Test
public
void
test
C
orners
_
100
_
500
()
{
public
void
test
_getPopulation_c
orners100
x
500
Map_correctPopulations
()
{
assertEquals
(
0
,
STUDENT_100_500
.
getPopulation
(
1
,
1
,
1
,
1
));
assertEquals
(
207111
,
STUDENT_100_500
.
getPopulation
(
100
,
1
,
100
,
1
));
assertEquals
(
0
,
STUDENT_100_500
.
getPopulation
(
1
,
500
,
1
,
500
));
...
...
@@ -54,17 +54,17 @@ public class SimpleParallelTests extends QueryResponderTests {
}
@Test
public
void
test
H
awaii
_
100
_
500
()
{
public
void
test
_getPopulation_h
awaii100
x
500
Map_correctPopulation
()
{
assertEquals
(
1360301
,
STUDENT_100_500
.
getPopulation
(
10
,
1
,
20
,
40
));
}
@Test
public
void
test
C
anada
_
100
_
500
()
{
public
void
test
_getPopulation_c
anada100
x
500
Map_correctPopulation
()
{
assertEquals
(
0
,
STUDENT_100_500
.
getPopulation
(
50
,
250
,
100
,
450
));
}
@Test
public
void
test
T
otalPopulation_100
_
500
()
{
public
void
test
_t
otalPopulation_
full
100
x
500
Map_correctPopulation
()
{
assertEquals
(
312471327
,
STUDENT_100_500
.
getTotalPopulation
());
}
...
...
@@ -73,22 +73,22 @@ public class SimpleParallelTests extends QueryResponderTests {
*/
@Test
public
void
test
L
eftHalf
_
20
_
40
()
{
public
void
test
_getPopulation_l
eftHalf20
x
40
Map_correctPopulation
()
{
assertEquals
(
27820072
,
STUDENT_20_40
.
getPopulation
(
1
,
1
,
10
,
40
));
}
@Test
public
void
test
R
ightHalf
_
20
_
40
()
{
public
void
test
_getPopulation_r
ightHalf20
x
40
Map_correctPopulation
()
{
assertEquals
(
284651255
,
STUDENT_20_40
.
getPopulation
(
11
,
1
,
20
,
40
));
}
@Test
public
void
test
C
enter
_
20
_
40
()
{
public
void
test
_getPopulation_c
enter20
x
40
Map_correctPopulation
()
{
assertEquals
(
62861861
,
STUDENT_20_40
.
getPopulation
(
5
,
10
,
15
,
30
));
}
@Test
public
void
test
C
orners
_
20
_
40
()
{
public
void
test
_getPopulation_c
orners20
x
40
Map_correctPopulations
()
{
assertEquals
(
0
,
STUDENT_20_40
.
getPopulation
(
1
,
1
,
1
,
1
));
assertEquals
(
3725789
,
STUDENT_20_40
.
getPopulation
(
20
,
1
,
20
,
1
));
assertEquals
(
0
,
STUDENT_20_40
.
getPopulation
(
1
,
40
,
1
,
40
));
...
...
@@ -96,17 +96,17 @@ public class SimpleParallelTests extends QueryResponderTests {
}
@Test
public
void
test
H
awaii
_
20
_
40
()
{
public
void
test
_getPopulation_h
awaii20
x
40
Map_correctPopulation
()
{
assertEquals
(
1360301
,
STUDENT_20_40
.
getPopulation
(
2
,
1
,
4
,
3
));
}
@Test
public
void
test
C
anada
_
20
_
40
()
{
public
void
test
_getPopulation_c
anada20
x
40
Map_correctPopulation
()
{
assertEquals
(
0
,
STUDENT_20_40
.
getPopulation
(
10
,
20
,
20
,
35
));
}
@Test
public
void
test
T
otalPopulation_20
_
40
()
{
public
void
test
_t
otalPopulation_
full
20
x
40
Map_correctPopulation
()
{
assertEquals
(
312471327
,
STUDENT_20_40
.
getTotalPopulation
());
}
}
\ No newline at end of file
src/test/java/ckpt1/SimpleSequentialTests.java
View file @
1b04a521
...
...
@@ -25,28 +25,28 @@ public class SimpleSequentialTests extends QueryResponderTests {
*/
@Test
public
void
test
FullMap_
100
_
500
()
{
public
void
test
_getPopulation_full
100
x
500
Map_correctPopulation
()
{
assertEquals
(
312471327
,
STUDENT_100_500
.
getPopulation
(
1
,
1
,
100
,
500
));
}
@Test
public
void
test
L
eftHalf
_
100
_
500
()
{
public
void
test
_getPopulation_l
eftHalf100
x
500
Map_correctPopulation
()
{
assertEquals
(
27820072
,
STUDENT_100_500
.
getPopulation
(
1
,
1
,
50
,
500
));
}
@Test
public
void
test
R
ightHalf
_
100
_
500
()
{
public
void
test
_getPopulation_r
ightHalf100
x
500
Map_correctPopulation
()
{
assertEquals
(
284651255
,
STUDENT_100_500
.
getPopulation
(
51
,
1
,
100
,
500
));
}
@Test
public
void
test
C
enter
_
100
_
500
()
{
public
void
test
_getPopulation_c
enter100
x
500
Map_correctPopulations
()
{
assertEquals
(
7084297
,
STUDENT_100_500
.
getPopulation
(
20
,
200
,
60
,
300
));
assertEquals
(
179539805
,
STUDENT_100_500
.
getPopulation
(
50
,
100
,
90
,
250
));
}
@Test
public
void
test
C
orners
_
100
_
500
()
{
public
void
test
_getPopulation_c
orners100
x
500
Map_correctPopulations
()
{
assertEquals
(
0
,
STUDENT_100_500
.
getPopulation
(
1
,
1
,
1
,
1
));
assertEquals
(
207111
,
STUDENT_100_500
.
getPopulation
(
100
,
1
,
100
,
1
));
assertEquals
(
0
,
STUDENT_100_500
.
getPopulation
(
1
,
500
,
1
,
500
));
...
...
@@ -54,17 +54,17 @@ public class SimpleSequentialTests extends QueryResponderTests {
}
@Test
public
void
test
H
awaii
_
100
_
500
()
{
public
void
test
_getPopulation_h
awaii100
x
500
Map_correctPopulation
()
{
assertEquals
(
1360301
,
STUDENT_100_500
.
getPopulation
(
10
,
1
,
20
,
40
));
}
@Test
public
void
test
C
anada
_
100
_
500
()
{
public
void
test
_getPopulation_c
anada100
x
500
Map_correctPopulation
()
{
assertEquals
(
0
,
STUDENT_100_500
.
getPopulation
(
50
,
250
,
100
,
450
));
}
@Test
public
void
test
T
otalPopulation_100
_
500
()
{
public
void
test
_t
otalPopulation_
full
100
x
500
Map_correctPopulation
()
{
assertEquals
(
312471327
,
STUDENT_100_500
.
getTotalPopulation
());
}
...
...
@@ -73,22 +73,22 @@ public class SimpleSequentialTests extends QueryResponderTests {
*/
@Test
public
void
test
L
eftHalf
_
20
_
40
()
{
public
void
test
_getPopulation_l
eftHalf20
x
40
Map_correctPopulation
()
{
assertEquals
(
27820072
,
STUDENT_20_40
.
getPopulation
(
1
,
1
,
10
,
40
));
}
@Test
public
void
test
R
ightHalf
_
20
_
40
()
{
public
void
test
_getPopulation_r
ightHalf20
x
40
Map_correctPopulation
()
{
assertEquals
(
284651255
,
STUDENT_20_40
.
getPopulation
(
11
,
1
,
20
,
40
));
}
@Test
public
void
test
C
enter
_
20
_
40
()
{
public
void
test
_getPopulation_c
enter20
x
40
Map_correctPopulation
()
{
assertEquals
(
62861861
,
STUDENT_20_40
.
getPopulation
(
5
,
10
,
15
,
30
));
}
@Test
public
void
test
C
orners
_
20
_
40
()
{
public
void
test
_getPopulation_c
orners20
x
40
Map_correctPopulations
()
{
assertEquals
(
0
,
STUDENT_20_40
.
getPopulation
(
1
,
1
,
1
,
1
));
assertEquals
(
3725789
,
STUDENT_20_40
.
getPopulation
(
20
,
1
,
20
,
1
));
assertEquals
(
0
,
STUDENT_20_40
.
getPopulation
(
1
,
40
,
1
,
40
));
...
...
@@ -96,17 +96,17 @@ public class SimpleSequentialTests extends QueryResponderTests {
}
@Test
public
void
test
H
awaii
_
20
_
40
()
{
public
void
test
_getPopulation_h
awaii20
x
40
Map_correctPopulation
()
{
assertEquals
(
1360301
,
STUDENT_20_40
.
getPopulation
(
2
,
1
,
4
,
3
));
}
@Test
public
void
test
C
anada
_
20
_
40
()
{
public
void
test
_getPopulation_c
anada20
x
40
Map_correctPopulation
()
{
assertEquals
(
0
,
STUDENT_20_40
.
getPopulation
(
10
,
20
,
20
,
35
));
}
@Test
public
void
test
T
otalPopulation_20
_
40
()
{
public
void
test
_t
otalPopulation_
full
20
x
40
Map_correctPopulation
()
{
assertEquals
(
312471327
,
STUDENT_20_40
.
getTotalPopulation
());
}
}
\ No newline at end of file
src/test/java/ckpt2/ComplexParallelTests.java
View file @
1b04a521
...
...
@@ -24,28 +24,28 @@ public class ComplexParallelTests extends QueryResponderTests {
*/
@Test
public
void
test
FullMap_
100
_
500
()
{
public
void
test
_getPopulation_full
100
x
500
Map_correctPopulation
()
{
assertEquals
(
312471327
,
STUDENT_100_500
.
getPopulation
(
1
,
1
,
100
,
500
));
}
@Test
public
void
test
L
eftHalf
_
100
_
500
()
{
public
void
test
_getPopulation_l
eftHalf100
x
500
Map_correctPopulation
()
{
assertEquals
(
27820072
,
STUDENT_100_500
.
getPopulation
(
1
,
1
,
50
,
500
));
}
@Test
public
void
test
R
ightHalf
_
100
_
500
()
{
public
void
test
_getPopulation_r
ightHalf100
x
500
Map_correctPopulation
()
{
assertEquals
(
284651255
,
STUDENT_100_500
.
getPopulation
(
51
,
1
,
100
,
500
));
}
@Test
public
void
test
C
enter
_
100
_
500
()
{
public
void
test
_getPopulation_c
enter100
x
500
Map_correctPopulations
()
{
assertEquals
(
7084297
,
STUDENT_100_500
.
getPopulation
(
20
,
200
,
60
,
300
));
assertEquals
(
179539805
,
STUDENT_100_500
.
getPopulation
(
50
,
100
,
90
,
250
));
}
@Test
public
void
test
C
orners
_
100
_
500
()
{
public
void
test
_getPopulation_c
orners100
x
500
Map_correctPopulations
()
{
assertEquals
(
0
,
STUDENT_100_500
.
getPopulation
(
1
,
1
,
1
,
1
));
assertEquals
(
207111
,
STUDENT_100_500
.
getPopulation
(
100
,
1
,
100
,
1
));
assertEquals
(
0
,
STUDENT_100_500
.
getPopulation
(
1
,
500
,
1
,
500
));
...
...
@@ -53,18 +53,18 @@ public class ComplexParallelTests extends QueryResponderTests {
}
@Test
public
void
test
H
awaii
_
100
_
500
()
{
public
void
test
_getPopulation_h
awaii100
x
500
Map_correctPopulation
()
{
assertEquals
(
1360301
,
STUDENT_100_500
.
getPopulation
(
10
,
1
,
20
,
40
));
}
@Test
public
void
test
C
anada
_
100
_
500
()
{
public
void
test
_getPopulation_c
anada100
x
500
Map_correctPopulation
()
{
assertEquals
(
0
,
STUDENT_100_500
.
getPopulation
(
50
,
250
,
100
,
450
));
}
@Test
public
void
test
T
otalPopulation_100
_
500
()
{
public
void
test
_t
otalPopulation_
full
100
x
500
Map_correctPopulation
()
{
assertEquals
(
312471327
,
STUDENT_100_500
.
getTotalPopulation
());
}
...
...
@@ -73,22 +73,22 @@ public class ComplexParallelTests extends QueryResponderTests {
*/
@Test
public
void
test
L
eftHalf
_
20
_
40
()
{
public
void
test
_getPopulation_l
eftHalf20
x
40
Map_correctPopulation
()
{
assertEquals
(
27820072
,
STUDENT_20_40
.
getPopulation
(
1
,
1
,
10
,
40
));
}
@Test
public
void
test
R
ightHalf
_
20
_
40
()
{
public
void
test
_getPopulation_r
ightHalf20
x
40
Map_correctPopulation
()
{
assertEquals
(
284651255
,
STUDENT_20_40
.
getPopulation
(
11
,
1
,
20
,
40
));
}
@Test
public
void
test
C
enter
_
20
_
40
()
{
public
void
test
_getPopulation_c
enter20
x
40
Map_correctPopulation
()
{
assertEquals
(
62861861
,
STUDENT_20_40
.
getPopulation
(
5
,
10
,
15
,
30
));
}
@Test
public
void
test
C
orners
_
20
_
40
()
{
public
void
test
_getPopulation_c
orners20
x
40
Map_correctPopulations
()
{
assertEquals
(
0
,
STUDENT_20_40
.
getPopulation
(
1
,
1
,
1
,
1
));
assertEquals
(
3725789
,
STUDENT_20_40
.
getPopulation
(
20
,
1
,
20
,
1
));
assertEquals
(
0
,
STUDENT_20_40
.
getPopulation
(
1
,
40
,
1
,
40
));
...
...
@@ -96,17 +96,17 @@ public class ComplexParallelTests extends QueryResponderTests {
}
@Test
public
void
test
H
awaii
_
20
_
40
()
{
public
void
test
_getPopulation_h
awaii20
x
40
Map_correctPopulation
()
{
assertEquals
(
1360301
,
STUDENT_20_40
.
getPopulation
(
2
,
1
,
4
,
3
));
}
@Test
public
void
test
C
anada
_
20
_
40
()
{
public
void
test
_getPopulation_c
anada20
x
40
Map_correctPopulation
()
{
assertEquals
(
0
,
STUDENT_20_40
.
getPopulation
(
10
,
20
,
20
,
35
));
}
@Test
public
void
test
T
otalPopulation_20
_
40
()
{
public
void
test
_t
otalPopulation_
full
20
x
40
Map_correctPopulation
()
{
assertEquals
(
312471327
,
STUDENT_20_40
.
getTotalPopulation
());
}
}
\ No newline at end of file
src/test/java/ckpt2/ComplexSequentialTests.java
View file @
1b04a521
...
...
@@ -24,28 +24,28 @@ public class ComplexSequentialTests extends QueryResponderTests {
*/
@Test
public
void
test
FullMap_
100
_
500
()
{
public
void
test
_getPopulation_full
100
x
500
Map_correctPopulation
()
{
assertEquals
(
312471327
,
STUDENT_100_500
.
getPopulation
(
1
,
1
,
100
,
500
));
}
@Test
public
void
test
L
eftHalf
_
100
_
500
()
{
public
void
test
_getPopulation_l
eftHalf100
x
500
Map_correctPopulation
()
{
assertEquals
(
27820072
,
STUDENT_100_500
.
getPopulation
(
1
,
1
,
50
,
500
));
}
@Test
public
void
test
R
ightHalf
_
100
_
500
()
{
public
void
test
_getPopulation_r
ightHalf100
x
500
Map_correctPopulation
()
{
assertEquals
(
284651255
,
STUDENT_100_500
.
getPopulation
(
51
,
1
,
100
,
500
));
}
@Test
public
void
test
C
enter
_
100
_
500
()
{
public
void
test
_getPopulation_c
enter100
x
500
Map_correctPopulations
()
{
assertEquals
(
7084297
,
STUDENT_100_500
.
getPopulation
(
20
,
200
,
60
,
300
));
assertEquals
(
179539805
,
STUDENT_100_500
.
getPopulation
(
50
,
100
,
90
,
250
));
}
@Test
public
void
test
C
orners
_
100
_
500
()
{
public
void
test
_getPopulation_c
orners100
x
500
Map_correctPopulations
()
{
assertEquals
(
0
,
STUDENT_100_500
.
getPopulation
(
1
,
1
,
1
,
1
));
assertEquals
(
207111
,
STUDENT_100_500
.
getPopulation
(
100
,
1
,
100
,
1
));
assertEquals
(
0
,
STUDENT_100_500
.
getPopulation
(
1
,
500
,
1
,
500
));
...
...
@@ -53,18 +53,18 @@ public class ComplexSequentialTests extends QueryResponderTests {
}
@Test
public
void
test
H
awaii
_
100
_
500
()
{
public
void
test
_getPopulation_h
awaii100
x
500
Map_correctPopulation
()
{
assertEquals
(
1360301
,
STUDENT_100_500
.
getPopulation
(
10
,
1
,
20
,
40
));
}
@Test
public
void
test
C
anada
_
100
_
500
()
{
public
void
test
_getPopulation_c
anada100
x
500
Map_correctPopulation
()
{
assertEquals
(
0
,
STUDENT_100_500
.
getPopulation
(
50
,
250
,
100
,
450
));
}
@Test
public
void
test
T
otalPopulation_100
_
500
()
{
public
void
test
_t
otalPopulation_
full
100
x
500
Map_correctPopulation
()
{
assertEquals
(
312471327
,
STUDENT_100_500
.
getTotalPopulation
());
}
...
...
@@ -73,22 +73,22 @@ public class ComplexSequentialTests extends QueryResponderTests {
*/
@Test
public
void
test
L
eftHalf
_
20
_
40
()
{
public
void
test
_getPopulation_l
eftHalf20
x
40
Map_correctPopulation
()
{
assertEquals
(
27820072
,
STUDENT_20_40
.
getPopulation
(
1
,
1
,
10
,
40
));
}
@Test
public
void
test
R
ightHalf
_
20
_
40
()
{
public
void
test
_getPopulation_r
ightHalf20
x
40
Map_correctPopulation
()
{
assertEquals
(
284651255
,
STUDENT_20_40
.
getPopulation
(
11
,
1
,
20
,
40
));
}
@Test
public
void
test
C
enter
_
20
_
40
()
{
public
void
test
_getPopulation_c
enter20
x
40
Map_correctPopulation
()
{
assertEquals
(
62861861
,
STUDENT_20_40
.
getPopulation
(
5
,
10
,
15
,
30
));
}
@Test
public
void
test
C
orners
_
20
_
40
()
{
public
void
test
_getPopulation_c
orners20
x
40
Map_correctPopulations
()
{
assertEquals
(
0
,
STUDENT_20_40
.
getPopulation
(
1
,
1
,
1
,
1
));
assertEquals
(
3725789
,
STUDENT_20_40
.
getPopulation
(
20
,
1
,
20
,
1
));
assertEquals
(
0
,
STUDENT_20_40
.
getPopulation
(
1
,
40
,
1
,
40
));
...
...
@@ -96,17 +96,17 @@ public class ComplexSequentialTests extends QueryResponderTests {
}
@Test
public
void
test
H
awaii
_
20
_
40
()
{
public
void
test
_getPopulation_h
awaii20
x
40
Map_correctPopulation
()
{
assertEquals
(
1360301
,
STUDENT_20_40
.
getPopulation
(
2
,
1
,
4
,
3
));
}
@Test
public
void
test
C
anada
_
20
_
40
()
{
public
void
test
_getPopulation_c
anada20
x
40
Map_correctPopulation
()
{
assertEquals
(
0
,
STUDENT_20_40
.
getPopulation
(
10
,
20
,
20
,
35
));
}
@Test
public
void
test
T
otalPopulation_20
_
40
()
{
public
void
test
_t
otalPopulation_
full
20
x
40
Map_correctPopulation
()
{
assertEquals
(
312471327
,
STUDENT_20_40
.
getTotalPopulation
());
}
}
\ No newline at end of file
src/test/java/duedate/ComplexLockBasedTests.java
View file @
1b04a521
...
...
@@ -25,28 +25,28 @@ public class ComplexLockBasedTests extends QueryResponderTests {
*/
@Test
public
void
test
FullMap_
100
_
500
()
{
public
void
test
_getPopulation_full
100
x
500
Map_correctPopulation
()
{
assertEquals
(
312471327
,
STUDENT_100_500
.
getPopulation
(
1
,
1
,
100
,
500
));
}
@Test
public
void
test
L
eftHalf
_
100
_
500
()
{
public
void
test
_getPopulation_l
eftHalf100
x
500
Map_correctPopulation
()
{
assertEquals
(
27820072
,
STUDENT_100_500
.
getPopulation
(
1
,
1
,
50
,
500
));
}
@Test
public
void
test
R
ightHalf
_
100
_
500
()
{
public
void
test
_getPopulation_r
ightHalf100
x
500
Map_correctPopulation
()
{
assertEquals
(
284651255
,
STUDENT_100_500
.
getPopulation
(
51
,
1
,
100
,
500
));
}
@Test
public
void
test
C
enter
_
100
_
500
()
{
public
void
test
_getPopulation_c
enter100
x
500
Map_correctPopulations
()
{
assertEquals
(
7084297
,
STUDENT_100_500
.
getPopulation
(
20
,
200
,
60
,
300
));
assertEquals
(
179539805
,
STUDENT_100_500
.
getPopulation
(
50
,
100
,
90
,
250
));
}
@Test
public
void
test
C
orners
_
100
_
500
()
{
public
void
test
_getPopulation_c
orners100
x
500
Map_correctPopulations
()
{
assertEquals
(
0
,
STUDENT_100_500
.
getPopulation
(
1
,
1
,
1
,
1
));
assertEquals
(
207111
,
STUDENT_100_500
.
getPopulation
(
100
,
1
,
100
,
1
));
assertEquals
(
0
,
STUDENT_100_500
.
getPopulation
(
1
,
500
,
1
,
500
));
...
...
@@ -54,18 +54,18 @@ public class ComplexLockBasedTests extends QueryResponderTests {
}
@Test
public
void
test
H
awaii
_
100
_
500
()
{
public
void
test
_getPopulation_h
awaii100
x
500
Map_correctPopulation
()
{
assertEquals
(
1360301
,
STUDENT_100_500
.
getPopulation
(
10
,
1
,
20
,
40
));
}
@Test
public
void
test
C
anada
_
100
_
500
()
{
public
void
test
_getPopulation_c
anada100
x
500
Map_correctPopulation
()
{
assertEquals
(
0
,
STUDENT_100_500
.
getPopulation
(
50
,
250
,
100
,
450
));
}
@Test
public
void
test
T
otalPopulation_100
_
500
()
{
public
void
test
_t
otalPopulation_
full
100
x
500
Map_correctPopulation
()
{
assertEquals
(
312471327
,
STUDENT_100_500
.
getTotalPopulation
());
}
...
...
@@ -74,22 +74,22 @@ public class ComplexLockBasedTests extends QueryResponderTests {
*/
@Test
public
void
test
L
eftHalf
_
20
_
40
()
{
public
void
test
_getPopulation_l
eftHalf20
x
40
Map_correctPopulation
()
{
assertEquals
(
27820072
,
STUDENT_20_40
.
getPopulation
(
1
,
1
,
10
,
40
));
}
@Test
public
void
test
R
ightHalf
_
20
_
40
()
{
public
void
test
_getPopulation_r
ightHalf20
x
40
Map_correctPopulation
()
{
assertEquals
(
284651255
,
STUDENT_20_40
.
getPopulation
(
11
,
1
,
20
,
40
));
}
@Test
public
void
test
C
enter
_
20
_
40
()
{
public
void
test
_getPopulation_c
enter20
x
40
Map_correctPopulation
()
{
assertEquals
(
62861861
,
STUDENT_20_40
.
getPopulation
(
5
,
10
,
15
,
30
));
}
@Test
public
void
test
C
orners
_
20
_
40
()
{
public
void
test
_getPopulation_c
orners20
x
40
Map_correctPopulations
()
{
assertEquals
(
0
,
STUDENT_20_40
.
getPopulation
(
1
,
1
,
1
,
1
));
assertEquals
(
3725789
,
STUDENT_20_40
.
getPopulation
(
20
,
1
,
20
,
1
));
assertEquals
(
0
,
STUDENT_20_40
.
getPopulation
(
1
,
40
,
1
,
40
));
...
...
@@ -97,17 +97,17 @@ public class ComplexLockBasedTests extends QueryResponderTests {
}
@Test
public
void
test
H
awaii
_
20
_
40
()
{
public
void
test
_getPopulation_h
awaii20
x
40
Map_correctPopulation
()
{
assertEquals
(
1360301
,
STUDENT_20_40
.
getPopulation
(
2
,
1
,
4
,
3
));
}
@Test
public
void
test
C
anada
_
20
_
40
()
{
public
void
test
_getPopulation_c
anada20
x
40
Map_correctPopulation
()
{
assertEquals
(
0
,
STUDENT_20_40
.
getPopulation
(
10
,
20
,
20
,
35
));
}
@Test
public
void
test
T
otalPopulation_20
_
40
()
{
public
void
test
_t
otalPopulation_
full
20
x
40
Map_correctPopulation
()
{
assertEquals
(
312471327
,
STUDENT_20_40
.
getTotalPopulation
());
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment