diff --git a/README.md b/README.md index edc85ff1..41999947 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ To upgrade the version of the lib2813 libraries you are using, simply update the - `com.team2813.lib2813:vendor-rev`: - `REVLib.json` - `com.team2813.lib2813:limelight`: - - `Phoenix6.json` + - none - `com.team2813.lib2813:vision`: - `photonlib.json` - `com.team2813.lib2813:testing`: diff --git a/settings.gradle b/settings.gradle index 9470d2f0..1fc9495f 100644 --- a/settings.gradle +++ b/settings.gradle @@ -8,6 +8,6 @@ */ rootProject.name = 'lib2813' -gradle.ext.lib_version = "2.0.0" +gradle.ext.lib_version = "2.1.0" include 'core', 'limelight', 'vision', 'testing' include 'vendor:ctre', 'vendor:rev' diff --git a/testing/src/main/java/com/team2813/lib2813/testing/truth/MeasureSubject.java b/testing/src/main/java/com/team2813/lib2813/testing/truth/MeasureSubject.java index ece7dbef..6470672a 100644 --- a/testing/src/main/java/com/team2813/lib2813/testing/truth/MeasureSubject.java +++ b/testing/src/main/java/com/team2813/lib2813/testing/truth/MeasureSubject.java @@ -51,6 +51,13 @@ private MeasureSubject(FailureMetadata failureMetadata, @Nullable Measure sub this.actual = subject; } + /** + * Prepares for a check that the actual value is within the given tolerance of an expected value + * that will be provided in the next call in the fluent chain. + * + * @param tolerance an inclusive upper bound on the difference between the actual value and + * expected value allowed by the check, which must be a non-negative value. + */ public TolerantComparison> isWithin(Measure tolerance) { return new TolerantComparison>() { @Override @@ -67,6 +74,13 @@ public void of(Measure expected) { }; } + /** + * Prepares for a check that the actual value is not within the given tolerance of an expected + * value that will be provided in the next call in the fluent chain. + * + * @param tolerance an exclusive lower bound on the difference between the actual value and + * expected value allowed by the check, which must be a non-negative value. + */ public TolerantComparison> isNotWithin(Measure tolerance) { return new TolerantComparison>() { @Override diff --git a/testing/src/main/java/com/team2813/lib2813/testing/truth/Rotation2dSubject.java b/testing/src/main/java/com/team2813/lib2813/testing/truth/Rotation2dSubject.java index 74b7c607..e29b7c9d 100644 --- a/testing/src/main/java/com/team2813/lib2813/testing/truth/Rotation2dSubject.java +++ b/testing/src/main/java/com/team2813/lib2813/testing/truth/Rotation2dSubject.java @@ -51,6 +51,14 @@ private Rotation2dSubject(FailureMetadata failureMetadata, @Nullable Rotation2d // User-defined test assertion SPI below this point + /** + * Prepares for a check that the actual value is within the given tolerance of an expected value + * that will be provided in the next call in the fluent chain. + * + * @param tolerance an inclusive upper bound on the difference between the actual value and + * expected value allowed by the check, which must be a non-negative value. + * @since 2.1.0 + */ public TolerantComparison isWithin(double tolerance) { return new TolerantComparison<>() { @Override diff --git a/testing/src/main/java/com/team2813/lib2813/testing/truth/Translation2dSubject.java b/testing/src/main/java/com/team2813/lib2813/testing/truth/Translation2dSubject.java index e8e6e481..db508b80 100644 --- a/testing/src/main/java/com/team2813/lib2813/testing/truth/Translation2dSubject.java +++ b/testing/src/main/java/com/team2813/lib2813/testing/truth/Translation2dSubject.java @@ -52,6 +52,13 @@ private Translation2dSubject(FailureMetadata failureMetadata, @Nullable Translat // User-defined test assertion SPI below this point + /** + * Prepares for a check that the actual value is within the given tolerance of an expected value + * that will be provided in the next call in the fluent chain. + * + * @param tolerance an inclusive upper bound on the difference between the actual value and + * expected value allowed by the check, which must be a non-negative value. + */ public TolerantComparison isWithin(double tolerance) { return new TolerantComparison<>() { @Override @@ -70,6 +77,14 @@ public void of(Translation2d expected) { }; } + /** + * Prepares for a check that the actual value is not within the given tolerance of an expected + * value that will be provided in the next call in the fluent chain. + * + * @param tolerance an exclusive lower bound on the difference between the actual value and + * expected value allowed by the check, which must be a non-negative value. + * @since 2.1.0 + */ public TolerantComparison isNotWithin(double tolerance) { return new TolerantComparison<>() { @Override diff --git a/testing/src/main/java/com/team2813/lib2813/testing/truth/Translation3dSubject.java b/testing/src/main/java/com/team2813/lib2813/testing/truth/Translation3dSubject.java index 91625520..73779441 100644 --- a/testing/src/main/java/com/team2813/lib2813/testing/truth/Translation3dSubject.java +++ b/testing/src/main/java/com/team2813/lib2813/testing/truth/Translation3dSubject.java @@ -52,6 +52,13 @@ private Translation3dSubject(FailureMetadata failureMetadata, @Nullable Translat // User-defined test assertion SPI below this point + /** + * Prepares for a check that the actual value is within the given tolerance of an expected value + * that will be provided in the next call in the fluent chain. + * + * @param tolerance an inclusive upper bound on the difference between the actual value and + * expected value allowed by the check, which must be a non-negative value. + */ public TolerantComparison isWithin(double tolerance) { return new TolerantComparison<>() { @Override @@ -70,6 +77,14 @@ public void of(Translation3d expected) { }; } + /** + * Prepares for a check that the actual value is not within the given tolerance of an expected + * value that will be provided in the next call in the fluent chain. + * + * @param tolerance an exclusive lower bound on the difference between the actual value and + * expected value allowed by the check, which must be a non-negative value. + * @since 2.1.0 + */ public TolerantComparison isNotWithin(double tolerance) { return new TolerantComparison<>() { @Override