From a3534243441f9cf094a5b2c58f8fbca1fb9a6f0f Mon Sep 17 00:00:00 2001 From: Christian Banse Date: Thu, 21 Nov 2024 15:41:17 +0100 Subject: [PATCH] ++ --- .../aisec/cpg/frontends/java/StaticImportsTest.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cpg-language-java/src/test/kotlin/de/fraunhofer/aisec/cpg/frontends/java/StaticImportsTest.kt b/cpg-language-java/src/test/kotlin/de/fraunhofer/aisec/cpg/frontends/java/StaticImportsTest.kt index 0def824fc99..a6105cf0afa 100644 --- a/cpg-language-java/src/test/kotlin/de/fraunhofer/aisec/cpg/frontends/java/StaticImportsTest.kt +++ b/cpg-language-java/src/test/kotlin/de/fraunhofer/aisec/cpg/frontends/java/StaticImportsTest.kt @@ -117,12 +117,12 @@ internal class StaticImportsTest : BaseTest() { assertTrue(staticField.modifiers.contains("static")) assertFalse(nonStaticField.modifiers.contains("static")) - val declaredReferences = main.allChildren() + val declaredReferences = main.refs val usage = findByUniqueName(declaredReferences, "staticField") - assertEquals(staticField, usage.refersTo) + assertRefersTo(usage, staticField) val nonStatic = findByUniqueName(declaredReferences, "nonStaticField") - assertNotEquals(nonStaticField, nonStatic.refersTo) + assertRefersTo(nonStatic, nonStaticField) assertTrue(nonStatic.refersTo!!.isInferred) } }