From 4a92d91bc3f5a824dc676dcb0a234bbc2ed8cc3c Mon Sep 17 00:00:00 2001 From: levBagryansky <28lev11@gmail.com> Date: Tue, 22 Aug 2023 19:22:49 +0300 Subject: [PATCH 01/41] #2295: Edited Universe.find --- eo-runtime/src/main/java/org/eolang/Universe.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/eo-runtime/src/main/java/org/eolang/Universe.java b/eo-runtime/src/main/java/org/eolang/Universe.java index f24bfb392a..5ca113875a 100644 --- a/eo-runtime/src/main/java/org/eolang/Universe.java +++ b/eo-runtime/src/main/java/org/eolang/Universe.java @@ -65,7 +65,12 @@ public Universe() { * @return Vertex of the object to find. */ public int find(final String name) { - Phi accum = this.connector; + Phi accum; + if (name.charAt(0) == 'Q') { + accum = Phi.Φ; + } else { + accum = this.connector; + } final String[] atts = Universe.replace(name) .split("\\."); for (final String att: atts) { From 5773a0e7b2312cf96771af5457cda89e315e5e91 Mon Sep 17 00:00:00 2001 From: levBagryansky <28lev11@gmail.com> Date: Wed, 23 Aug 2023 11:42:25 +0300 Subject: [PATCH 02/41] #2295: Added test with finding by absolute location --- .../src/test/java/org/eolang/UniverseTest.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/eo-runtime/src/test/java/org/eolang/UniverseTest.java b/eo-runtime/src/test/java/org/eolang/UniverseTest.java index 7b2b7594fa..7c6a38bebe 100644 --- a/eo-runtime/src/test/java/org/eolang/UniverseTest.java +++ b/eo-runtime/src/test/java/org/eolang/UniverseTest.java @@ -28,6 +28,9 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; +import java.util.HashMap; +import java.util.Map; + /** * Test case for {@link Universe}. * @since 0.31 @@ -69,6 +72,16 @@ void findsLongAtt() { ); } + @Test + void findsByAbsoluteLoc() { + final Map indexed = new HashMap<>(); + final Universe universe = new Universe(); + final int vertex = universe.find("Q.org.eolang.int"); + System.out.println(vertex); + System.out.println(indexed.get(vertex).getClass()); + assert EOorg.EOeolang.EOint.class == indexed.get(vertex).getClass(); + } + @Test void throwsIfWrongFind() { Assertions.assertThrows( From 44dc96e9be51dce37e355b5a7778dc6a0da39b2f Mon Sep 17 00:00:00 2001 From: levBagryansky <28lev11@gmail.com> Date: Wed, 23 Aug 2023 12:34:30 +0300 Subject: [PATCH 03/41] #2295: loc should start with "^." or "$." or "Q." only --- .../src/main/java/org/eolang/Universe.java | 21 +++++++++++++++---- .../test/java/org/eolang/UniverseTest.java | 21 ++++++++++--------- 2 files changed, 28 insertions(+), 14 deletions(-) diff --git a/eo-runtime/src/main/java/org/eolang/Universe.java b/eo-runtime/src/main/java/org/eolang/Universe.java index b04c978c3c..4a56f9a288 100644 --- a/eo-runtime/src/main/java/org/eolang/Universe.java +++ b/eo-runtime/src/main/java/org/eolang/Universe.java @@ -23,6 +23,8 @@ */ package org.eolang; +import org.apache.commons.lang3.ArrayUtils; + import java.util.HashMap; import java.util.Map; import java.util.Optional; @@ -77,13 +79,24 @@ public Universe() { */ public int find(final String name) { Phi accum; - if (name.charAt(0) == 'Q') { + String[] atts = Universe.replace(name) + .split("\\."); + if (atts[0].equals("Q")) { accum = Phi.Φ; - } else { + atts = ArrayUtils.remove(atts, 0); + } else if (atts[0].equals("$")) { + accum = this.connector; + atts = ArrayUtils.remove(atts, 0); + } else if (atts[0].equals("^")) { accum = this.connector; + } else { + throw new ExFailure( + String.format( + "Universe.find starts with %s, but it should start with Q or ^ or $ only", + atts[0] + ) + ); } - final String[] atts = Universe.replace(name) - .split("\\."); for (final String att: atts) { if (!"".equals(att)) { accum = accum.attr(att).get(); diff --git a/eo-runtime/src/test/java/org/eolang/UniverseTest.java b/eo-runtime/src/test/java/org/eolang/UniverseTest.java index 7c6a38bebe..6f23d7c314 100644 --- a/eo-runtime/src/test/java/org/eolang/UniverseTest.java +++ b/eo-runtime/src/test/java/org/eolang/UniverseTest.java @@ -23,11 +23,11 @@ */ package org.eolang; +import EOorg.EOeolang.EOseq; import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; - import java.util.HashMap; import java.util.Map; @@ -47,7 +47,7 @@ void findsSimpleAtt() { final Phi phi = new DummyWithAt(Phi.Φ); final Universe universe = new Universe(phi); MatcherAssert.assertThat( - universe.find(UniverseTest.ATT), + universe.find("$.".concat(UniverseTest.ATT)), Matchers.equalTo( phi.attr(UniverseTest.ATT).get().hashCode() ) @@ -61,7 +61,7 @@ void findsLongAtt() { MatcherAssert.assertThat( universe.find( String.format( - "%s.%s", + "$.%s.%s", UniverseTest.ATT, UniverseTest.ATT ) @@ -75,11 +75,12 @@ void findsLongAtt() { @Test void findsByAbsoluteLoc() { final Map indexed = new HashMap<>(); - final Universe universe = new Universe(); - final int vertex = universe.find("Q.org.eolang.int"); - System.out.println(vertex); - System.out.println(indexed.get(vertex).getClass()); - assert EOorg.EOeolang.EOint.class == indexed.get(vertex).getClass(); + final Universe universe = new Universe(Phi.Φ, indexed); + final int vertex = universe.find("Q.org.eolang.seq"); + MatcherAssert.assertThat( + indexed.get(vertex).getClass(), + Matchers.equalTo(EOseq.class) + ); } @Test @@ -88,7 +89,7 @@ void throwsIfWrongFind() { ExAbstract.class, () -> new Universe( new DummyWithStructure(Phi.Φ) - ).find("wrong-name") + ).find("$.wrong-name") ); } @@ -98,7 +99,7 @@ void dataizesIndexed() { new DummyWithAt(Phi.Φ) ); final int vertex = universe.find( - String.format(UniverseTest.ATT) + "$.".concat(UniverseTest.ATT) ); MatcherAssert.assertThat( universe.dataize(vertex), From ceb8846ec2139f4acac52d2d68f8358693362fd9 Mon Sep 17 00:00:00 2001 From: levBagryansky <28lev11@gmail.com> Date: Wed, 23 Aug 2023 12:58:28 +0300 Subject: [PATCH 04/41] #2295: change atts[0] to "." instead of removing the first element --- eo-runtime/src/main/java/org/eolang/Universe.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/eo-runtime/src/main/java/org/eolang/Universe.java b/eo-runtime/src/main/java/org/eolang/Universe.java index 4a56f9a288..cfacebcebd 100644 --- a/eo-runtime/src/main/java/org/eolang/Universe.java +++ b/eo-runtime/src/main/java/org/eolang/Universe.java @@ -79,16 +79,16 @@ public Universe() { */ public int find(final String name) { Phi accum; - String[] atts = Universe.replace(name) + final String[] atts = Universe.replace(name) .split("\\."); if (atts[0].equals("Q")) { accum = Phi.Φ; - atts = ArrayUtils.remove(atts, 0); - } else if (atts[0].equals("$")) { + atts[0] = "."; + } else if (atts[0].equals("ρ")) { accum = this.connector; - atts = ArrayUtils.remove(atts, 0); - } else if (atts[0].equals("^")) { + } else if (atts[0].equals("$")) { accum = this.connector; + atts[0] = "."; } else { throw new ExFailure( String.format( From b2b2867753808c8c0f47e6023862e597307326d3 Mon Sep 17 00:00:00 2001 From: levBagryansky <28lev11@gmail.com> Date: Wed, 23 Aug 2023 15:20:06 +0300 Subject: [PATCH 05/41] #2425: change atts[0] to "" instead of removing the first element --- eo-runtime/src/main/java/org/eolang/Universe.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo-runtime/src/main/java/org/eolang/Universe.java b/eo-runtime/src/main/java/org/eolang/Universe.java index cfacebcebd..620d0377c0 100644 --- a/eo-runtime/src/main/java/org/eolang/Universe.java +++ b/eo-runtime/src/main/java/org/eolang/Universe.java @@ -83,12 +83,12 @@ public int find(final String name) { .split("\\."); if (atts[0].equals("Q")) { accum = Phi.Φ; - atts[0] = "."; + atts[0] = ""; } else if (atts[0].equals("ρ")) { accum = this.connector; } else if (atts[0].equals("$")) { accum = this.connector; - atts[0] = "."; + atts[0] = ""; } else { throw new ExFailure( String.format( From b5f50eb6a34b8e895ed797495035af2262e72d80 Mon Sep 17 00:00:00 2001 From: levBagryansky <28lev11@gmail.com> Date: Wed, 23 Aug 2023 18:20:23 +0300 Subject: [PATCH 06/41] #2425: violations --- eo-runtime/src/main/java/org/eolang/Universe.java | 2 -- eo-runtime/src/test/java/org/eolang/UniverseTest.java | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/eo-runtime/src/main/java/org/eolang/Universe.java b/eo-runtime/src/main/java/org/eolang/Universe.java index 620d0377c0..f446207173 100644 --- a/eo-runtime/src/main/java/org/eolang/Universe.java +++ b/eo-runtime/src/main/java/org/eolang/Universe.java @@ -23,8 +23,6 @@ */ package org.eolang; -import org.apache.commons.lang3.ArrayUtils; - import java.util.HashMap; import java.util.Map; import java.util.Optional; diff --git a/eo-runtime/src/test/java/org/eolang/UniverseTest.java b/eo-runtime/src/test/java/org/eolang/UniverseTest.java index 6f23d7c314..16bdf06751 100644 --- a/eo-runtime/src/test/java/org/eolang/UniverseTest.java +++ b/eo-runtime/src/test/java/org/eolang/UniverseTest.java @@ -24,12 +24,12 @@ package org.eolang; import EOorg.EOeolang.EOseq; +import java.util.HashMap; +import java.util.Map; import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import java.util.HashMap; -import java.util.Map; /** * Test case for {@link Universe}. From 93cebbaedc8dd2383a7a039f6e31010ac35b239d Mon Sep 17 00:00:00 2001 From: levBagryansky <28lev11@gmail.com> Date: Wed, 23 Aug 2023 18:37:51 +0300 Subject: [PATCH 07/41] #2425: restart ci --- eo-runtime/src/main/java/org/eolang/Universe.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo-runtime/src/main/java/org/eolang/Universe.java b/eo-runtime/src/main/java/org/eolang/Universe.java index f446207173..15c866574b 100644 --- a/eo-runtime/src/main/java/org/eolang/Universe.java +++ b/eo-runtime/src/main/java/org/eolang/Universe.java @@ -79,7 +79,7 @@ public int find(final String name) { Phi accum; final String[] atts = Universe.replace(name) .split("\\."); - if (atts[0].equals("Q")) { + if (atts[0].equals("")) { accum = Phi.Φ; atts[0] = ""; } else if (atts[0].equals("ρ")) { From 6081f6decc8a28582c41cf1df443b862e5a1946b Mon Sep 17 00:00:00 2001 From: levBagryansky <28lev11@gmail.com> Date: Wed, 23 Aug 2023 18:38:00 +0300 Subject: [PATCH 08/41] #2425: restart ci --- eo-runtime/src/main/java/org/eolang/Universe.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo-runtime/src/main/java/org/eolang/Universe.java b/eo-runtime/src/main/java/org/eolang/Universe.java index 15c866574b..f446207173 100644 --- a/eo-runtime/src/main/java/org/eolang/Universe.java +++ b/eo-runtime/src/main/java/org/eolang/Universe.java @@ -79,7 +79,7 @@ public int find(final String name) { Phi accum; final String[] atts = Universe.replace(name) .split("\\."); - if (atts[0].equals("")) { + if (atts[0].equals("Q")) { accum = Phi.Φ; atts[0] = ""; } else if (atts[0].equals("ρ")) { From 754568da8e95890c99f56601fbb1b26a2d32e1eb Mon Sep 17 00:00:00 2001 From: levBagryansky <28lev11@gmail.com> Date: Wed, 23 Aug 2023 18:49:04 +0300 Subject: [PATCH 09/41] #2425: restart ci --- eo-runtime/src/main/java/org/eolang/Universe.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo-runtime/src/main/java/org/eolang/Universe.java b/eo-runtime/src/main/java/org/eolang/Universe.java index f446207173..15c866574b 100644 --- a/eo-runtime/src/main/java/org/eolang/Universe.java +++ b/eo-runtime/src/main/java/org/eolang/Universe.java @@ -79,7 +79,7 @@ public int find(final String name) { Phi accum; final String[] atts = Universe.replace(name) .split("\\."); - if (atts[0].equals("Q")) { + if (atts[0].equals("")) { accum = Phi.Φ; atts[0] = ""; } else if (atts[0].equals("ρ")) { From 6ffed2f156060d86ae7848f0878b9ca5e9e89638 Mon Sep 17 00:00:00 2001 From: levBagryansky <28lev11@gmail.com> Date: Wed, 23 Aug 2023 18:49:11 +0300 Subject: [PATCH 10/41] #2425: restart ci --- eo-runtime/src/main/java/org/eolang/Universe.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo-runtime/src/main/java/org/eolang/Universe.java b/eo-runtime/src/main/java/org/eolang/Universe.java index 15c866574b..f446207173 100644 --- a/eo-runtime/src/main/java/org/eolang/Universe.java +++ b/eo-runtime/src/main/java/org/eolang/Universe.java @@ -79,7 +79,7 @@ public int find(final String name) { Phi accum; final String[] atts = Universe.replace(name) .split("\\."); - if (atts[0].equals("")) { + if (atts[0].equals("Q")) { accum = Phi.Φ; atts[0] = ""; } else if (atts[0].equals("ρ")) { From 5a7f1ef0c3233259edd6329c876cdb5562bf7abc Mon Sep 17 00:00:00 2001 From: levBagryansky <28lev11@gmail.com> Date: Thu, 24 Aug 2023 12:49:52 +0300 Subject: [PATCH 11/41] changed hashcode --- .../main/resources/org/eolang/maven/pre/to-java.xsl | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/eo-maven-plugin/src/main/resources/org/eolang/maven/pre/to-java.xsl b/eo-maven-plugin/src/main/resources/org/eolang/maven/pre/to-java.xsl index 76581d6f61..3530b60338 100644 --- a/eo-maven-plugin/src/main/resources/org/eolang/maven/pre/to-java.xsl +++ b/eo-maven-plugin/src/main/resources/org/eolang/maven/pre/to-java.xsl @@ -158,6 +158,11 @@ SOFTWARE. extends PhDefault { + + + + private final AtomicBoolean initialized; + @@ -200,7 +205,7 @@ SOFTWARE. - this.add("Δ", new AtFree()); + this.add("Δ", new AtFree(new AtSimple(), this.initialized)); @@ -224,6 +229,12 @@ SOFTWARE. public int hashCode() { + if (this.initialized.get()) { + + return this.attr("Δ").get().hashCode(); + + } else { + return this.attr("Δ").get().hashCode(); } From 6d1f43b6db75d325e83bcc7c36f7787fe7a4dd13 Mon Sep 17 00:00:00 2001 From: levBagryansky <28lev11@gmail.com> Date: Thu, 24 Aug 2023 12:53:47 +0300 Subject: [PATCH 12/41] #2433: changed hashcode --- .../src/main/resources/org/eolang/maven/pre/to-java.xsl | 5 ----- 1 file changed, 5 deletions(-) diff --git a/eo-maven-plugin/src/main/resources/org/eolang/maven/pre/to-java.xsl b/eo-maven-plugin/src/main/resources/org/eolang/maven/pre/to-java.xsl index 3530b60338..a8c4188197 100644 --- a/eo-maven-plugin/src/main/resources/org/eolang/maven/pre/to-java.xsl +++ b/eo-maven-plugin/src/main/resources/org/eolang/maven/pre/to-java.xsl @@ -158,11 +158,6 @@ SOFTWARE. extends PhDefault { - - - - private final AtomicBoolean initialized; - From 2eebcc0ba41b234d631497c62f4d04b783c27194 Mon Sep 17 00:00:00 2001 From: levBagryansky <28lev11@gmail.com> Date: Thu, 24 Aug 2023 14:52:04 +0300 Subject: [PATCH 13/41] #2433: EOint has hashcode even without delta attribute initialized --- .../org/eolang/maven/pre/to-java.xsl | 38 +++++++++--- .../test/java/EOorg/EOeolang/EOintTest.java | 62 +++++++++++++++++++ 2 files changed, 92 insertions(+), 8 deletions(-) create mode 100644 eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java diff --git a/eo-maven-plugin/src/main/resources/org/eolang/maven/pre/to-java.xsl b/eo-maven-plugin/src/main/resources/org/eolang/maven/pre/to-java.xsl index a8c4188197..9e05ba7e66 100644 --- a/eo-maven-plugin/src/main/resources/org/eolang/maven/pre/to-java.xsl +++ b/eo-maven-plugin/src/main/resources/org/eolang/maven/pre/to-java.xsl @@ -131,6 +131,8 @@ SOFTWARE. import org.eolang.*; + import java.util.concurrent.atomic.AtomicBoolean; + @@ -158,6 +160,7 @@ SOFTWARE. extends PhDefault { + @@ -174,8 +177,17 @@ SOFTWARE. + + + + + + private final AtomicBoolean initialized = new AtomicBoolean(false); + + + public @@ -223,14 +235,24 @@ SOFTWARE. @Override public int hashCode() { - - if (this.initialized.get()) { - - return this.attr("Δ").get().hashCode(); - - } else { - - return this.attr("Δ").get().hashCode(); + + + + return this.attr("Δ").get().hashCode(); + + + + if (this.initialized.get()) { + + return this.attr("Δ").get().hashCode(); + + } else { + + return this.vertex; + + } + + } diff --git a/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java b/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java new file mode 100644 index 0000000000..14a2042419 --- /dev/null +++ b/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java @@ -0,0 +1,62 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) 2016-2023 Objectionary.com + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +/* + * @checkstyle PackageNameCheck (10 lines) + */ +package EOorg.EOeolang; + +import org.eolang.Data; +import org.eolang.Phi; +import org.hamcrest.MatcherAssert; +import org.hamcrest.Matchers; +import org.junit.jupiter.api.Test; + +/** + * Test case for {@link EOint}. + * + * @since 0.1 + * @checkstyle TypeNameCheck (4 lines) + */ +public class EOintTest { + + @Test + void hasEqualHashes() { + final Phi left = new Data.ToPhi(42L); + final Phi right = new Data.ToPhi(42L); + MatcherAssert.assertThat( + left.hashCode(), + Matchers.equalTo(right.hashCode()) + ); + } + + @Test + void hasHashEvenWithoutData() { + final Phi phi = new EOint(Phi.Φ); + MatcherAssert.assertThat( + phi.hashCode(), + Matchers.greaterThan(0) + ); + } +} From 4a72935dba82b8f65f67e7196dcd8c7c5f883bea Mon Sep 17 00:00:00 2001 From: levBagryansky <28lev11@gmail.com> Date: Thu, 24 Aug 2023 14:59:38 +0300 Subject: [PATCH 14/41] #2425: Check if argument is null --- eo-runtime/src/main/java/org/eolang/Universe.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/eo-runtime/src/main/java/org/eolang/Universe.java b/eo-runtime/src/main/java/org/eolang/Universe.java index f446207173..c33751d396 100644 --- a/eo-runtime/src/main/java/org/eolang/Universe.java +++ b/eo-runtime/src/main/java/org/eolang/Universe.java @@ -76,15 +76,20 @@ public Universe() { * @return Vertex of the object to find. */ public int find(final String name) { + if (name == null) { + throw new IllegalArgumentException( + "Argument name is null" + ); + } Phi accum; final String[] atts = Universe.replace(name) .split("\\."); - if (atts[0].equals("Q")) { + if ("Q".equals(atts[0])) { accum = Phi.Φ; atts[0] = ""; - } else if (atts[0].equals("ρ")) { + } else if ("ρ".equals(atts[0])) { accum = this.connector; - } else if (atts[0].equals("$")) { + } else if ("$".equals(atts[0])) { accum = this.connector; atts[0] = ""; } else { From f081990a12e983c1304acdab20ec6a889fa4be02 Mon Sep 17 00:00:00 2001 From: levBagryansky <28lev11@gmail.com> Date: Thu, 24 Aug 2023 15:21:16 +0300 Subject: [PATCH 15/41] #2425: restart ci --- eo-runtime/src/main/java/org/eolang/Universe.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/eo-runtime/src/main/java/org/eolang/Universe.java b/eo-runtime/src/main/java/org/eolang/Universe.java index c33751d396..9f5b57fba8 100644 --- a/eo-runtime/src/main/java/org/eolang/Universe.java +++ b/eo-runtime/src/main/java/org/eolang/Universe.java @@ -146,11 +146,6 @@ public int copy(final int vertex) { return vertex; } - /** - * Dataizes the eo object by vertex and return byte array. - * @param vertex Vertex of eo-object. - * @return Raw data. - */ public byte[] dataize(final int vertex) { return new Param( this.get(vertex), From 48913643dfd1e8f147a6aa130e9d8f27d41b8bfe Mon Sep 17 00:00:00 2001 From: levBagryansky <28lev11@gmail.com> Date: Thu, 24 Aug 2023 15:21:25 +0300 Subject: [PATCH 16/41] #2425: restart ci --- eo-runtime/src/main/java/org/eolang/Universe.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/eo-runtime/src/main/java/org/eolang/Universe.java b/eo-runtime/src/main/java/org/eolang/Universe.java index 9f5b57fba8..c33751d396 100644 --- a/eo-runtime/src/main/java/org/eolang/Universe.java +++ b/eo-runtime/src/main/java/org/eolang/Universe.java @@ -146,6 +146,11 @@ public int copy(final int vertex) { return vertex; } + /** + * Dataizes the eo object by vertex and return byte array. + * @param vertex Vertex of eo-object. + * @return Raw data. + */ public byte[] dataize(final int vertex) { return new Param( this.get(vertex), From 2bc2aad75528aadeec862da337d8be333579aae8 Mon Sep 17 00:00:00 2001 From: levBagryansky <28lev11@gmail.com> Date: Thu, 24 Aug 2023 15:30:27 +0300 Subject: [PATCH 17/41] #2425: Do not check EOintTest.java since it have illegal package name --- .github/workflows/codecov.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 2b7a887f42..a180d61c0f 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -7,6 +7,8 @@ on: concurrency: group: codecov-${{ github.ref }} cancel-in-progress: true +ignore: + - "eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java" jobs: codecov: runs-on: ubuntu-22.04 From d71480aab68044bbe0d260a2f149dcae0cbf8184 Mon Sep 17 00:00:00 2001 From: levBagryansky <28lev11@gmail.com> Date: Thu, 24 Aug 2023 15:35:43 +0300 Subject: [PATCH 18/41] #2425: Try to fix codecov via suppress varning --- .github/workflows/codecov.yml | 2 -- eo-runtime/src/test/java/EOorg/EOeolang/EOintEOplusTest.java | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index a180d61c0f..2b7a887f42 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -7,8 +7,6 @@ on: concurrency: group: codecov-${{ github.ref }} cancel-in-progress: true -ignore: - - "eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java" jobs: codecov: runs-on: ubuntu-22.04 diff --git a/eo-runtime/src/test/java/EOorg/EOeolang/EOintEOplusTest.java b/eo-runtime/src/test/java/EOorg/EOeolang/EOintEOplusTest.java index 2223d6b25e..8f999c45c1 100644 --- a/eo-runtime/src/test/java/EOorg/EOeolang/EOintEOplusTest.java +++ b/eo-runtime/src/test/java/EOorg/EOeolang/EOintEOplusTest.java @@ -40,6 +40,7 @@ * @since 0.1 * @checkstyle TypeNameCheck (4 lines) */ +@SuppressWarnings("PMD.PackageCase") final class EOintEOplusTest { @Test @@ -54,3 +55,4 @@ void addsNumbers() { ); } } + From 73b9772ad773ad9325d1ede6cf283d4688e54826 Mon Sep 17 00:00:00 2001 From: levBagryansky <28lev11@gmail.com> Date: Thu, 24 Aug 2023 15:44:56 +0300 Subject: [PATCH 19/41] #2425: spurious network --- eo-runtime/src/EOint$EOeq.java | 125 ++++++++++++++++++++++++++++++++ eo-runtime/src/EOint$EOgte.java | 37 ++++++++++ eo-runtime/src/EOint.java | 96 ++++++++++++++++++++++++ 3 files changed, 258 insertions(+) create mode 100644 eo-runtime/src/EOint$EOeq.java create mode 100644 eo-runtime/src/EOint$EOgte.java create mode 100644 eo-runtime/src/EOint.java diff --git a/eo-runtime/src/EOint$EOeq.java b/eo-runtime/src/EOint$EOeq.java new file mode 100644 index 0000000000..9178bb4800 --- /dev/null +++ b/eo-runtime/src/EOint$EOeq.java @@ -0,0 +1,125 @@ + +/* This file was auto-generated by eo-maven-plugin (1.0-SNAPSHOT b5f50eb 2023-08-23T18:33:26) on 2023-08-24T11:58:23.295065Z; your changes will be discarded on the next build */ +package EOorg.EOeolang; + +import org.eolang.*; +import java.util.concurrent.atomic.AtomicBoolean; + +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// 00 00 00 00 00 00 00 00 +// +// +// +// +@XmirObject(name = "int$eq", oname = "eq", source = "/home/tardis3/eo/eo-runtime/src/main/eo/org/eolang/int.eo") +public final class EOint$EOeq extends PhDefault { + + public EOint$EOeq(final Phi sigma) { + super(sigma); + this.add("x", new AtFree(/* default */)); + this.add("φ", new AtOnce(new AtComposite(this, rho -> { + Phi ret_base_base_base = new PhMethod(rho, "self-as-bytes"); + Phi ret_base_base = new PhMethod(ret_base_base_base, "eq"); + ret_base_base = new PhLocated(ret_base_base, 34, 8, "Φ.org.eolang.int$eq.φ.ρ.ρ"); + ret_base_base = new PhCopy(ret_base_base); + Phi ret_base_base_1 = new PhMethod(rho, "zero-as-bytes"); + ret_base_base = new PhWith(ret_base_base, 0, ret_base_base_1); + Phi ret_base = new PhMethod(ret_base_base, "and"); + ret_base = new PhLocated(ret_base, 33, 6, "Φ.org.eolang.int$eq.φ.ρ"); + ret_base = new PhCopy(ret_base); + Phi ret_base_1_base = new PhMethod(rho, "x-as-bytes"); + Phi ret_base_1 = new PhMethod(ret_base_1_base, "eq"); + ret_base_1 = new PhLocated(ret_base_1, 37, 8, "Φ.org.eolang.int$eq.φ.ρ.α0"); + ret_base_1 = new PhCopy(ret_base_1); + Phi ret_base_1_1 = new PhMethod(rho, "zero-as-bytes"); + ret_base_1_1 = new PhLocated(ret_base_1_1, 39, 10, "Φ.org.eolang.int$eq.φ.ρ.α0.α0"); + ret_base_1 = new PhWith(ret_base_1, 0, ret_base_1_1); + ret_base = new PhWith(ret_base, 0, ret_base_1); + Phi ret = new PhMethod(ret_base, "if"); + ret = new PhLocated(ret, 32, 4, "Φ.org.eolang.int$eq.φ"); + ret = new PhCopy(ret); + Phi ret_1_base_base_base = new PhMethod(rho, "ρ"); + ret_1_base_base_base = new PhLocated(ret_1_base_base_base, 41, 8, "Φ.org.eolang.int$eq.φ.α0.ρ.ρ.ρ"); + Phi ret_1_base_base = new PhMethod(ret_1_base_base_base, "neg"); + ret_1_base_base = new PhLocated(ret_1_base_base, 41, 9, "Φ.org.eolang.int$eq.φ.α0.ρ.ρ"); + Phi ret_1_base = new PhMethod(ret_1_base_base, "as-bytes"); + ret_1_base = new PhLocated(ret_1_base, 41, 13, "Φ.org.eolang.int$eq.φ.α0.ρ"); + Phi ret_1 = new PhMethod(ret_1_base, "eq"); + ret_1 = new PhLocated(ret_1, 40, 6, "Φ.org.eolang.int$eq.φ.α0"); + ret_1 = new PhCopy(ret_1); + Phi ret_1_1_base_base = new PhMethod(rho, "x"); + ret_1_1_base_base = new PhLocated(ret_1_1_base_base, 42, 8, "Φ.org.eolang.int$eq.φ.α0.α0.ρ.ρ"); + Phi ret_1_1_base = new PhMethod(ret_1_1_base_base, "neg"); + ret_1_1_base = new PhLocated(ret_1_1_base, 42, 9, "Φ.org.eolang.int$eq.φ.α0.α0.ρ"); + Phi ret_1_1 = new PhMethod(ret_1_1_base, "as-bytes"); + ret_1_1 = new PhLocated(ret_1_1, 42, 13, "Φ.org.eolang.int$eq.φ.α0.α0"); + ret_1 = new PhWith(ret_1, 0, ret_1_1); + Phi ret_2_base = new PhMethod(rho, "self-as-bytes"); + ret_2_base = new PhLocated(ret_2_base, 44, 8, "Φ.org.eolang.int$eq.φ.α1.ρ"); + Phi ret_2 = new PhMethod(ret_2_base, "eq"); + ret_2 = new PhLocated(ret_2, 43, 6, "Φ.org.eolang.int$eq.φ.α1"); + ret_2 = new PhCopy(ret_2); + Phi ret_2_1 = new PhMethod(rho, "x-as-bytes"); + ret_2_1 = new PhLocated(ret_2_1, 45, 8, "Φ.org.eolang.int$eq.φ.α1.α0"); + ret_2 = new PhWith(ret_2, 0, ret_2_1); + ret = new PhWith(ret, 0, ret_1); + ret = new PhWith(ret, 1, ret_2); + return ret; + }))); + this.add("self-as-bytes", new AtOnce(new AtComposite(this, rho -> { + Phi ret_base = new PhMethod(rho, "ρ"); + ret_base = new PhLocated(ret_base, 35, 10, "Φ.org.eolang.int$eq.self-as-bytes.ρ"); + Phi ret = new PhMethod(ret_base, "as-bytes"); + ret = new PhLocated(ret, 35, 11, "Φ.org.eolang.int$eq.self-as-bytes"); + ret = new PhConst(ret); + return ret; + }))); + this.add("zero-as-bytes", new AtOnce(new AtComposite(this, rho -> { + Phi ret = new EOorg.EOeolang.EObytes(Phi.Φ); + ret = new PhLocated(ret, 36, 10, "Φ.org.eolang.int$eq.zero-as-bytes"); + ret = new PhWith(ret, "Δ", new Data.Value<>(new byte[] {(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00})); + ret = new PhConst(ret); + return ret; + }))); + this.add("x-as-bytes", new AtOnce(new AtComposite(this, rho -> { + Phi ret_base = new PhMethod(rho, "x"); + ret_base = new PhLocated(ret_base, 38, 10, "Φ.org.eolang.int$eq.x-as-bytes.ρ"); + Phi ret = new PhMethod(ret_base, "as-bytes"); + ret = new PhLocated(ret, 38, 11, "Φ.org.eolang.int$eq.x-as-bytes"); + ret = new PhConst(ret); + return ret; + }))); + } +} diff --git a/eo-runtime/src/EOint$EOgte.java b/eo-runtime/src/EOint$EOgte.java new file mode 100644 index 0000000000..3bab328bd9 --- /dev/null +++ b/eo-runtime/src/EOint$EOgte.java @@ -0,0 +1,37 @@ + +/* This file was auto-generated by eo-maven-plugin (1.0-SNAPSHOT b5f50eb 2023-08-23T18:33:26) on 2023-08-24T11:58:23.295065Z; your changes will be discarded on the next build */ +package EOorg.EOeolang; + +import org.eolang.*; +import java.util.concurrent.atomic.AtomicBoolean; + +// +// +// +// +// +// +// +// +// +@XmirObject(name = "int$gte", oname = "gte", source = "/home/tardis3/eo/eo-runtime/src/main/eo/org/eolang/int.eo") +public final class EOint$EOgte extends PhDefault { + + public EOint$EOgte(final Phi sigma) { + super(sigma); + this.add("x", new AtFree(/* default */)); + this.add("φ", new AtOnce(new AtComposite(this, rho -> { + Phi ret_base_base = new PhMethod(rho, "ρ"); + ret_base_base = new PhLocated(ret_base_base, 67, 6, "Φ.org.eolang.int$gte.φ.ρ.ρ"); + Phi ret_base = new PhMethod(ret_base_base, "lt"); + ret_base = new PhLocated(ret_base, 67, 7, "Φ.org.eolang.int$gte.φ.ρ"); + ret_base = new PhCopy(ret_base); + Phi ret_base_1 = new PhMethod(rho, "x"); + ret_base_1 = new PhLocated(ret_base_1, 67, 11, "Φ.org.eolang.int$gte.φ.ρ.α0"); + ret_base = new PhWith(ret_base, 0, ret_base_1); + Phi ret = new PhMethod(ret_base, "not"); + ret = new PhLocated(ret, 66, 4, "Φ.org.eolang.int$gte.φ"); + return ret; + }))); + } +} diff --git a/eo-runtime/src/EOint.java b/eo-runtime/src/EOint.java new file mode 100644 index 0000000000..d8c0a69ea1 --- /dev/null +++ b/eo-runtime/src/EOint.java @@ -0,0 +1,96 @@ + +/* This file was auto-generated by eo-maven-plugin (1.0-SNAPSHOT b5f50eb 2023-08-23T18:33:26) on 2023-08-24T11:58:23.295065Z; your changes will be discarded on the next build */ +package EOorg.EOeolang; + +import org.eolang.*; +import java.util.concurrent.atomic.AtomicBoolean; + +// +// +// +// +// +// +// +// +// +// +// +// +// +@XmirObject(name = "int", oname = "int", source = "/home/tardis3/eo/eo-runtime/src/main/eo/org/eolang/int.eo") +public final class EOint extends PhDefault { + + private final AtomicBoolean initialized = new AtomicBoolean(false); + public EOint(final Phi sigma) { + super(sigma); + this.add("Δ", new AtFree(new AtSimple(), this.initialized)); + this.add("eq", new AtOnce(new AtComposite(this, rho -> { + Phi ret = new EOint$EOeq(rho); + ret = new PhLocated(ret, 30, 2, "Φ.org.eolang.int.eq"); + return ret; + }))); + this.add("lt", new AtOnce(new AtComposite(this, rho -> { + Phi ret = new EOint$EOlt(rho); + ret = new PhLocated(ret, 47, 2, "Φ.org.eolang.int.lt"); + return ret; + }))); + this.add("lte", new AtOnce(new AtComposite(this, rho -> { + Phi ret = new EOint$EOlte(rho); + ret = new PhLocated(ret, 56, 2, "Φ.org.eolang.int.lte"); + return ret; + }))); + this.add("gt", new AtOnce(new AtComposite(this, rho -> { + Phi ret = new EOint$EOgt(rho); + ret = new PhLocated(ret, 61, 2, "Φ.org.eolang.int.gt"); + return ret; + }))); + this.add("gte", new AtOnce(new AtComposite(this, rho -> { + Phi ret = new EOint$EOgte(rho); + ret = new PhLocated(ret, 64, 2, "Φ.org.eolang.int.gte"); + return ret; + }))); + this.add("neg", new AtOnce(new AtComposite(this, rho -> { + Phi ret = new EOint$EOneg(rho); + ret = new PhLocated(ret, 69, 2, "Φ.org.eolang.int.neg"); + return ret; + }))); + this.add("plus", new AtOnce(new AtComposite(this, rho -> { + Phi ret = new EOint$EOplus(rho); + ret = new PhLocated(ret, 73, 2, "Φ.org.eolang.int.plus"); + return ret; + }))); + this.add("minus", new AtOnce(new AtComposite(this, rho -> { + Phi ret = new EOint$EOminus(rho); + ret = new PhLocated(ret, 76, 2, "Φ.org.eolang.int.minus"); + return ret; + }))); + this.add("times", new AtOnce(new AtComposite(this, rho -> { + Phi ret = new EOint$EOtimes(rho); + ret = new PhLocated(ret, 96, 2, "Φ.org.eolang.int.times"); + return ret; + }))); + this.add("div", new AtOnce(new AtComposite(this, rho -> { + Phi ret = new EOint$EOdiv(rho); + ret = new PhLocated(ret, 99, 2, "Φ.org.eolang.int.div"); + return ret; + }))); + this.add("as-bytes", new AtOnce(new AtComposite(this, rho -> { + Phi ret = new EOint$EOas_bytes(rho); + ret = new PhLocated(ret, 102, 2, "Φ.org.eolang.int.as-bytes"); + return ret; + }))); + } + @Override + public int hashCode() { + if (this.initialized.get()) { + return this.attr("Δ").get().hashCode(); + } else { + return this.vertex; + } + } + @Override + public boolean equals(final Object obj) { + return this.attr("Δ").get().equals(obj); + } +} From 9c0407a0b758a4afc7c98a5ca8e7df982caa2d21 Mon Sep 17 00:00:00 2001 From: levBagryansky <28lev11@gmail.com> Date: Thu, 24 Aug 2023 15:45:12 +0300 Subject: [PATCH 20/41] #2425: spurious network --- eo-runtime/src/EOint$EOeq.java | 125 -------------------------------- eo-runtime/src/EOint$EOgte.java | 37 ---------- eo-runtime/src/EOint.java | 96 ------------------------ 3 files changed, 258 deletions(-) delete mode 100644 eo-runtime/src/EOint$EOeq.java delete mode 100644 eo-runtime/src/EOint$EOgte.java delete mode 100644 eo-runtime/src/EOint.java diff --git a/eo-runtime/src/EOint$EOeq.java b/eo-runtime/src/EOint$EOeq.java deleted file mode 100644 index 9178bb4800..0000000000 --- a/eo-runtime/src/EOint$EOeq.java +++ /dev/null @@ -1,125 +0,0 @@ - -/* This file was auto-generated by eo-maven-plugin (1.0-SNAPSHOT b5f50eb 2023-08-23T18:33:26) on 2023-08-24T11:58:23.295065Z; your changes will be discarded on the next build */ -package EOorg.EOeolang; - -import org.eolang.*; -import java.util.concurrent.atomic.AtomicBoolean; - -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// 00 00 00 00 00 00 00 00 -// -// -// -// -@XmirObject(name = "int$eq", oname = "eq", source = "/home/tardis3/eo/eo-runtime/src/main/eo/org/eolang/int.eo") -public final class EOint$EOeq extends PhDefault { - - public EOint$EOeq(final Phi sigma) { - super(sigma); - this.add("x", new AtFree(/* default */)); - this.add("φ", new AtOnce(new AtComposite(this, rho -> { - Phi ret_base_base_base = new PhMethod(rho, "self-as-bytes"); - Phi ret_base_base = new PhMethod(ret_base_base_base, "eq"); - ret_base_base = new PhLocated(ret_base_base, 34, 8, "Φ.org.eolang.int$eq.φ.ρ.ρ"); - ret_base_base = new PhCopy(ret_base_base); - Phi ret_base_base_1 = new PhMethod(rho, "zero-as-bytes"); - ret_base_base = new PhWith(ret_base_base, 0, ret_base_base_1); - Phi ret_base = new PhMethod(ret_base_base, "and"); - ret_base = new PhLocated(ret_base, 33, 6, "Φ.org.eolang.int$eq.φ.ρ"); - ret_base = new PhCopy(ret_base); - Phi ret_base_1_base = new PhMethod(rho, "x-as-bytes"); - Phi ret_base_1 = new PhMethod(ret_base_1_base, "eq"); - ret_base_1 = new PhLocated(ret_base_1, 37, 8, "Φ.org.eolang.int$eq.φ.ρ.α0"); - ret_base_1 = new PhCopy(ret_base_1); - Phi ret_base_1_1 = new PhMethod(rho, "zero-as-bytes"); - ret_base_1_1 = new PhLocated(ret_base_1_1, 39, 10, "Φ.org.eolang.int$eq.φ.ρ.α0.α0"); - ret_base_1 = new PhWith(ret_base_1, 0, ret_base_1_1); - ret_base = new PhWith(ret_base, 0, ret_base_1); - Phi ret = new PhMethod(ret_base, "if"); - ret = new PhLocated(ret, 32, 4, "Φ.org.eolang.int$eq.φ"); - ret = new PhCopy(ret); - Phi ret_1_base_base_base = new PhMethod(rho, "ρ"); - ret_1_base_base_base = new PhLocated(ret_1_base_base_base, 41, 8, "Φ.org.eolang.int$eq.φ.α0.ρ.ρ.ρ"); - Phi ret_1_base_base = new PhMethod(ret_1_base_base_base, "neg"); - ret_1_base_base = new PhLocated(ret_1_base_base, 41, 9, "Φ.org.eolang.int$eq.φ.α0.ρ.ρ"); - Phi ret_1_base = new PhMethod(ret_1_base_base, "as-bytes"); - ret_1_base = new PhLocated(ret_1_base, 41, 13, "Φ.org.eolang.int$eq.φ.α0.ρ"); - Phi ret_1 = new PhMethod(ret_1_base, "eq"); - ret_1 = new PhLocated(ret_1, 40, 6, "Φ.org.eolang.int$eq.φ.α0"); - ret_1 = new PhCopy(ret_1); - Phi ret_1_1_base_base = new PhMethod(rho, "x"); - ret_1_1_base_base = new PhLocated(ret_1_1_base_base, 42, 8, "Φ.org.eolang.int$eq.φ.α0.α0.ρ.ρ"); - Phi ret_1_1_base = new PhMethod(ret_1_1_base_base, "neg"); - ret_1_1_base = new PhLocated(ret_1_1_base, 42, 9, "Φ.org.eolang.int$eq.φ.α0.α0.ρ"); - Phi ret_1_1 = new PhMethod(ret_1_1_base, "as-bytes"); - ret_1_1 = new PhLocated(ret_1_1, 42, 13, "Φ.org.eolang.int$eq.φ.α0.α0"); - ret_1 = new PhWith(ret_1, 0, ret_1_1); - Phi ret_2_base = new PhMethod(rho, "self-as-bytes"); - ret_2_base = new PhLocated(ret_2_base, 44, 8, "Φ.org.eolang.int$eq.φ.α1.ρ"); - Phi ret_2 = new PhMethod(ret_2_base, "eq"); - ret_2 = new PhLocated(ret_2, 43, 6, "Φ.org.eolang.int$eq.φ.α1"); - ret_2 = new PhCopy(ret_2); - Phi ret_2_1 = new PhMethod(rho, "x-as-bytes"); - ret_2_1 = new PhLocated(ret_2_1, 45, 8, "Φ.org.eolang.int$eq.φ.α1.α0"); - ret_2 = new PhWith(ret_2, 0, ret_2_1); - ret = new PhWith(ret, 0, ret_1); - ret = new PhWith(ret, 1, ret_2); - return ret; - }))); - this.add("self-as-bytes", new AtOnce(new AtComposite(this, rho -> { - Phi ret_base = new PhMethod(rho, "ρ"); - ret_base = new PhLocated(ret_base, 35, 10, "Φ.org.eolang.int$eq.self-as-bytes.ρ"); - Phi ret = new PhMethod(ret_base, "as-bytes"); - ret = new PhLocated(ret, 35, 11, "Φ.org.eolang.int$eq.self-as-bytes"); - ret = new PhConst(ret); - return ret; - }))); - this.add("zero-as-bytes", new AtOnce(new AtComposite(this, rho -> { - Phi ret = new EOorg.EOeolang.EObytes(Phi.Φ); - ret = new PhLocated(ret, 36, 10, "Φ.org.eolang.int$eq.zero-as-bytes"); - ret = new PhWith(ret, "Δ", new Data.Value<>(new byte[] {(byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00})); - ret = new PhConst(ret); - return ret; - }))); - this.add("x-as-bytes", new AtOnce(new AtComposite(this, rho -> { - Phi ret_base = new PhMethod(rho, "x"); - ret_base = new PhLocated(ret_base, 38, 10, "Φ.org.eolang.int$eq.x-as-bytes.ρ"); - Phi ret = new PhMethod(ret_base, "as-bytes"); - ret = new PhLocated(ret, 38, 11, "Φ.org.eolang.int$eq.x-as-bytes"); - ret = new PhConst(ret); - return ret; - }))); - } -} diff --git a/eo-runtime/src/EOint$EOgte.java b/eo-runtime/src/EOint$EOgte.java deleted file mode 100644 index 3bab328bd9..0000000000 --- a/eo-runtime/src/EOint$EOgte.java +++ /dev/null @@ -1,37 +0,0 @@ - -/* This file was auto-generated by eo-maven-plugin (1.0-SNAPSHOT b5f50eb 2023-08-23T18:33:26) on 2023-08-24T11:58:23.295065Z; your changes will be discarded on the next build */ -package EOorg.EOeolang; - -import org.eolang.*; -import java.util.concurrent.atomic.AtomicBoolean; - -// -// -// -// -// -// -// -// -// -@XmirObject(name = "int$gte", oname = "gte", source = "/home/tardis3/eo/eo-runtime/src/main/eo/org/eolang/int.eo") -public final class EOint$EOgte extends PhDefault { - - public EOint$EOgte(final Phi sigma) { - super(sigma); - this.add("x", new AtFree(/* default */)); - this.add("φ", new AtOnce(new AtComposite(this, rho -> { - Phi ret_base_base = new PhMethod(rho, "ρ"); - ret_base_base = new PhLocated(ret_base_base, 67, 6, "Φ.org.eolang.int$gte.φ.ρ.ρ"); - Phi ret_base = new PhMethod(ret_base_base, "lt"); - ret_base = new PhLocated(ret_base, 67, 7, "Φ.org.eolang.int$gte.φ.ρ"); - ret_base = new PhCopy(ret_base); - Phi ret_base_1 = new PhMethod(rho, "x"); - ret_base_1 = new PhLocated(ret_base_1, 67, 11, "Φ.org.eolang.int$gte.φ.ρ.α0"); - ret_base = new PhWith(ret_base, 0, ret_base_1); - Phi ret = new PhMethod(ret_base, "not"); - ret = new PhLocated(ret, 66, 4, "Φ.org.eolang.int$gte.φ"); - return ret; - }))); - } -} diff --git a/eo-runtime/src/EOint.java b/eo-runtime/src/EOint.java deleted file mode 100644 index d8c0a69ea1..0000000000 --- a/eo-runtime/src/EOint.java +++ /dev/null @@ -1,96 +0,0 @@ - -/* This file was auto-generated by eo-maven-plugin (1.0-SNAPSHOT b5f50eb 2023-08-23T18:33:26) on 2023-08-24T11:58:23.295065Z; your changes will be discarded on the next build */ -package EOorg.EOeolang; - -import org.eolang.*; -import java.util.concurrent.atomic.AtomicBoolean; - -// -// -// -// -// -// -// -// -// -// -// -// -// -@XmirObject(name = "int", oname = "int", source = "/home/tardis3/eo/eo-runtime/src/main/eo/org/eolang/int.eo") -public final class EOint extends PhDefault { - - private final AtomicBoolean initialized = new AtomicBoolean(false); - public EOint(final Phi sigma) { - super(sigma); - this.add("Δ", new AtFree(new AtSimple(), this.initialized)); - this.add("eq", new AtOnce(new AtComposite(this, rho -> { - Phi ret = new EOint$EOeq(rho); - ret = new PhLocated(ret, 30, 2, "Φ.org.eolang.int.eq"); - return ret; - }))); - this.add("lt", new AtOnce(new AtComposite(this, rho -> { - Phi ret = new EOint$EOlt(rho); - ret = new PhLocated(ret, 47, 2, "Φ.org.eolang.int.lt"); - return ret; - }))); - this.add("lte", new AtOnce(new AtComposite(this, rho -> { - Phi ret = new EOint$EOlte(rho); - ret = new PhLocated(ret, 56, 2, "Φ.org.eolang.int.lte"); - return ret; - }))); - this.add("gt", new AtOnce(new AtComposite(this, rho -> { - Phi ret = new EOint$EOgt(rho); - ret = new PhLocated(ret, 61, 2, "Φ.org.eolang.int.gt"); - return ret; - }))); - this.add("gte", new AtOnce(new AtComposite(this, rho -> { - Phi ret = new EOint$EOgte(rho); - ret = new PhLocated(ret, 64, 2, "Φ.org.eolang.int.gte"); - return ret; - }))); - this.add("neg", new AtOnce(new AtComposite(this, rho -> { - Phi ret = new EOint$EOneg(rho); - ret = new PhLocated(ret, 69, 2, "Φ.org.eolang.int.neg"); - return ret; - }))); - this.add("plus", new AtOnce(new AtComposite(this, rho -> { - Phi ret = new EOint$EOplus(rho); - ret = new PhLocated(ret, 73, 2, "Φ.org.eolang.int.plus"); - return ret; - }))); - this.add("minus", new AtOnce(new AtComposite(this, rho -> { - Phi ret = new EOint$EOminus(rho); - ret = new PhLocated(ret, 76, 2, "Φ.org.eolang.int.minus"); - return ret; - }))); - this.add("times", new AtOnce(new AtComposite(this, rho -> { - Phi ret = new EOint$EOtimes(rho); - ret = new PhLocated(ret, 96, 2, "Φ.org.eolang.int.times"); - return ret; - }))); - this.add("div", new AtOnce(new AtComposite(this, rho -> { - Phi ret = new EOint$EOdiv(rho); - ret = new PhLocated(ret, 99, 2, "Φ.org.eolang.int.div"); - return ret; - }))); - this.add("as-bytes", new AtOnce(new AtComposite(this, rho -> { - Phi ret = new EOint$EOas_bytes(rho); - ret = new PhLocated(ret, 102, 2, "Φ.org.eolang.int.as-bytes"); - return ret; - }))); - } - @Override - public int hashCode() { - if (this.initialized.get()) { - return this.attr("Δ").get().hashCode(); - } else { - return this.vertex; - } - } - @Override - public boolean equals(final Object obj) { - return this.attr("Δ").get().equals(obj); - } -} From ab668fc8d37c6952bf3879beb17a09e530558f30 Mon Sep 17 00:00:00 2001 From: levBagryansky <28lev11@gmail.com> Date: Thu, 24 Aug 2023 16:04:14 +0300 Subject: [PATCH 21/41] #2433: spurious network --- .../test/java/EOorg/EOeolang/EOintTest.java | 34 ------------------- 1 file changed, 34 deletions(-) diff --git a/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java b/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java index 14a2042419..375a92c025 100644 --- a/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java +++ b/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java @@ -26,37 +26,3 @@ * @checkstyle PackageNameCheck (10 lines) */ package EOorg.EOeolang; - -import org.eolang.Data; -import org.eolang.Phi; -import org.hamcrest.MatcherAssert; -import org.hamcrest.Matchers; -import org.junit.jupiter.api.Test; - -/** - * Test case for {@link EOint}. - * - * @since 0.1 - * @checkstyle TypeNameCheck (4 lines) - */ -public class EOintTest { - - @Test - void hasEqualHashes() { - final Phi left = new Data.ToPhi(42L); - final Phi right = new Data.ToPhi(42L); - MatcherAssert.assertThat( - left.hashCode(), - Matchers.equalTo(right.hashCode()) - ); - } - - @Test - void hasHashEvenWithoutData() { - final Phi phi = new EOint(Phi.Φ); - MatcherAssert.assertThat( - phi.hashCode(), - Matchers.greaterThan(0) - ); - } -} From a3f7fc4b5db5b44a75bab4e73b52ce1a2b9eb074 Mon Sep 17 00:00:00 2001 From: levBagryansky <28lev11@gmail.com> Date: Thu, 24 Aug 2023 16:04:21 +0300 Subject: [PATCH 22/41] #2433: spurious network --- .../test/java/EOorg/EOeolang/EOintTest.java | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java b/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java index 375a92c025..14a2042419 100644 --- a/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java +++ b/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java @@ -26,3 +26,37 @@ * @checkstyle PackageNameCheck (10 lines) */ package EOorg.EOeolang; + +import org.eolang.Data; +import org.eolang.Phi; +import org.hamcrest.MatcherAssert; +import org.hamcrest.Matchers; +import org.junit.jupiter.api.Test; + +/** + * Test case for {@link EOint}. + * + * @since 0.1 + * @checkstyle TypeNameCheck (4 lines) + */ +public class EOintTest { + + @Test + void hasEqualHashes() { + final Phi left = new Data.ToPhi(42L); + final Phi right = new Data.ToPhi(42L); + MatcherAssert.assertThat( + left.hashCode(), + Matchers.equalTo(right.hashCode()) + ); + } + + @Test + void hasHashEvenWithoutData() { + final Phi phi = new EOint(Phi.Φ); + MatcherAssert.assertThat( + phi.hashCode(), + Matchers.greaterThan(0) + ); + } +} From e0d6feb08fe0df66f9839629b35b7d85a19f37d3 Mon Sep 17 00:00:00 2001 From: levBagryansky <28lev11@gmail.com> Date: Thu, 24 Aug 2023 16:17:19 +0300 Subject: [PATCH 23/41] #2433: SuppressWarning --- eo-runtime/src/test/java/EOorg/EOeolang/EOintEOplusTest.java | 1 - eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/eo-runtime/src/test/java/EOorg/EOeolang/EOintEOplusTest.java b/eo-runtime/src/test/java/EOorg/EOeolang/EOintEOplusTest.java index 8f999c45c1..330d16fdfd 100644 --- a/eo-runtime/src/test/java/EOorg/EOeolang/EOintEOplusTest.java +++ b/eo-runtime/src/test/java/EOorg/EOeolang/EOintEOplusTest.java @@ -40,7 +40,6 @@ * @since 0.1 * @checkstyle TypeNameCheck (4 lines) */ -@SuppressWarnings("PMD.PackageCase") final class EOintEOplusTest { @Test diff --git a/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java b/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java index 14a2042419..ed02504b4d 100644 --- a/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java +++ b/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java @@ -39,6 +39,7 @@ * @since 0.1 * @checkstyle TypeNameCheck (4 lines) */ +@SuppressWarnings("PMD.PackageCase") public class EOintTest { @Test From a262e4be8b3bc9706e2f71f2a2f6fa0e70c331e8 Mon Sep 17 00:00:00 2001 From: levBagryansky <28lev11@gmail.com> Date: Thu, 24 Aug 2023 16:29:45 +0300 Subject: [PATCH 24/41] #2433: Config codacy to exclude path --- .codacy.yml | 3 ++- eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.codacy.yml b/.codacy.yml index 2ba6522b10..cb609af46c 100644 --- a/.codacy.yml +++ b/.codacy.yml @@ -2,4 +2,5 @@ # are not available for the project. For example a lot of # package name contains capital letter and such names are conventional. exclude_paths: - - "eo-runtime/src/main/java/EOorg/EOeolang/EOrust.java" \ No newline at end of file + - "eo-runtime/src/main/java/EOorg/EOeolang/EOrust.java" + - "eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java" \ No newline at end of file diff --git a/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java b/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java index ed02504b4d..14a2042419 100644 --- a/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java +++ b/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java @@ -39,7 +39,6 @@ * @since 0.1 * @checkstyle TypeNameCheck (4 lines) */ -@SuppressWarnings("PMD.PackageCase") public class EOintTest { @Test From 6ed99b43b708663641e9655d729eb28141693daf Mon Sep 17 00:00:00 2001 From: levBagryansky <28lev11@gmail.com> Date: Thu, 24 Aug 2023 16:52:17 +0300 Subject: [PATCH 25/41] #2433: Spurious network --- .../test/java/EOorg/EOeolang/EOintTest.java | 62 ------------------- 1 file changed, 62 deletions(-) diff --git a/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java b/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java index 14a2042419..e69de29bb2 100644 --- a/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java +++ b/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java @@ -1,62 +0,0 @@ -/* - * The MIT License (MIT) - * - * Copyright (c) 2016-2023 Objectionary.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/* - * @checkstyle PackageNameCheck (10 lines) - */ -package EOorg.EOeolang; - -import org.eolang.Data; -import org.eolang.Phi; -import org.hamcrest.MatcherAssert; -import org.hamcrest.Matchers; -import org.junit.jupiter.api.Test; - -/** - * Test case for {@link EOint}. - * - * @since 0.1 - * @checkstyle TypeNameCheck (4 lines) - */ -public class EOintTest { - - @Test - void hasEqualHashes() { - final Phi left = new Data.ToPhi(42L); - final Phi right = new Data.ToPhi(42L); - MatcherAssert.assertThat( - left.hashCode(), - Matchers.equalTo(right.hashCode()) - ); - } - - @Test - void hasHashEvenWithoutData() { - final Phi phi = new EOint(Phi.Φ); - MatcherAssert.assertThat( - phi.hashCode(), - Matchers.greaterThan(0) - ); - } -} From 23982bb3ee34b76dc5d79e3e6cafe1858d37abaf Mon Sep 17 00:00:00 2001 From: levBagryansky <28lev11@gmail.com> Date: Thu, 24 Aug 2023 16:52:26 +0300 Subject: [PATCH 26/41] #2433: Spurious network --- .../test/java/EOorg/EOeolang/EOintTest.java | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java b/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java index e69de29bb2..14a2042419 100644 --- a/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java +++ b/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java @@ -0,0 +1,62 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) 2016-2023 Objectionary.com + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +/* + * @checkstyle PackageNameCheck (10 lines) + */ +package EOorg.EOeolang; + +import org.eolang.Data; +import org.eolang.Phi; +import org.hamcrest.MatcherAssert; +import org.hamcrest.Matchers; +import org.junit.jupiter.api.Test; + +/** + * Test case for {@link EOint}. + * + * @since 0.1 + * @checkstyle TypeNameCheck (4 lines) + */ +public class EOintTest { + + @Test + void hasEqualHashes() { + final Phi left = new Data.ToPhi(42L); + final Phi right = new Data.ToPhi(42L); + MatcherAssert.assertThat( + left.hashCode(), + Matchers.equalTo(right.hashCode()) + ); + } + + @Test + void hasHashEvenWithoutData() { + final Phi phi = new EOint(Phi.Φ); + MatcherAssert.assertThat( + phi.hashCode(), + Matchers.greaterThan(0) + ); + } +} From e35a78e60da1266a8597ac7d3da8c376b1b192ea Mon Sep 17 00:00:00 2001 From: levBagryansky <28lev11@gmail.com> Date: Thu, 24 Aug 2023 17:51:57 +0300 Subject: [PATCH 27/41] #2433: Spurious network --- .../test/java/EOorg/EOeolang/EOintTest.java | 62 ------------------- 1 file changed, 62 deletions(-) diff --git a/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java b/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java index 14a2042419..e69de29bb2 100644 --- a/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java +++ b/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java @@ -1,62 +0,0 @@ -/* - * The MIT License (MIT) - * - * Copyright (c) 2016-2023 Objectionary.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/* - * @checkstyle PackageNameCheck (10 lines) - */ -package EOorg.EOeolang; - -import org.eolang.Data; -import org.eolang.Phi; -import org.hamcrest.MatcherAssert; -import org.hamcrest.Matchers; -import org.junit.jupiter.api.Test; - -/** - * Test case for {@link EOint}. - * - * @since 0.1 - * @checkstyle TypeNameCheck (4 lines) - */ -public class EOintTest { - - @Test - void hasEqualHashes() { - final Phi left = new Data.ToPhi(42L); - final Phi right = new Data.ToPhi(42L); - MatcherAssert.assertThat( - left.hashCode(), - Matchers.equalTo(right.hashCode()) - ); - } - - @Test - void hasHashEvenWithoutData() { - final Phi phi = new EOint(Phi.Φ); - MatcherAssert.assertThat( - phi.hashCode(), - Matchers.greaterThan(0) - ); - } -} From 97358f644b53729c95d47e554f8cb9fd3ff67356 Mon Sep 17 00:00:00 2001 From: levBagryansky <28lev11@gmail.com> Date: Thu, 24 Aug 2023 17:52:12 +0300 Subject: [PATCH 28/41] #2433: Spurious network --- .../test/java/EOorg/EOeolang/EOintTest.java | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java b/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java index e69de29bb2..14a2042419 100644 --- a/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java +++ b/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java @@ -0,0 +1,62 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) 2016-2023 Objectionary.com + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +/* + * @checkstyle PackageNameCheck (10 lines) + */ +package EOorg.EOeolang; + +import org.eolang.Data; +import org.eolang.Phi; +import org.hamcrest.MatcherAssert; +import org.hamcrest.Matchers; +import org.junit.jupiter.api.Test; + +/** + * Test case for {@link EOint}. + * + * @since 0.1 + * @checkstyle TypeNameCheck (4 lines) + */ +public class EOintTest { + + @Test + void hasEqualHashes() { + final Phi left = new Data.ToPhi(42L); + final Phi right = new Data.ToPhi(42L); + MatcherAssert.assertThat( + left.hashCode(), + Matchers.equalTo(right.hashCode()) + ); + } + + @Test + void hasHashEvenWithoutData() { + final Phi phi = new EOint(Phi.Φ); + MatcherAssert.assertThat( + phi.hashCode(), + Matchers.greaterThan(0) + ); + } +} From 4196236f047b4dd029744619904c0cefe753b4e3 Mon Sep 17 00:00:00 2001 From: levBagryansky <28lev11@gmail.com> Date: Thu, 24 Aug 2023 18:09:37 +0300 Subject: [PATCH 29/41] #2433: Spurious network --- .../test/java/EOorg/EOeolang/EOintTest.java | 62 ------------------- 1 file changed, 62 deletions(-) diff --git a/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java b/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java index 14a2042419..e69de29bb2 100644 --- a/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java +++ b/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java @@ -1,62 +0,0 @@ -/* - * The MIT License (MIT) - * - * Copyright (c) 2016-2023 Objectionary.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/* - * @checkstyle PackageNameCheck (10 lines) - */ -package EOorg.EOeolang; - -import org.eolang.Data; -import org.eolang.Phi; -import org.hamcrest.MatcherAssert; -import org.hamcrest.Matchers; -import org.junit.jupiter.api.Test; - -/** - * Test case for {@link EOint}. - * - * @since 0.1 - * @checkstyle TypeNameCheck (4 lines) - */ -public class EOintTest { - - @Test - void hasEqualHashes() { - final Phi left = new Data.ToPhi(42L); - final Phi right = new Data.ToPhi(42L); - MatcherAssert.assertThat( - left.hashCode(), - Matchers.equalTo(right.hashCode()) - ); - } - - @Test - void hasHashEvenWithoutData() { - final Phi phi = new EOint(Phi.Φ); - MatcherAssert.assertThat( - phi.hashCode(), - Matchers.greaterThan(0) - ); - } -} From 324c9c998c74e4ae4257f56e446cceb780fa5aae Mon Sep 17 00:00:00 2001 From: levBagryansky <28lev11@gmail.com> Date: Thu, 24 Aug 2023 18:09:52 +0300 Subject: [PATCH 30/41] #2433: Spurious network --- .../test/java/EOorg/EOeolang/EOintTest.java | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java b/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java index e69de29bb2..14a2042419 100644 --- a/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java +++ b/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java @@ -0,0 +1,62 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) 2016-2023 Objectionary.com + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +/* + * @checkstyle PackageNameCheck (10 lines) + */ +package EOorg.EOeolang; + +import org.eolang.Data; +import org.eolang.Phi; +import org.hamcrest.MatcherAssert; +import org.hamcrest.Matchers; +import org.junit.jupiter.api.Test; + +/** + * Test case for {@link EOint}. + * + * @since 0.1 + * @checkstyle TypeNameCheck (4 lines) + */ +public class EOintTest { + + @Test + void hasEqualHashes() { + final Phi left = new Data.ToPhi(42L); + final Phi right = new Data.ToPhi(42L); + MatcherAssert.assertThat( + left.hashCode(), + Matchers.equalTo(right.hashCode()) + ); + } + + @Test + void hasHashEvenWithoutData() { + final Phi phi = new EOint(Phi.Φ); + MatcherAssert.assertThat( + phi.hashCode(), + Matchers.greaterThan(0) + ); + } +} From 6ddb75ed8283be6ca73d8f1e28cea0835d46900c Mon Sep 17 00:00:00 2001 From: levBagryansky <28lev11@gmail.com> Date: Thu, 24 Aug 2023 18:28:14 +0300 Subject: [PATCH 31/41] #2433: Spurious network --- .../test/java/EOorg/EOeolang/EOintTest.java | 62 ------------------- 1 file changed, 62 deletions(-) diff --git a/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java b/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java index 14a2042419..e69de29bb2 100644 --- a/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java +++ b/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java @@ -1,62 +0,0 @@ -/* - * The MIT License (MIT) - * - * Copyright (c) 2016-2023 Objectionary.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/* - * @checkstyle PackageNameCheck (10 lines) - */ -package EOorg.EOeolang; - -import org.eolang.Data; -import org.eolang.Phi; -import org.hamcrest.MatcherAssert; -import org.hamcrest.Matchers; -import org.junit.jupiter.api.Test; - -/** - * Test case for {@link EOint}. - * - * @since 0.1 - * @checkstyle TypeNameCheck (4 lines) - */ -public class EOintTest { - - @Test - void hasEqualHashes() { - final Phi left = new Data.ToPhi(42L); - final Phi right = new Data.ToPhi(42L); - MatcherAssert.assertThat( - left.hashCode(), - Matchers.equalTo(right.hashCode()) - ); - } - - @Test - void hasHashEvenWithoutData() { - final Phi phi = new EOint(Phi.Φ); - MatcherAssert.assertThat( - phi.hashCode(), - Matchers.greaterThan(0) - ); - } -} From 0f126de940a67c8eb98e46e6e7b54d6b5f0e3eef Mon Sep 17 00:00:00 2001 From: levBagryansky <28lev11@gmail.com> Date: Thu, 24 Aug 2023 18:28:29 +0300 Subject: [PATCH 32/41] #2433: Spurious network --- .../test/java/EOorg/EOeolang/EOintTest.java | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java b/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java index e69de29bb2..14a2042419 100644 --- a/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java +++ b/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java @@ -0,0 +1,62 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) 2016-2023 Objectionary.com + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +/* + * @checkstyle PackageNameCheck (10 lines) + */ +package EOorg.EOeolang; + +import org.eolang.Data; +import org.eolang.Phi; +import org.hamcrest.MatcherAssert; +import org.hamcrest.Matchers; +import org.junit.jupiter.api.Test; + +/** + * Test case for {@link EOint}. + * + * @since 0.1 + * @checkstyle TypeNameCheck (4 lines) + */ +public class EOintTest { + + @Test + void hasEqualHashes() { + final Phi left = new Data.ToPhi(42L); + final Phi right = new Data.ToPhi(42L); + MatcherAssert.assertThat( + left.hashCode(), + Matchers.equalTo(right.hashCode()) + ); + } + + @Test + void hasHashEvenWithoutData() { + final Phi phi = new EOint(Phi.Φ); + MatcherAssert.assertThat( + phi.hashCode(), + Matchers.greaterThan(0) + ); + } +} From b545a9dd062811ddee4a81102878b1fa0c4c2a44 Mon Sep 17 00:00:00 2001 From: levBagryansky <28lev11@gmail.com> Date: Thu, 24 Aug 2023 18:48:26 +0300 Subject: [PATCH 33/41] #2433: Spurious network --- .../test/java/EOorg/EOeolang/EOintTest.java | 62 ------------------- 1 file changed, 62 deletions(-) diff --git a/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java b/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java index 14a2042419..e69de29bb2 100644 --- a/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java +++ b/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java @@ -1,62 +0,0 @@ -/* - * The MIT License (MIT) - * - * Copyright (c) 2016-2023 Objectionary.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/* - * @checkstyle PackageNameCheck (10 lines) - */ -package EOorg.EOeolang; - -import org.eolang.Data; -import org.eolang.Phi; -import org.hamcrest.MatcherAssert; -import org.hamcrest.Matchers; -import org.junit.jupiter.api.Test; - -/** - * Test case for {@link EOint}. - * - * @since 0.1 - * @checkstyle TypeNameCheck (4 lines) - */ -public class EOintTest { - - @Test - void hasEqualHashes() { - final Phi left = new Data.ToPhi(42L); - final Phi right = new Data.ToPhi(42L); - MatcherAssert.assertThat( - left.hashCode(), - Matchers.equalTo(right.hashCode()) - ); - } - - @Test - void hasHashEvenWithoutData() { - final Phi phi = new EOint(Phi.Φ); - MatcherAssert.assertThat( - phi.hashCode(), - Matchers.greaterThan(0) - ); - } -} From e6dc154d80225e0b0b51490f28d3a03404ef46ba Mon Sep 17 00:00:00 2001 From: levBagryansky <28lev11@gmail.com> Date: Thu, 24 Aug 2023 18:48:37 +0300 Subject: [PATCH 34/41] #2433: Spurious network --- .../test/java/EOorg/EOeolang/EOintTest.java | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java b/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java index e69de29bb2..14a2042419 100644 --- a/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java +++ b/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java @@ -0,0 +1,62 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) 2016-2023 Objectionary.com + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +/* + * @checkstyle PackageNameCheck (10 lines) + */ +package EOorg.EOeolang; + +import org.eolang.Data; +import org.eolang.Phi; +import org.hamcrest.MatcherAssert; +import org.hamcrest.Matchers; +import org.junit.jupiter.api.Test; + +/** + * Test case for {@link EOint}. + * + * @since 0.1 + * @checkstyle TypeNameCheck (4 lines) + */ +public class EOintTest { + + @Test + void hasEqualHashes() { + final Phi left = new Data.ToPhi(42L); + final Phi right = new Data.ToPhi(42L); + MatcherAssert.assertThat( + left.hashCode(), + Matchers.equalTo(right.hashCode()) + ); + } + + @Test + void hasHashEvenWithoutData() { + final Phi phi = new EOint(Phi.Φ); + MatcherAssert.assertThat( + phi.hashCode(), + Matchers.greaterThan(0) + ); + } +} From 47ec5dbbe3993d55ff1ea95f7cf816ef1c57be17 Mon Sep 17 00:00:00 2001 From: levBagryansky <28lev11@gmail.com> Date: Fri, 25 Aug 2023 11:42:59 +0300 Subject: [PATCH 35/41] #2433: Spurious network --- .../test/java/EOorg/EOeolang/EOintTest.java | 62 ------------------- 1 file changed, 62 deletions(-) diff --git a/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java b/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java index 14a2042419..e69de29bb2 100644 --- a/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java +++ b/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java @@ -1,62 +0,0 @@ -/* - * The MIT License (MIT) - * - * Copyright (c) 2016-2023 Objectionary.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/* - * @checkstyle PackageNameCheck (10 lines) - */ -package EOorg.EOeolang; - -import org.eolang.Data; -import org.eolang.Phi; -import org.hamcrest.MatcherAssert; -import org.hamcrest.Matchers; -import org.junit.jupiter.api.Test; - -/** - * Test case for {@link EOint}. - * - * @since 0.1 - * @checkstyle TypeNameCheck (4 lines) - */ -public class EOintTest { - - @Test - void hasEqualHashes() { - final Phi left = new Data.ToPhi(42L); - final Phi right = new Data.ToPhi(42L); - MatcherAssert.assertThat( - left.hashCode(), - Matchers.equalTo(right.hashCode()) - ); - } - - @Test - void hasHashEvenWithoutData() { - final Phi phi = new EOint(Phi.Φ); - MatcherAssert.assertThat( - phi.hashCode(), - Matchers.greaterThan(0) - ); - } -} From 48ecdfc7adf6a2d1e639e868e5b6974f46b9f8e2 Mon Sep 17 00:00:00 2001 From: levBagryansky <28lev11@gmail.com> Date: Fri, 25 Aug 2023 11:43:40 +0300 Subject: [PATCH 36/41] #2433: Spurious network --- .../test/java/EOorg/EOeolang/EOintTest.java | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java b/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java index e69de29bb2..14a2042419 100644 --- a/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java +++ b/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java @@ -0,0 +1,62 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) 2016-2023 Objectionary.com + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +/* + * @checkstyle PackageNameCheck (10 lines) + */ +package EOorg.EOeolang; + +import org.eolang.Data; +import org.eolang.Phi; +import org.hamcrest.MatcherAssert; +import org.hamcrest.Matchers; +import org.junit.jupiter.api.Test; + +/** + * Test case for {@link EOint}. + * + * @since 0.1 + * @checkstyle TypeNameCheck (4 lines) + */ +public class EOintTest { + + @Test + void hasEqualHashes() { + final Phi left = new Data.ToPhi(42L); + final Phi right = new Data.ToPhi(42L); + MatcherAssert.assertThat( + left.hashCode(), + Matchers.equalTo(right.hashCode()) + ); + } + + @Test + void hasHashEvenWithoutData() { + final Phi phi = new EOint(Phi.Φ); + MatcherAssert.assertThat( + phi.hashCode(), + Matchers.greaterThan(0) + ); + } +} From 0faf11edd91356a55246821d61114a4218fc1a34 Mon Sep 17 00:00:00 2001 From: levBagryansky <28lev11@gmail.com> Date: Fri, 25 Aug 2023 15:07:20 +0300 Subject: [PATCH 37/41] #2425: 'Q' or '$' only --- .../src/main/java/org/eolang/Universe.java | 4 +--- eo-runtime/src/test/eo/org/eolang/rust-tests.eo | 16 ++++++++-------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/eo-runtime/src/main/java/org/eolang/Universe.java b/eo-runtime/src/main/java/org/eolang/Universe.java index c33751d396..f5ce22e023 100644 --- a/eo-runtime/src/main/java/org/eolang/Universe.java +++ b/eo-runtime/src/main/java/org/eolang/Universe.java @@ -87,15 +87,13 @@ public int find(final String name) { if ("Q".equals(atts[0])) { accum = Phi.Φ; atts[0] = ""; - } else if ("ρ".equals(atts[0])) { - accum = this.connector; } else if ("$".equals(atts[0])) { accum = this.connector; atts[0] = ""; } else { throw new ExFailure( String.format( - "Universe.find starts with %s, but it should start with Q or ^ or $ only", + "Universe.find starts with %s, but it should start with Q or $ only", atts[0] ) ); diff --git a/eo-runtime/src/test/eo/org/eolang/rust-tests.eo b/eo-runtime/src/test/eo/org/eolang/rust-tests.eo index e59e5cb95a..a4280d6741 100644 --- a/eo-runtime/src/test/eo/org/eolang/rust-tests.eo +++ b/eo-runtime/src/test/eo/org/eolang/rust-tests.eo @@ -109,7 +109,7 @@ use eo_env::eo_enum::EO::{EOInt}; pub fn foo(env: &mut EOEnv) -> EO { - EOInt(env.find("^.a").into()) + EOInt(env.find("$.^.a").into()) } """ * @@ -129,7 +129,7 @@ use eo_env::eo_enum::EO::{EOVertex}; pub fn foo(env: &mut EOEnv) -> EO { - let v = env.find("^.book") as u32; + let v = env.find("$.^.book") as u32; EOVertex(v) } """ @@ -168,8 +168,8 @@ use eo_env::eo_enum::EO; use eo_env::eo_enum::EO::{EOInt}; pub fn foo(env: &mut EOEnv) -> EO { - let v1 = env.find("^.a") as u32; - let v2 = env.find("^.b") as u32; + let v1 = env.find("$.^.a") as u32; + let v2 = env.find("$.^.b") as u32; env.bind(v1 , v2, "EO-att"); return EOInt(v1 as i64); } @@ -190,7 +190,7 @@ use eo_env::eo_enum::EO; use eo_env::eo_enum::EO::{EOInt}; pub fn foo(env: &mut EOEnv) -> EO { - let v = env.find("^.a") as u32; + let v = env.find("$.^.a") as u32; let copy = env.copy(v).unwrap(); EOInt(copy as i64) } @@ -211,7 +211,7 @@ use eo_env::eo_enum::EO; use eo_env::eo_enum::EO::{EOInt}; pub fn foo(env: &mut EOEnv) -> EO { - let v = env.find("^.a") as u32; + let v = env.find("$.^.a") as u32; let _bytes = env.dataize(v).unwrap(); EOInt(v as i64) } @@ -236,8 +236,8 @@ use byteorder::{BigEndian, ReadBytesExt}; pub fn foo(env: &mut EOEnv) -> EO { - let a = env.find("^.a") as u32; - let b = env.find("^.b") as u32; + let a = env.find("$.^.a") as u32; + let b = env.find("$.^.b") as u32; let bytes_a = env.dataize(a).unwrap(); let mut arr_a = unsafe { &*(&bytes_a[0..] as *const _ as *const [u8]) }; From 72b769ffcf60af53a89fd01cfdfdc436d3028b71 Mon Sep 17 00:00:00 2001 From: levBagryansky <28lev11@gmail.com> Date: Fri, 25 Aug 2023 15:35:02 +0300 Subject: [PATCH 38/41] #2433: Added EOintTest.hasDifferentHash() Test. --- eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java b/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java index 14a2042419..3825ee416b 100644 --- a/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java +++ b/eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java @@ -59,4 +59,14 @@ void hasHashEvenWithoutData() { Matchers.greaterThan(0) ); } + + @Test + void hasDifferentHash() { + final Phi raw = new EOint(Phi.Φ); + final Phi initialized = new Data.ToPhi(0L); + MatcherAssert.assertThat( + raw.hashCode(), + Matchers.not(initialized.hashCode()) + ); + } } From 754bb3e15e85f1f6a5930de5679ec4564d35ef80 Mon Sep 17 00:00:00 2001 From: levBagryansky <28lev11@gmail.com> Date: Fri, 25 Aug 2023 15:37:30 +0300 Subject: [PATCH 39/41] #2425: refactored duplicated line. --- eo-runtime/src/main/java/org/eolang/Universe.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/eo-runtime/src/main/java/org/eolang/Universe.java b/eo-runtime/src/main/java/org/eolang/Universe.java index f5ce22e023..7d01794413 100644 --- a/eo-runtime/src/main/java/org/eolang/Universe.java +++ b/eo-runtime/src/main/java/org/eolang/Universe.java @@ -86,10 +86,8 @@ public int find(final String name) { .split("\\."); if ("Q".equals(atts[0])) { accum = Phi.Φ; - atts[0] = ""; } else if ("$".equals(atts[0])) { accum = this.connector; - atts[0] = ""; } else { throw new ExFailure( String.format( @@ -98,6 +96,7 @@ public int find(final String name) { ) ); } + atts[0] = ""; for (final String att: atts) { if (!"".equals(att)) { accum = accum.attr(att).get(); From a4ef27f554f7a3279fba4de1bc0e958ba4c99664 Mon Sep 17 00:00:00 2001 From: levBagryansky <28lev11@gmail.com> Date: Fri, 25 Aug 2023 17:07:02 +0300 Subject: [PATCH 40/41] #2433: Use fully qualified name. --- .../src/main/resources/org/eolang/maven/pre/to-java.xsl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/eo-maven-plugin/src/main/resources/org/eolang/maven/pre/to-java.xsl b/eo-maven-plugin/src/main/resources/org/eolang/maven/pre/to-java.xsl index 9e05ba7e66..5c8d2bf248 100644 --- a/eo-maven-plugin/src/main/resources/org/eolang/maven/pre/to-java.xsl +++ b/eo-maven-plugin/src/main/resources/org/eolang/maven/pre/to-java.xsl @@ -131,8 +131,6 @@ SOFTWARE. import org.eolang.*; - import java.util.concurrent.atomic.AtomicBoolean; - @@ -182,7 +180,7 @@ SOFTWARE. - private final AtomicBoolean initialized = new AtomicBoolean(false); + private final java.util.concurrent.atomic.AtomicBoolean initialized = new java.util.concurrent.atomic.AtomicBoolean(false); From 67b729f43f6a16b5901fb0ec14097c3b325df324 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 27 Aug 2023 11:46:32 +0000 Subject: [PATCH 41/41] fix(deps): update dependency org.yaml:snakeyaml to v2.2 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 96f524d0d1..8fc8c3feba 100644 --- a/pom.xml +++ b/pom.xml @@ -167,7 +167,7 @@ SOFTWARE. org.yaml snakeyaml - 2.1 + 2.2 com.jcabi