diff --git a/eo-runtime/src/test/eo/org/eolang/seq-tests.eo b/eo-runtime/src/test/eo/org/eolang/seq-tests.eo index 1147a99174..eff87feab5 100644 --- a/eo-runtime/src/test/eo/org/eolang/seq-tests.eo +++ b/eo-runtime/src/test/eo/org/eolang/seq-tests.eo @@ -140,7 +140,7 @@ 1 # Test. -[] > seq-single-dataization-int-equal-to-test-bug +[] > seq-single-dataization-int-equal-to-cache-problem-test (memory 0).alloc > x eq. > nop seq diff --git a/eo-runtime/src/test/java/EOorg/EOeolang/EOseqTest.java b/eo-runtime/src/test/java/EOorg/EOeolang/EOseqTest.java index 3907fd75db..c25ae5d1a9 100644 --- a/eo-runtime/src/test/java/EOorg/EOeolang/EOseqTest.java +++ b/eo-runtime/src/test/java/EOorg/EOeolang/EOseqTest.java @@ -84,123 +84,4 @@ public void calculatesAndReturnsObject() { Matchers.startsWith("Hello") ); } - - /** - * Test. - * - * [] > parent - * memory 0 > counter - * seq > @ - * * - * at. - * * 0 1 - * counter.as-int - * counter.write (counter.as-int.plus 1) - * counter.as-int - * - * @since 1.0 - */ - @Disabled - @Test - public void calculatesWithTupleAndReturnsObject() { - final Phi counter = new EOmemory(Phi.Φ); - counter.attr(0).put(new Data.ToPhi(0L)); - final Phi arr = new PhWith( - new PhWith( - new EOtuple$EOempty(Phi.Φ).attr("with").get().copy(), - 0, new Data.ToPhi(0L) - ).attr("with").get().copy(), - 0, new Data.ToPhi(1L) - ); - final Phi get = new PhWith( - new PhCopy(new PhMethod(arr, "at")), - 0, new PhMethod(counter, "as-int") - ); - final Phi increment = new PhWith( - new PhCopy(new PhMethod(counter, "write")), - 0, - new PhWith( - new PhCopy(new PhMethod(new PhMethod(counter, "as-int"), "plus")), - 0, new Data.ToPhi(1L) - ) - ); - final Phi args = new PhWith( - new PhCopy( - new PhMethod( - new PhWith( - new PhCopy( - new PhMethod( - new PhWith( - new PhCopy( - new PhMethod(new EOtuple$EOempty(Phi.Φ), "with") - ), - 0, - get - ), - "with" - ) - ), - 0, - increment - ), - "with" - ) - ), - 0, new PhMethod(counter, "as-int") - ); - MatcherAssert.assertThat( - new Dataized( - new PhWith(new EOseq(Phi.Φ), 0, args) - ).take(Long.class), - Matchers.equalTo(1L) - ); - } - - /** - * Test. - * - * [] > parent - * memory 0 > counter - * seq > @ - * * - * counter.write (counter.as-int.plus 1) - * counter.as-int - * - * @since 1.0 - */ - @Disabled - @Test - public void calculatesWithoutTupleAndReturnsObject() { - final Phi counter = new EOmemory(Phi.Φ); - counter.attr(0).put(new Data.ToPhi(0L)); - final Phi increment = new PhWith( - new PhCopy(new PhMethod(counter, "write")), - 0, - new PhWith( - new PhCopy(new PhMethod(new PhMethod(counter, "as-int"), "plus")), - 0, new Data.ToPhi(1L) - ) - ); - final Phi args = new PhWith( - new PhCopy( - new PhMethod( - new PhWith( - new PhCopy( - new PhMethod(new EOtuple$EOempty(Phi.Φ), "with") - ), - 0, - increment - ), - "with" - ) - ), - 0, new PhMethod(counter, "as-int") - ); - MatcherAssert.assertThat( - new Dataized( - new PhWith(new EOseq(Phi.Φ), 0, args) - ).take(Long.class), - Matchers.equalTo(1L) - ); - } }