From 82c9844b670c7d9b93005f8f85502cfa5e964053 Mon Sep 17 00:00:00 2001 From: Davy Landman Date: Sun, 22 Sep 2024 11:28:00 +0200 Subject: [PATCH] Improved some tests --- .../vallang/basic/LazyStringOperationsTest.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/test/java/io/usethesource/vallang/basic/LazyStringOperationsTest.java b/src/test/java/io/usethesource/vallang/basic/LazyStringOperationsTest.java index 2dd30c39..2e269adf 100644 --- a/src/test/java/io/usethesource/vallang/basic/LazyStringOperationsTest.java +++ b/src/test/java/io/usethesource/vallang/basic/LazyStringOperationsTest.java @@ -1,5 +1,7 @@ package io.usethesource.vallang.basic; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotEquals; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.fail; @@ -92,11 +94,11 @@ public void testEquals(IValueFactory vf) { IString y = vf.string("abcdefgh"); IString z = vf.string("abcdefgi"); - assertTrue(x.hashCode() == y.hashCode()); - assertTrue(x.equals(y)); - assertTrue(y.equals(x)); - assertTrue(!z.equals(x)); - assertTrue(x.substring(0, 0).equals(vf.string(""))); + assertEquals(x.hashCode(), y.hashCode()); + assertEquals(x, y); + assertEquals(y, x); + assertNotEquals(z, x); + assertEquals(x.substring(0, 0), vf.string("")); } finally { StringValue.resetMaxFlatString(); StringValue.resetMaxUnbalance();