Skip to content

Commit ca28a76

Browse files
committed
PR02
1 parent fcb5c0f commit ca28a76

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

unittests/primitives/PointTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ void testSubtract() {
3737
// TC10: Test zero point from point subtraction p1 - p1
3838
assertThrows(
3939
IllegalArgumentException.class,
40-
()->p1.subtract(p1),
40+
() -> p1.subtract(p1),
4141
"ERROR: Point - itself does not throw an exception"
4242
);
4343
}

unittests/primitives/VectorTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ void testAdd() {
2828
// TC10: Test zero vector from vector adding v1 + -v1
2929
assertThrows(
3030
IllegalArgumentException.class,
31-
()->v1.add(new Vector(-1, -2, -3)),
31+
() -> v1.add(new Vector(-1, -2, -3)),
3232
"ERROR: Vector + -itself does not throw an exception"
3333
);
3434
}
@@ -51,7 +51,7 @@ void testScale() {
5151
// TC10: Test zero vector from scaling a vector by 0
5252
assertThrows(
5353
IllegalArgumentException.class,
54-
()->v1.scale(0),
54+
() -> v1.scale(0),
5555
"ERROR: Vector scaled by 0 does not throw an exception"
5656
);
5757
}
@@ -109,7 +109,7 @@ void testCrossProduct() {
109109
Vector v3 = new Vector(-2, -4, -6);
110110
assertThrows(
111111
IllegalArgumentException.class,
112-
()->v1.crossProduct(v3),
112+
() -> v1.crossProduct(v3),
113113
"ERROR: crossProduct() for parallel vectors does not throw an exception"
114114
);
115115
}
@@ -160,7 +160,7 @@ void testNormalize() {
160160
// TC10: Test zero vector from cross-product of co-lined vectors
161161
assertThrows(
162162
IllegalArgumentException.class,
163-
()->v.crossProduct(u),
163+
() -> v.crossProduct(u),
164164
"ERROR: the normalized vector is not parallel to the original one"
165165
);
166166
}

0 commit comments

Comments
 (0)