From 6ff8dfbd1cc508641f73fdfc9d898ac2ad8c4f9e Mon Sep 17 00:00:00 2001
From: Brandon Clayton <bclayton@usgs.gov>
Date: Mon, 5 Dec 2022 17:59:28 -0700
Subject: [PATCH] add tolerance to array check

---
 .../java/gov/usgs/earthquake/nshmp/model/NshmTestUtils.java  | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/test/java/gov/usgs/earthquake/nshmp/model/NshmTestUtils.java b/src/test/java/gov/usgs/earthquake/nshmp/model/NshmTestUtils.java
index dd4a81df..7f218b85 100644
--- a/src/test/java/gov/usgs/earthquake/nshmp/model/NshmTestUtils.java
+++ b/src/test/java/gov/usgs/earthquake/nshmp/model/NshmTestUtils.java
@@ -60,7 +60,7 @@ class NshmTestUtils {
 
   private static final Set<Imt> IMTS = EnumSet.of(Imt.PGA, Imt.SA0P2, Imt.SA1P0, Imt.SA5P0);
 
-  private static final double TOLERANCE = 1e-10;
+  private static final double TOLERANCE = 1e-12;
 
   private static final Gson GSON = new GsonBuilder()
       .setPrettyPrinting()
@@ -103,7 +103,8 @@ class NshmTestUtils {
     // IMLs close but not exact due to exp() transform
     assertArrayEquals(
         expected.xValues().toArray(),
-        actual.xValues().toArray());
+        actual.xValues().toArray(),
+        tol);
 
     double[] expectedYs = expected.yValues().toArray();
     double[] actualYs = actual.yValues().toArray();
-- 
GitLab