From 68fd94288d141c87381ca9deeca3284dfd54cce9 Mon Sep 17 00:00:00 2001 From: mcasari Date: Fri, 6 Oct 2023 21:57:56 +0200 Subject: [PATCH] change string constructor test case in simpler form --- .../baeldung/floattobigdecimal/FloatToBigDecimalUnitTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core-java-modules/core-java-numbers-conversions/src/test/java/com/baeldung/floattobigdecimal/FloatToBigDecimalUnitTest.java b/core-java-modules/core-java-numbers-conversions/src/test/java/com/baeldung/floattobigdecimal/FloatToBigDecimalUnitTest.java index 9d125f557d..f783d00976 100644 --- a/core-java-modules/core-java-numbers-conversions/src/test/java/com/baeldung/floattobigdecimal/FloatToBigDecimalUnitTest.java +++ b/core-java-modules/core-java-numbers-conversions/src/test/java/com/baeldung/floattobigdecimal/FloatToBigDecimalUnitTest.java @@ -24,8 +24,8 @@ class FloatToBigDecimalUnitTest { @Test public void whenCreatedFromString_thenPreservesTheOriginal() { - BigDecimal bdFromString = new BigDecimal("1.10000002384185791015625"); - assertEquals("1.10000002384185791015625", bdFromString.toString()); + BigDecimal bdFromString = new BigDecimal("1.1"); + assertEquals("1.1", bdFromString.toString()); } @Test