summaryrefslogtreecommitdiff
path: root/src/test/java/sevenUnitsGUI/RoundingTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/sevenUnitsGUI/RoundingTest.java')
-rw-r--r--src/test/java/sevenUnitsGUI/RoundingTest.java35
1 files changed, 18 insertions, 17 deletions
diff --git a/src/test/java/sevenUnitsGUI/RoundingTest.java b/src/test/java/sevenUnitsGUI/RoundingTest.java
index f749f85..589b8d0 100644
--- a/src/test/java/sevenUnitsGUI/RoundingTest.java
+++ b/src/test/java/sevenUnitsGUI/RoundingTest.java
@@ -1,5 +1,5 @@
/**
- * Copyright (C) 2022 Adrien Hopkins
+ * Copyright (C) 2022, 2024, 2025 Adrien Hopkins
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
@@ -41,8 +41,8 @@ import sevenUnitsGUI.StandardDisplayRules.UncertaintyBased;
/**
* Tests that ensure the rounding rules work as intended.
*
- * @since v0.4.0
* @since 2022-07-17
+ * @since v0.4.0
*/
class RoundingTest {
// rounding rules to test
@@ -69,8 +69,8 @@ class RoundingTest {
/**
* @return arguments for
* {@link #testFixedDecimalRounding(UncertainDouble, String, String, String)}
- * @since v0.4.0
* @since 2022-07-17
+ * @since v0.4.0
*/
private static final Stream<Arguments> fixedDecimalRoundingExamples() {
// input, zero decimal string, two decimal string, six decimal string
@@ -83,8 +83,8 @@ class RoundingTest {
/**
* @return arguments for
* {@link #testFixedPrecisionRounding(UncertainDouble, String, String, String)}
- * @since v0.4.0
* @since 2022-07-17
+ * @since v0.4.0
*/
private static final Stream<Arguments> fixedPrecisionRoundingExamples() {
// input, one sig fig string, three s.f. string, six s.f. string
@@ -97,8 +97,8 @@ class RoundingTest {
/**
* @return arguments for
* {@link #testUncertaintyRounding(UncertainDouble, String)}
- * @since v0.4.0
* @since 2022-07-17
+ * @since v0.4.0
*/
private static final Stream<Arguments> uncertaintyRoundingExamples() {
// input, uncertainty rounding string
@@ -112,8 +112,8 @@ class RoundingTest {
* Test for {@link FixedDecimals#decimalPlaces()} and
* {@link FixedPrecision#significantFigures()}.
*
- * @since v0.4.0
* @since 2022-07-17
+ * @since v0.4.0
*/
@Test
void testDataMethods() {
@@ -137,9 +137,9 @@ class RoundingTest {
/**
* Tests that the rounding methods' equals() methods work.
- *
- * @since v0.4.0
+ *
* @since 2022-07-17
+ * @since v0.4.0
*/
@Test
void testEquals() {
@@ -161,7 +161,7 @@ class RoundingTest {
// test that FixedDecimals is never equal to FixedPrecision
// this unlikely argument is the test - the equals should return false!
@SuppressWarnings("unlikely-arg-type")
- final boolean differentRulesEqual = Objects.equals(fixedDecimals(4),
+ final var differentRulesEqual = Objects.equals(fixedDecimals(4),
fixedPrecision(4));
assertFalse(differentRulesEqual, "fixedDecimals(4) == fixedPrecision(4)");
}
@@ -174,6 +174,7 @@ class RoundingTest {
* @param twoDecimalString expected string for two decimal places
* @param sixDecimalString expected string for six decimal places
* @since 2022-07-17
+ * @since v0.4.0
*/
@ParameterizedTest
@MethodSource("fixedDecimalRoundingExamples")
@@ -200,8 +201,8 @@ class RoundingTest {
* @param oneSigFigString expected string for one significant figure
* @param threeSigFigString expected string for three significant figures
* @param twelveSigFigString expected string for twelve significant figures
- * @since v0.4.0
* @since 2022-07-17
+ * @since v0.4.0
*/
@ParameterizedTest
@MethodSource("fixedPrecisionRoundingExamples")
@@ -225,9 +226,9 @@ class RoundingTest {
/**
* Tests that {@link StandardDisplayRules#getStandardRule} gets rounding
* rules as intended.
- *
- * @since v0.4.0
+ *
* @since 2022-07-17
+ * @since v0.4.0
*/
@Test
void testGetStandardRule() {
@@ -243,9 +244,9 @@ class RoundingTest {
/**
* Tests that the rounding methods' equals() methods work.
- *
- * @since v0.4.0
+ *
* @since 2022-07-17
+ * @since v0.4.0
*/
@Test
void testHashCode() {
@@ -257,9 +258,9 @@ class RoundingTest {
/**
* Tests that the {@code toString()} methods of the three rounding rule
* classes work correctly.
- *
- * @since v0.4.0
+ *
* @since 2022-07-17
+ * @since v0.4.0
*/
@Test
void testToString() {
@@ -273,8 +274,8 @@ class RoundingTest {
*
* @param input input number
* @param output expected output string
- * @since v0.4.0
* @since 2022-07-17
+ * @since v0.4.0
*/
@ParameterizedTest
@MethodSource("uncertaintyRoundingExamples")