From e11143b6234348925556b8cac2c92c2cb98f2b61 Mon Sep 17 00:00:00 2001 From: zml Date: Mon, 3 May 2021 14:46:21 -0700 Subject: [PATCH] Remove API that appears to be unnecessary with immutable types (#31) --- .../math/imaginary/Complex{{E}}.java.peb | 25 ++-------------- .../math/imaginary/Quaternion{{E}}.java.peb | 23 +------------- .../math/matrix/Matrix2{{E}}.java.peb | 29 +++++------------- .../math/matrix/Matrix3{{E}}.java.peb | 29 ++++-------------- .../math/matrix/Matrix4{{E}}.java.peb | 30 +++++-------------- .../math/vector/Vector2{{E}}.java.peb | 15 +--------- .../math/vector/Vector3{{E}}.java.peb | 15 +--------- .../math/vector/Vector4{{E}}.java.peb | 15 +--------- .../math/vector/Vector2{{E}}.java.peb | 15 +--------- .../math/vector/Vector3{{E}}.java.peb | 15 +--------- .../math/vector/Vector4{{E}}.java.peb | 15 +--------- .../test/imaginary/Complex{{E}}Test.java.peb | 16 ++-------- .../imaginary/Quaternion{{E}}Test.java.peb | 16 ++-------- .../test/matrix/Matrix2{{E}}Test.java.peb | 16 ++-------- .../test/matrix/Matrix3{{E}}Test.java.peb | 16 ++-------- .../test/matrix/Matrix4{{E}}Test.java.peb | 28 ++--------------- .../test/vector/Vector2{{E}}Test.java.peb | 16 ++-------- .../test/vector/Vector3{{E}}Test.java.peb | 16 ++-------- .../test/vector/Vector4{{E}}Test.java.peb | 16 ++-------- .../test/vector/VectorN{{E}}Test.java.peb | 1 + .../test/vector/Vector2{{E}}Test.java.peb | 16 ++-------- .../test/vector/Vector3{{E}}Test.java.peb | 16 ++-------- .../test/vector/Vector4{{E}}Test.java.peb | 16 ++-------- 23 files changed, 53 insertions(+), 362 deletions(-) diff --git a/src/main/template/float/org/spongepowered/math/imaginary/Complex{{E}}.java.peb b/src/main/template/float/org/spongepowered/math/imaginary/Complex{{E}}.java.peb index 1d4572b..358384e 100644 --- a/src/main/template/float/org/spongepowered/math/imaginary/Complex{{E}}.java.peb +++ b/src/main/template/float/org/spongepowered/math/imaginary/Complex{{E}}.java.peb @@ -14,7 +14,7 @@ import org.spongepowered.math.vector.Vector3{{ E }}; * Represent a complex number of the form {@code x + yi}. The x and y components are stored as {@code {{ e }}}s. This class is immutable. */ @Immutable -public final class Complex{{ E }} implements Imaginary{{ E }}, Comparable, Serializable, Cloneable { +public final class Complex{{ E }} implements Imaginary{{ E }}, Comparable, Serializable { private static final long serialVersionUID = 1; /** @@ -25,6 +25,7 @@ public final class Complex{{ E }} implements Imaginary{{ E }}, Comparable */ @Immutable -public final class Quaternion{{ E }} implements Imaginary{{ E }}, Comparable, Serializable, Cloneable { +public final class Quaternion{{ E }} implements Imaginary{{ E }}, Comparable, Serializable { private static final long serialVersionUID = 1; /** @@ -35,13 +35,6 @@ public final class Quaternion{{ E }} implements Imaginary{{ E }}, Comparable, Serializable, Cloneable { +public final class Vector2{{ E }} implements Vector{{ E }}, Comparable, Serializable { private static final long serialVersionUID = 1; public static final Vector2{{ E }} ZERO = new Vector2{{ E }}(0, 0); @@ -24,14 +24,6 @@ public final class Vector2{{ E }} implements Vector{{ E }}, Comparable, Serializable, Cloneable { +public final class Vector3{{ E }} implements Vector{{ E }}, Comparable, Serializable { private static final long serialVersionUID = 1; public static final Vector3{{ E }} ZERO = new Vector3{{ E }}(0, 0, 0); @@ -28,10 +28,6 @@ public final class Vector3{{ E }} implements Vector{{ E }}, Comparable, Serializable, Cloneable { +public final class Vector4{{ E }} implements Vector{{ E }}, Comparable, Serializable { private static final long serialVersionUID = 1; public static final Vector4{{ E }} ZERO = new Vector4{{ E }}(0, 0, 0, 0); @@ -25,10 +25,6 @@ public final class Vector4{{ E }} implements Vector{{ E }}, Comparable 2 ? v.get(2) : 0, v.size() > 3 ? v.get(3) : 0); } @@ -428,11 +420,6 @@ public final class Vector4{{ E }} implements Vector{{ E }}, Comparable, Serializable, Cloneable { +public final class Vector2{{ E }} implements Vector{{ E }}, Comparable, Serializable { private static final long serialVersionUID = 1; public static final Vector2{{ E }} ZERO = new Vector2{{ E }}(0, 0); @@ -20,14 +20,6 @@ public final class Vector2{{ E }} implements Vector{{ E }}, Comparable, Serializable, Cloneable { +public final class Vector3{{ E }} implements Vector{{ E }}, Comparable, Serializable { private static final long serialVersionUID = 1; public static final Vector3{{ E }} ZERO = new Vector3{{ E }}(0, 0, 0); @@ -27,10 +27,6 @@ public final class Vector3{{ E }} implements Vector{{ E }}, Comparable, Serializable, Cloneable { +public final class Vector4{{ E }} implements Vector{{ E }}, Comparable, Serializable { private static final long serialVersionUID = 1; public static final Vector4{{ E }} ZERO = new Vector4{{ E }}(0, 0, 0, 0); @@ -24,10 +24,6 @@ public final class Vector4{{ E }} implements Vector{{ E }}, Comparable 2 ? v.get(2) : 0, v.size() > 3 ? v.get(3) : 0); } @@ -388,11 +380,6 @@ public final class Vector4{{ E }} implements Vector{{ E }}, Comparable 0); } - @Test - void testCloning() { - final Complex{{ E }} complex = new Complex{{ E }}(3, 2); - Assertions.assertEquals(complex, complex.clone()); - } - @Test void testComplexFromReal() { final Complex{{ E }} complex = Complex{{ E }}.fromReal(1); diff --git a/src/test/template/float/com/flowpowered/math/test/imaginary/Quaternion{{E}}Test.java.peb b/src/test/template/float/com/flowpowered/math/test/imaginary/Quaternion{{E}}Test.java.peb index 3d72b13..54b7542 100644 --- a/src/test/template/float/com/flowpowered/math/test/imaginary/Quaternion{{E}}Test.java.peb +++ b/src/test/template/float/com/flowpowered/math/test/imaginary/Quaternion{{E}}Test.java.peb @@ -14,8 +14,8 @@ import static org.spongepowered.math.test.TestUtil{{ E }}.SQRT54; public class Quaternion{{ E }}Test { @Test - void testDefaultConstructor() { - final Quaternion{{ E }} quaternion = new Quaternion{{ E }}(); + void testIdentity() { + final Quaternion{{ E }} quaternion = Quaternion{{ E }}.IDENTITY; TestUtil{{ E }}.assertEquals(quaternion, 0, 0, 0, 1); } @@ -31,12 +31,6 @@ public class Quaternion{{ E }}Test { TestUtil{{ E }}.assertEquals(quaternion, 1, 2, 3, 4); } - @Test - void testCopyConstructor() { - final Quaternion{{ E }} quaternion = new Quaternion{{ E }}(new Quaternion{{ E }}(1, 2, 3, 4)); - TestUtil{{ E }}.assertEquals(quaternion, 1, 2, 3, 4); - } - @Test void testGetters() { final Quaternion{{ E }} quaternion = new Quaternion{{ E }}(1, 2, 3, 4); @@ -295,12 +289,6 @@ public class Quaternion{{ E }}Test { Assertions.assertTrue(c4 > 0); } - @Test - void testCloning() { - final Quaternion{{ E }} quaternion = new Quaternion{{ E }}(3, 2, 5, 6); - Assertions.assertEquals(quaternion, quaternion.clone()); - } - @Test void testQuaternionFromReal() { final Quaternion{{ E }} quaternion = Quaternion{{ E }}.fromReal(1); diff --git a/src/test/template/float/com/flowpowered/math/test/matrix/Matrix2{{E}}Test.java.peb b/src/test/template/float/com/flowpowered/math/test/matrix/Matrix2{{E}}Test.java.peb index 7434209..68d094f 100644 --- a/src/test/template/float/com/flowpowered/math/test/matrix/Matrix2{{E}}Test.java.peb +++ b/src/test/template/float/com/flowpowered/math/test/matrix/Matrix2{{E}}Test.java.peb @@ -15,17 +15,11 @@ import static org.spongepowered.math.test.TestUtil{{ E }}.SQRT13; public class Matrix2{{ E }}Test { @Test - void testDefaultConstructor() { - final Matrix2{{ E }} matrix = new Matrix2{{ E }}(); + void testIdentity() { + final Matrix2{{ E }} matrix = Matrix2{{ E }}.IDENTITY; TestUtil{{ E }}.assertEquals(matrix, 1, 0, 0, 1); } - @Test - void testCopyMatrix2Constructor() { - final Matrix2{{ E }} matrix = new Matrix2{{ E }}(new Matrix2{{ E }}(1, 2, 3, 4)); - TestUtil{{ E }}.assertEquals(matrix, 1, 2, 3, 4); - } - @Test void testCopyMatrix3Constructor() { final Matrix2{{ E }} matrix = new Matrix2{{ E }}(new Matrix3{{ E }}(1, 2, 3, 4, 5, 6, 7, 8, 9)); @@ -296,12 +290,6 @@ public class Matrix2{{ E }}Test { Assertions.assertFalse(new Matrix2{{ E }}(1, 2, 3, 4).equals(new Matrix2{{ E }}(1, 2, 3, 5))); } - @Test - void testCloning() { - final Matrix2{{ E }} matrix = new Matrix2{{ E }}(1, 2, 3, 4); - Assertions.assertEquals(matrix, matrix.clone()); - } - @Test void testMatrixFromN() { final Matrix2{{ E }} matrix = Matrix2{{ E }}.from(1); diff --git a/src/test/template/float/com/flowpowered/math/test/matrix/Matrix3{{E}}Test.java.peb b/src/test/template/float/com/flowpowered/math/test/matrix/Matrix3{{E}}Test.java.peb index e888cc0..d8b6a8b 100644 --- a/src/test/template/float/com/flowpowered/math/test/matrix/Matrix3{{E}}Test.java.peb +++ b/src/test/template/float/com/flowpowered/math/test/matrix/Matrix3{{E}}Test.java.peb @@ -17,8 +17,8 @@ import static org.spongepowered.math.test.TestUtil{{ E }}.SQRT13; public class Matrix3{{ E }}Test { @Test - void testDefaultConstructor() { - final Matrix3{{ E }} matrix = new Matrix3{{ E }}(); + void testIdentity() { + final Matrix3{{ E }} matrix = Matrix3{{ E }}.IDENTITY; TestUtil{{ E }}.assertEquals(matrix, 1, 0, 0, 0, 1, 0, 0, 0, 1); } @@ -28,12 +28,6 @@ public class Matrix3{{ E }}Test { TestUtil{{ E }}.assertEquals(matrix, 1, 2, 0, 3, 4, 0, 0, 0, 0); } - @Test - void testCopyMatrix3Constructor() { - final Matrix3{{ E }} matrix = new Matrix3{{ E }}(new Matrix3{{ E }}(1, 2, 3, 4, 5, 6, 7, 8, 9)); - TestUtil{{ E }}.assertEquals(matrix, 1, 2, 3, 4, 5, 6, 7, 8, 9); - } - @Test void testCopyMatrix4Constructor() { final Matrix3{{ E }} matrix = new Matrix3{{ E }}(new Matrix4{{ E }}(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)); @@ -334,12 +328,6 @@ public class Matrix3{{ E }}Test { Assertions.assertNotEquals(new Matrix3{{ E }}(1, 2, 3, 4, 5, 6, 7, 8, 9), new Matrix3{{ E }}(1, 2, 3, 4, 5, 6, 7, 8, 0)); } - @Test - void testCloning() { - final Matrix3{{ E }} matrix = new Matrix3{{ E }}(1, 2, 3, 4, 5, 6, 7, 8, 9); - Assertions.assertEquals(matrix, matrix.clone()); - } - @Test void testMatrixFromN() { final Matrix3{{ E }} matrix = Matrix3{{ E }}.from(1); diff --git a/src/test/template/float/com/flowpowered/math/test/matrix/Matrix4{{E}}Test.java.peb b/src/test/template/float/com/flowpowered/math/test/matrix/Matrix4{{E}}Test.java.peb index e469428..41745da 100644 --- a/src/test/template/float/com/flowpowered/math/test/matrix/Matrix4{{E}}Test.java.peb +++ b/src/test/template/float/com/flowpowered/math/test/matrix/Matrix4{{E}}Test.java.peb @@ -16,8 +16,8 @@ import static org.spongepowered.math.test.TestUtil{{ E }}.SQRT13; public class Matrix4{{ E }}Test { @Test - void testDefaultConstructor() { - final Matrix4{{ E }} matrix = new Matrix4{{ E }}(); + void testIdentity() { + final Matrix4{{ E }} matrix = Matrix4{{ E }}.IDENTITY; TestUtil{{ E }}.assertEquals(matrix, 1, 0, 0, 0, 0, 1, 0, 0, @@ -45,20 +45,6 @@ public class Matrix4{{ E }}Test { 0, 0, 0, 0); } - @Test - void testCopyMatrix4Constructor() { - final Matrix4{{ E }} matrix = new Matrix4{{ E }}(new Matrix4{{ E }}( - 1, 2, 3, 4, - 5, 6, 7, 8, - 9, 10, 11, 12, - 13, 14, 15, 16)); - TestUtil{{ E }}.assertEquals(matrix, - 1, 2, 3, 4, - 5, 6, 7, 8, - 9, 10, 11, 12, - 13, 14, 15, 16); - } - @Test void testCopyMatrixNConstructor() { final Matrix4{{ E }} matrix = new Matrix4{{ E }}(new MatrixN{{ E }}( @@ -743,16 +729,6 @@ public class Matrix4{{ E }}Test { Assertions.assertNotEquals(matrix11, matrix12); } - @Test - void testCloning() { - final Matrix4{{ E }} matrix = new Matrix4{{ E }}( - 1, 2, 3, 4, - 0, 2, 0, 0, - 0, 0, 3, 0, - 0, 0, 0, 4); - Assertions.assertEquals(matrix, matrix.clone()); - } - @Test void testMatrixFromN() { final Matrix4{{ E }} matrix = Matrix4{{ E }}.from(1); diff --git a/src/test/template/float/com/flowpowered/math/test/vector/Vector2{{E}}Test.java.peb b/src/test/template/float/com/flowpowered/math/test/vector/Vector2{{E}}Test.java.peb index 917c75a..cd30437 100644 --- a/src/test/template/float/com/flowpowered/math/test/vector/Vector2{{E}}Test.java.peb +++ b/src/test/template/float/com/flowpowered/math/test/vector/Vector2{{E}}Test.java.peb @@ -15,17 +15,11 @@ import org.spongepowered.math.vector.VectorN{{ E }}; public class Vector2{{ E }}Test { @Test - void testEmptyConstructor() { - final Vector2{{ E }} vector = new Vector2{{ E }}(); + void testZero() { + final Vector2{{ E }} vector = Vector2{{ E }}.ZERO; TestUtil{{ E }}.assertEquals(vector, 0, 0); } - @Test - void testCopyVector2Constructor() { - final Vector2{{ E }} vector = new Vector2{{ E }}(new Vector2{{ E }}(0, 1)); - TestUtil{{ E }}.assertEquals(vector, 0, 1); - } - @Test void testCopyVector3Constructor() { final Vector2{{ E }} vector = new Vector2{{ E }}(new Vector3{{ E }}(0, 1, 2)); @@ -419,12 +413,6 @@ public class Vector2{{ E }}Test { Assertions.assertFalse(new Vector2{{ E }}(122, 43).equals(new Vector2{{ E }}(378, 95))); } - @Test - void testCloning() { - final Vector2{{ E }} vector = new Vector2{{ E }}(3, 2); - Assertions.assertEquals(vector, vector.clone()); - } - @Test void testVectorFromN() { final Vector2{{ E }} vector = Vector2{{ E }}.from(1); diff --git a/src/test/template/float/com/flowpowered/math/test/vector/Vector3{{E}}Test.java.peb b/src/test/template/float/com/flowpowered/math/test/vector/Vector3{{E}}Test.java.peb index 343af1d..ea3ac6d 100644 --- a/src/test/template/float/com/flowpowered/math/test/vector/Vector3{{E}}Test.java.peb +++ b/src/test/template/float/com/flowpowered/math/test/vector/Vector3{{E}}Test.java.peb @@ -16,8 +16,8 @@ import org.spongepowered.math.vector.VectorN{{ E }}; public class Vector3{{ E }}Test { @Test - void testEmptyConstructor() { - final Vector3{{ E }} vector = new Vector3{{ E }}(); + void testZero() { + final Vector3{{ E }} vector = Vector3{{ E }}.ZERO; TestUtil{{ E }}.assertEquals(vector, 0, 0, 0); } @@ -39,12 +39,6 @@ public class Vector3{{ E }}Test { TestUtil{{ E }}.assertEquals(vector, 0, 1, 3); } - @Test - void testCopyVector3Constructor() { - final Vector3{{ E }} vector = new Vector3{{ E }}(new Vector3{{ E }}(0, 1, 2)); - TestUtil{{ E }}.assertEquals(vector, 0, 1, 2); - } - @Test void testCopyVector4Constructor() { final Vector3{{ E }} vector = new Vector3{{ E }}(new Vector4{{ E }}(0, 1, 2, 3)); @@ -444,12 +438,6 @@ public class Vector3{{ E }}Test { Assertions.assertFalse(new Vector3{{ E }}(122, 43, 96).equals(new Vector3{{ E }}(378, 95, 96))); } - @Test - void testCloning() { - final Vector3{{ E }} vector = new Vector3{{ E }}(3, 2, 5); - Assertions.assertEquals(vector, vector.clone()); - } - @Test void testVectorFromN() { final Vector3{{ E }} vector = Vector3{{ E }}.from(1); diff --git a/src/test/template/float/com/flowpowered/math/test/vector/Vector4{{E}}Test.java.peb b/src/test/template/float/com/flowpowered/math/test/vector/Vector4{{E}}Test.java.peb index 8c3a8a8..0d97264 100644 --- a/src/test/template/float/com/flowpowered/math/test/vector/Vector4{{E}}Test.java.peb +++ b/src/test/template/float/com/flowpowered/math/test/vector/Vector4{{E}}Test.java.peb @@ -14,8 +14,8 @@ import org.spongepowered.math.vector.VectorN{{ E }}; public class Vector4{{ E }}Test { @Test - void testEmptyConstructor() { - final Vector4{{ E }} vector = new Vector4{{ E }}(); + void testZero() { + final Vector4{{ E }} vector = Vector4{{ E }}.ZERO; TestUtil{{ E }}.assertEquals(vector, 0, 0, 0, 0); } @@ -55,12 +55,6 @@ public class Vector4{{ E }}Test { TestUtil{{ E }}.assertEquals(vector, 0, 1, 1, 2); } - @Test - void testCopyVector4Constructor() { - final Vector4{{ E }} vector = new Vector4{{ E }}(new Vector4{{ E }}(0, 1, 1, 2)); - TestUtil{{ E }}.assertEquals(vector, 0, 1, 1, 2); - } - @Test void testCopyVectorNConstructor() { final Vector4{{ E }} vector = new Vector4{{ E }}(new VectorN{{ E }}(0, 1, 1, 2, 5)); @@ -432,12 +426,6 @@ public class Vector4{{ E }}Test { Assertions.assertFalse(new Vector4{{ E }}(122, 43, 96, 50).equals(new Vector4{{ E }}(378, 95, 96, 0))); } - @Test - void testCloning() { - final Vector4{{ E }} vector = new Vector4{{ E }}(3, 2, 5, 6); - Assertions.assertEquals(vector, vector.clone()); - } - @Test void testVectorFromN() { final Vector4{{ E }} vector = Vector4{{ E }}.from(1); diff --git a/src/test/template/float/com/flowpowered/math/test/vector/VectorN{{E}}Test.java.peb b/src/test/template/float/com/flowpowered/math/test/vector/VectorN{{E}}Test.java.peb index e3e9072..e6f157b 100644 --- a/src/test/template/float/com/flowpowered/math/test/vector/VectorN{{E}}Test.java.peb +++ b/src/test/template/float/com/flowpowered/math/test/vector/VectorN{{E}}Test.java.peb @@ -392,4 +392,5 @@ public class VectorN{{ E }}Test { final VectorN{{ E }} vector = new VectorN{{ E }}(1, 2, 3); Assertions.assertEquals(vector, vector.clone()); } + } diff --git a/src/test/template/integer/com/flowpowered/math/test/vector/Vector2{{E}}Test.java.peb b/src/test/template/integer/com/flowpowered/math/test/vector/Vector2{{E}}Test.java.peb index b5edb7e..856dd86 100644 --- a/src/test/template/integer/com/flowpowered/math/test/vector/Vector2{{E}}Test.java.peb +++ b/src/test/template/integer/com/flowpowered/math/test/vector/Vector2{{E}}Test.java.peb @@ -15,17 +15,11 @@ import org.spongepowered.math.vector.VectorN{{ E }}; public class Vector2{{ E }}Test { @Test - void testEmptyConstructor() { - final Vector2{{ E }} vector = new Vector2{{ E }}(); + void testZero() { + final Vector2{{ E }} vector = Vector2{{ E }}.ZERO; TestUtil{{ E }}.assertEquals(vector, ({{ e }}) 0, ({{ e }}) 0); } - @Test - void testCopyVector2Constructor() { - final Vector2{{ E }} vector = new Vector2{{ E }}(new Vector2{{ E }}(0, 1)); - TestUtil{{ E }}.assertEquals(vector, ({{ e }}) 0, ({{ e }}) 1); - } - @Test void testCopyVector3Constructor() { final Vector2{{ E }} vector = new Vector2{{ E }}(new Vector3{{ E }}(0, 1, 2)); @@ -385,10 +379,4 @@ public class Vector2{{ E }}Test { Assertions.assertFalse(new Vector2{{ E }}(122, 43).equals(new Vector2{{ E }}(378, 95))); } - @Test - void testCloning() { - final Vector2{{ E }} vector = new Vector2{{ E }}(3, 2); - Assertions.assertEquals(vector, vector.clone()); - } - } diff --git a/src/test/template/integer/com/flowpowered/math/test/vector/Vector3{{E}}Test.java.peb b/src/test/template/integer/com/flowpowered/math/test/vector/Vector3{{E}}Test.java.peb index 4f7dc56..00d407a 100644 --- a/src/test/template/integer/com/flowpowered/math/test/vector/Vector3{{E}}Test.java.peb +++ b/src/test/template/integer/com/flowpowered/math/test/vector/Vector3{{E}}Test.java.peb @@ -15,8 +15,8 @@ import org.spongepowered.math.vector.VectorN{{ E }}; public class Vector3{{ E }}Test { @Test - void testEmptyConstructor() { - final Vector3{{ E }} vector = new Vector3{{ E }}(); + void testZero() { + final Vector3{{ E }} vector = Vector3{{ E }}.ZERO; TestUtil{{ E }}.assertEquals(vector, ({{ e }}) 0, ({{ e }}) 0, ({{ e }}) 0); } @@ -32,12 +32,6 @@ public class Vector3{{ E }}Test { TestUtil{{ E }}.assertEquals(vector, ({{ e }}) 0, ({{ e }}) 1, ({{ e }}) 3); } - @Test - void testCopyVector3Constructor() { - final Vector3{{ E }} vector = new Vector3{{ E }}(new Vector3{{ E }}(0, 1, 2)); - TestUtil{{ E }}.assertEquals(vector, ({{ e }}) 0, ({{ e }}) 1, ({{ e }}) 2); - } - @Test void testCopyVector4Constructor() { final Vector3{{ E }} vector = new Vector3{{ E }}(new Vector4{{ E }}(0, 1, 2, 3)); @@ -402,10 +396,4 @@ public class Vector3{{ E }}Test { Assertions.assertFalse(new Vector3{{ E }}(122, 43, 96).equals(new Vector3{{ E }}(378, 95, 96))); } - @Test - void testCloning() { - final Vector3{{ E }} vector = new Vector3{{ E }}(3, 2, 5); - Assertions.assertEquals(vector, vector.clone()); - } - } diff --git a/src/test/template/integer/com/flowpowered/math/test/vector/Vector4{{E}}Test.java.peb b/src/test/template/integer/com/flowpowered/math/test/vector/Vector4{{E}}Test.java.peb index eb88dd0..6db758e 100644 --- a/src/test/template/integer/com/flowpowered/math/test/vector/Vector4{{E}}Test.java.peb +++ b/src/test/template/integer/com/flowpowered/math/test/vector/Vector4{{E}}Test.java.peb @@ -13,8 +13,8 @@ import org.spongepowered.math.vector.VectorN{{ E }}; public class Vector4{{ E }}Test { @Test - void testEmptyConstructor() { - final Vector4{{ E }} vector = new Vector4{{ E }}(); + void testZero() { + final Vector4{{ E }} vector = Vector4{{ E }}.ZERO; TestUtil{{ E }}.assertEquals(vector, 0, 0, 0, 0); } @@ -42,12 +42,6 @@ public class Vector4{{ E }}Test { TestUtil{{ E }}.assertEquals(vector, 0, 1, 1, 2); } - @Test - void testCopyVector4Constructor() { - final Vector4{{ E }} vector = new Vector4{{ E }}(new Vector4{{ E }}(0, 1, 1, 2)); - TestUtil{{ E }}.assertEquals(vector, 0, 1, 1, 2); - } - @Test void testCopyVectorNConstructor() { final Vector4{{ E }} vector = new Vector4{{ E }}(new VectorN{{ E }}(0, 1, 1, 2, 5)); @@ -381,10 +375,4 @@ public class Vector4{{ E }}Test { Assertions.assertFalse(new Vector4{{ E }}(122, 43, 96, 50).equals(new Vector4{{ E }}(378, 95, 96, 0))); } - @Test - void testCloning() { - final Vector4{{ E }} vector = new Vector4{{ E }}(3, 2, 5, 6); - Assertions.assertEquals(vector, vector.clone()); - } - }