diff --git a/eo-maven-plugin/pom.xml b/eo-maven-plugin/pom.xml index 97bac76cfb..a65f55a16c 100644 --- a/eo-maven-plugin/pom.xml +++ b/eo-maven-plugin/pom.xml @@ -42,7 +42,7 @@ SOFTWARE. org.eolang lints - 0.0.26 + 0.0.38 org.glassfish @@ -144,6 +144,11 @@ SOFTWARE. mojo-executor 2.4.1 + + com.google.code.findbugs + jsr305 + + com.google.code.findbugs annotations diff --git a/eo-maven-plugin/src/main/java/org/eolang/maven/LintMojo.java b/eo-maven-plugin/src/main/java/org/eolang/maven/LintMojo.java index 9f5127203c..96c4c73347 100644 --- a/eo-maven-plugin/src/main/java/org/eolang/maven/LintMojo.java +++ b/eo-maven-plugin/src/main/java/org/eolang/maven/LintMojo.java @@ -28,6 +28,7 @@ import com.jcabi.xml.XMLDocument; import java.io.IOException; import java.nio.file.Path; +import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.List; @@ -143,7 +144,7 @@ private int lintOne(final ForeignTojo tojo, final Path target = new Place(name).make(base, AssembleMojo.XMIR); tojo.withLinted( new FpDefault( - src -> this.counted(LintMojo.lint(xmir), counts).toString(), + src -> LintMojo.lint(xmir, counts).toString(), this.cache.toPath().resolve(LintMojo.CACHE), this.plugin.getVersion(), new TojoHash(tojo), @@ -161,8 +162,11 @@ private int lintOne(final ForeignTojo tojo, */ private int lintAll(final ConcurrentHashMap counts) throws IOException { final Map paths = new HashMap<>(); - for (final ForeignTojo tojo : this.scopedTojos().withLinted()) { - paths.put(tojo.identifier(), tojo.linted()); + for (final ForeignTojo tojo : this.scopedTojos().withShaken()) { + paths.put(tojo.identifier(), tojo.shaken()); + } + for (final ForeignTojo tojo : this.compileTojos().withShaken()) { + paths.put(tojo.identifier(), tojo.shaken()); } final Map pkg = new HashMap<>(); for (final Map.Entry ent : paths.entrySet()) { @@ -175,48 +179,55 @@ private int lintAll(final ConcurrentHashMap counts) throws IO pkg.get(defect.program()), new ListOf<>(defect) ); + LintMojo.logOne(defect); } return pkg.size(); } /** - * Log errors of XMIR. - * @param xml XMIR. - * @param counts Counts of errors, warnings, and critical - * @return TRUE if it's good + * Log one defect. + * @param defect The defect to log */ - private XML counted(final XML xml, final ConcurrentHashMap counts) { - for (final XML error : xml.nodes("/program/errors/error")) { - final List line = error.xpath("@line"); - final StringBuilder message = new StringBuilder() - .append(Logger.format("%[file]s", xml.xpath("/program/@source").get(0))); - if (!line.isEmpty()) { - message.append(':').append(Integer.parseInt(line.get(0))); - } - message.append(' ') - .append(error.xpath("text()").get(0)) - .append(" (") - .append(error.xpath("@check").get(0)) - .append(' ') - .append(error.xpath("@severity").get(0)) - .append(')'); - final Severity severity = Severity.parsed(error.xpath("@severity").get(0)); - counts.compute(severity, (sev, before) -> before + 1); - switch (severity) { - case WARNING: - Logger.warn(this, message.toString()); - break; - case ERROR: - case CRITICAL: - Logger.error(this, message.toString()); - break; - default: - throw new IllegalArgumentException( - String.format("Not yet supported severity: %s", severity) - ); - } + private static void logOne(final Defect defect) { + final StringBuilder message = new StringBuilder() + .append(defect.program()) + .append(':').append(defect.line()) + .append(' ') + .append(defect.text()) + .append(" (") + .append(defect.rule()) + .append(')'); + switch (defect.severity()) { + case WARNING: + Logger.warn(LintMojo.class, message.toString()); + break; + case ERROR: + case CRITICAL: + Logger.error(LintMojo.class, message.toString()); + break; + default: + throw new IllegalArgumentException( + String.format( + "Not yet supported severity: %s", + defect.severity() + ) + ); } - return xml; + } + + /** + * Text in plural or singular form. + * @param count Counts of errors, warnings, and critical + * @param name Name of them + * @return Summary text + */ + private static String plural(final int count, final String name) { + final StringBuilder txt = new StringBuilder(); + txt.append(count).append(' ').append(name); + if (count > 1) { + txt.append('s'); + } + return txt.toString(); } /** @@ -225,53 +236,53 @@ private XML counted(final XML xml, final ConcurrentHashMap co * @return Summary text */ private static String summary(final ConcurrentHashMap counts) { - final StringBuilder sum = new StringBuilder(100); + final List parts = new ArrayList<>(0); final int criticals = counts.get(Severity.CRITICAL); if (criticals > 0) { - sum.append(criticals).append(" critical error"); - if (criticals > 1) { - sum.append('s'); - } + parts.add(LintMojo.plural(criticals, "critical error")); } final int errors = counts.get(Severity.ERROR); if (errors > 0) { - if (sum.length() > 0) { - sum.append(", "); - } - sum.append(errors).append(" error"); - if (errors > 1) { - sum.append('s'); - } + parts.add(LintMojo.plural(errors, "error")); } final int warnings = counts.get(Severity.WARNING); if (warnings > 0) { - if (sum.length() > 0) { - sum.append(", "); - } - sum.append(warnings).append(" warning"); - if (warnings > 1) { - sum.append('s'); - } + parts.add(LintMojo.plural(warnings, "warning")); + } + if (parts.isEmpty()) { + parts.add("no complaints"); } - if (sum.length() == 0) { - sum.append("no complaints"); + final String sum; + if (parts.size() < 3) { + sum = String.join(" and ", parts); + } else { + sum = String.format( + "%s, and %s", + String.join(", ", parts.subList(0, parts.size() - 2)), + parts.get(parts.size() - 1) + ); } - return sum.toString(); + return sum; } /** * Find all possible linting defects and add them to the XMIR. * @param xmir The XML before linting + * @param counts Counts of errors, warnings, and critical * @return XML after linting - * @throws IOException If fails */ - private static XML lint(final XML xmir) throws IOException { + private static XML lint(final XML xmir, + final ConcurrentHashMap counts) { final Directives dirs = new Directives(); final Collection defects = new Program(xmir).defects(); if (!defects.isEmpty()) { dirs.xpath("/program").addIf("errors").strict(1); LintMojo.embed(xmir, defects); } + for (final Defect defect : defects) { + counts.compute(defect.severity(), (sev, before) -> before + 1); + LintMojo.logOne(defect); + } final Node node = xmir.inner(); new Xembler(dirs).applyQuietly(node); return new XMLDocument(node); diff --git a/eo-maven-plugin/src/main/java/org/eolang/maven/SafeMojo.java b/eo-maven-plugin/src/main/java/org/eolang/maven/SafeMojo.java index d62bc9c1ee..d52c5af217 100644 --- a/eo-maven-plugin/src/main/java/org/eolang/maven/SafeMojo.java +++ b/eo-maven-plugin/src/main/java/org/eolang/maven/SafeMojo.java @@ -505,6 +505,18 @@ protected final ForeignTojos scopedTojos() { return this.tojos; } + /** + * Tojos to use, in "compile" scope only. + * @return Tojos to use + * @checkstyle AnonInnerLengthCheck (100 lines) + */ + protected final ForeignTojos compileTojos() { + return new ForeignTojos( + () -> Catalogs.INSTANCE.make(this.foreign.toPath(), this.foreignFormat), + () -> "compile" + ); + } + /** * Make a measured train from another train. * @param train The train diff --git a/eo-maven-plugin/src/main/java/org/eolang/maven/tojos/ForeignTojos.java b/eo-maven-plugin/src/main/java/org/eolang/maven/tojos/ForeignTojos.java index c6fcca0d92..e278f1c0e6 100644 --- a/eo-maven-plugin/src/main/java/org/eolang/maven/tojos/ForeignTojos.java +++ b/eo-maven-plugin/src/main/java/org/eolang/maven/tojos/ForeignTojos.java @@ -149,14 +149,6 @@ public Collection withShaken() { return this.select(row -> row.exists(Attribute.SHAKEN.getKey())); } - /** - * Get the tojos that have corresponding linted XMIR. - * @return The tojos. - */ - public Collection withLinted() { - return this.select(row -> row.exists(Attribute.LINTED.getKey())); - } - /** * Get the tojos that doesn't have dependency. * @return The tojos. diff --git a/eo-maven-plugin/src/test/java/org/eolang/maven/AssembleMojoTest.java b/eo-maven-plugin/src/test/java/org/eolang/maven/AssembleMojoTest.java index 2e4be6a5b0..f74763b471 100644 --- a/eo-maven-plugin/src/test/java/org/eolang/maven/AssembleMojoTest.java +++ b/eo-maven-plugin/src/test/java/org/eolang/maven/AssembleMojoTest.java @@ -29,8 +29,6 @@ import java.io.IOException; import java.nio.file.Path; import java.util.Map; -import org.eolang.maven.log.CaptureLogs; -import org.eolang.maven.log.Logs; import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; import org.junit.jupiter.api.Test; @@ -120,23 +118,6 @@ void assemblesNotFailWithFailOnError(@Mktmp final Path temp) throws IOException ); } - @CaptureLogs - @Test - void assemblesSuccessfullyInOfflineMode(final Logs out, - @Mktmp final Path temp) throws IOException { - new FakeMaven(temp) - .withHelloWorld() - .with("offline", true) - .execute(AssembleMojo.class); - MatcherAssert.assertThat( - "While execution AssembleMojo log should have contained message about offline mode, but it didn't", - String.join("\n", out.captured()), - Matchers.containsString( - "No programs were pulled because eo.offline flag is set to TRUE" - ) - ); - } - @Test void configuresChildParameters(@Mktmp final Path temp) throws IOException { final Map res = new FakeMaven(temp) diff --git a/eo-maven-plugin/src/test/java/org/eolang/maven/FakeMaven.java b/eo-maven-plugin/src/test/java/org/eolang/maven/FakeMaven.java index c4a27b8568..1dc39ed39e 100644 --- a/eo-maven-plugin/src/test/java/org/eolang/maven/FakeMaven.java +++ b/eo-maven-plugin/src/test/java/org/eolang/maven/FakeMaven.java @@ -328,9 +328,13 @@ FakeMaven withPlacedBinary(final Path binary) { FakeMaven withHelloWorld() throws IOException { return this.withProgram( "+alias stdout org.eolang.io.stdout", + "+home https://www.eolang.org", + "+package foo.x", "+unlint object-has-data", "+unlint broken-alias-second", - "+package f\n", + "+unlint incorrect-alias", + "+version 0.0.0", + "", "# No comments.", "[x] > main", " (stdout \"Hello!\" x).print > @" diff --git a/eo-maven-plugin/src/test/java/org/eolang/maven/LintMojoTest.java b/eo-maven-plugin/src/test/java/org/eolang/maven/LintMojoTest.java index c90cc7c3c8..17e9a4b5ea 100644 --- a/eo-maven-plugin/src/test/java/org/eolang/maven/LintMojoTest.java +++ b/eo-maven-plugin/src/test/java/org/eolang/maven/LintMojoTest.java @@ -172,7 +172,7 @@ void detectsWarningWithCorrespondingFlag(@Mktmp final Path temp) throws IOExcept new XMLDocument( maven.result().get("target/6-lint/foo/x/main.xmir") ).nodes("//errors/error[@severity='warning']"), - Matchers.hasSize(Matchers.equalTo(7)) + Matchers.hasSize(Matchers.greaterThanOrEqualTo(2)) ); } diff --git a/eo-maven-plugin/src/test/java/org/eolang/maven/LogFormatTest.java b/eo-maven-plugin/src/test/java/org/eolang/maven/LogFormatTest.java deleted file mode 100644 index 44f6e9cbf1..0000000000 --- a/eo-maven-plugin/src/test/java/org/eolang/maven/LogFormatTest.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * The MIT License (MIT) - * - * Copyright (c) 2016-2025 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. - */ -package org.eolang.maven; - -import com.jcabi.log.Logger; -import org.eolang.maven.log.CaptureLogs; -import org.eolang.maven.log.Logs; -import org.hamcrest.MatcherAssert; -import org.hamcrest.Matchers; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.parallel.Execution; -import org.junit.jupiter.api.parallel.ExecutionMode; - -/** - * Tests of the log4j logger messages format. - * - *

All log messages are written to System.out. System.out is a shared resource among all other - * threads. For this reason, we run tests in this class in the same thread (disabling parallelism). - * This approach prevents log messages from other threads from interfering. Since all the tests in - * this class are relatively fast, it does not significantly impact overall performance. - * We disable parallelism by using the {@link Execution} annotation with - * {@link ExecutionMode#SAME_THREAD}. DO NOT REMOVE THAT ANNOTATION!

- * - * @since 0.28.11 - */ -@Execution(ExecutionMode.SAME_THREAD) -@SuppressWarnings("JTCOP.RuleAllTestsHaveProductionClass") -final class LogFormatTest { - - /** - * Expected log message format. - */ - private static final String FORMAT = - "^\\d{2}:\\d{2}:\\d{2} \\[INFO] org.eolang.maven.LogFormatTest: Wake up, Neo...\\R"; - - @Test - @CaptureLogs - void printsFormattedMessage(final Logs out) { - final String msg = "Wake up, Neo..."; - Logger.info(this, msg); - final String actual = out.waitForMessage(msg); - MatcherAssert.assertThat( - String.format( - "Actual log output is '%s', but expected pattern is: '%s'", - actual, - LogFormatTest.FORMAT - ), - actual, - Matchers.matchesPattern(LogFormatTest.FORMAT) - ); - } - - @Test - void matchesCorrectly() { - MatcherAssert.assertThat( - CatalogsTest.TO_ADD_MESSAGE, - "16:02:08 [INFO] org.eolang.maven.LogFormatTest: Wake up, Neo...\n", - Matchers.matchesPattern(LogFormatTest.FORMAT) - ); - } -} diff --git a/eo-maven-plugin/src/test/java/org/eolang/maven/SafeMojoTest.java b/eo-maven-plugin/src/test/java/org/eolang/maven/SafeMojoTest.java deleted file mode 100644 index 2dc643690c..0000000000 --- a/eo-maven-plugin/src/test/java/org/eolang/maven/SafeMojoTest.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * The MIT License (MIT) - * - * Copyright (c) 2016-2025 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. - */ -package org.eolang.maven; - -import com.yegor256.Mktmp; -import com.yegor256.MktmpResolver; -import java.nio.file.Path; -import org.eolang.maven.log.CaptureLogs; -import org.eolang.maven.log.Logs; -import org.hamcrest.MatcherAssert; -import org.hamcrest.Matchers; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; - -/** - * Test case for {@link SafeMojo}. - * - * @since 0.1 - */ -@ExtendWith(MktmpResolver.class) -final class SafeMojoTest { - - @Test - @CaptureLogs - void logsStackTrace(final Logs out, @Mktmp final Path temp) { - Assertions.assertDoesNotThrow( - () -> new FakeMaven(temp) - .withProgram("something > is definitely wrong here") - .execute(new FakeMaven.Parse()), - CatalogsTest.TO_ADD_MESSAGE - ); - MatcherAssert.assertThat( - CatalogsTest.TO_ADD_MESSAGE, - String.join("\n", out.captured()), - Matchers.containsString("Failed to parse") - ); - } - -} diff --git a/eo-maven-plugin/src/test/java/org/eolang/maven/log/CaptureLogs.java b/eo-maven-plugin/src/test/java/org/eolang/maven/log/CaptureLogs.java deleted file mode 100644 index fb88560d00..0000000000 --- a/eo-maven-plugin/src/test/java/org/eolang/maven/log/CaptureLogs.java +++ /dev/null @@ -1,178 +0,0 @@ -/* - * The MIT License (MIT) - * - * Copyright (c) 2016-2025 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. - */ -package org.eolang.maven.log; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; -import java.util.Enumeration; -import org.apache.log4j.Appender; -import org.apache.log4j.ConsoleAppender; -import org.apache.log4j.LogManager; -import org.apache.log4j.Logger; -import org.apache.log4j.spi.LoggingEvent; -import org.junit.jupiter.api.extension.AfterEachCallback; -import org.junit.jupiter.api.extension.BeforeEachCallback; -import org.junit.jupiter.api.extension.ExtendWith; -import org.junit.jupiter.api.extension.ExtensionContext; -import org.junit.jupiter.api.extension.ParameterContext; -import org.junit.jupiter.api.extension.ParameterResolver; - -/** - * Captured logs annotation for tests. - * @todo #2896:90min Make '@CaptureLogs' thread-safe. - * 'Logs' should contain only messages related to the test. - * Currently, '@CaptureLogs' appends all messages that - * were logged via 'Logger' to 'Logs', so messages from - * other tests (run in parallel) are also included, which causes - * problems when tests are run in parallel. - */ -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.METHOD, ElementType.ANNOTATION_TYPE}) -@ExtendWith(CaptureLogs.CaptureLogsExtension.class) -@SuppressWarnings("JTCOP.RuleAllTestsHaveProductionClass") -public @interface CaptureLogs { - - /** - * JUnit extension to capture log messages. - * - * @since 0.30 - */ - final class CaptureLogsExtension implements - ParameterResolver, BeforeEachCallback, AfterEachCallback { - - /** - * Logs. - */ - private final Logs logs; - - /** - * Appender. - */ - private final CaptureLogsAppender appender; - - /** - * Ctor. - */ - CaptureLogsExtension() { - this(new Logs()); - } - - /** - * Ctor. - * @param logs Where to save logs from the appender. - */ - private CaptureLogsExtension(final Logs logs) { - this(logs, new CaptureLogsAppender(logs)); - } - - /** - * Ctor. - * @param logs Where to save logs from the appender. - * @param appender Appender to use. - */ - private CaptureLogsExtension(final Logs logs, final CaptureLogsAppender appender) { - this.logs = logs; - this.appender = appender; - } - - @Override - public void beforeEach(final ExtensionContext context) { - this.appender.init(); - } - - @Override - public void afterEach(final ExtensionContext context) { - this.appender.destroy(); - } - - @Override - public boolean supportsParameter( - final ParameterContext param, - final ExtensionContext extension - ) { - return param.getParameter().getType() == Logs.class; - } - - @Override - public Object resolveParameter( - final ParameterContext param, - final ExtensionContext extension - ) { - return this.logs; - } - } - - /** - * Log4j logger appender. - * - * @since 0.30 - */ - final class CaptureLogsAppender extends ConsoleAppender { - - /** - * Where to save logs from the appender. - */ - private final Logs logs; - - /** - * Ctor. - * @param logs Where to save logs from the appender. - */ - CaptureLogsAppender(final Logs logs) { - this.logs = logs; - } - - @Override - public void append(final LoggingEvent event) { - this.logs.append(this.getLayout().format(event)); - } - - /** - * Initialize the appender. - * Adds appender to the root logger. - */ - void init() { - final Logger logger = LogManager.getRootLogger(); - final Enumeration appenders = logger.getAllAppenders(); - if (appenders.hasMoreElements()) { - final Object next = appenders.nextElement(); - if (next instanceof ConsoleAppender) { - this.setLayout(((Appender) next).getLayout()); - } - } - logger.addAppender(this); - this.logs.waitForInit(); - } - - /** - * Destroy the appender. - * Removes appender from the root logger. - */ - void destroy() { - LogManager.getRootLogger().removeAppender(this); - } - } -} diff --git a/eo-maven-plugin/src/test/java/org/eolang/maven/log/Logs.java b/eo-maven-plugin/src/test/java/org/eolang/maven/log/Logs.java deleted file mode 100644 index d660589705..0000000000 --- a/eo-maven-plugin/src/test/java/org/eolang/maven/log/Logs.java +++ /dev/null @@ -1,152 +0,0 @@ -/* - * The MIT License (MIT) - * - * Copyright (c) 2016-2025 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. - */ -package org.eolang.maven.log; - -import com.jcabi.log.Logger; -import java.util.Collection; -import java.util.Collections; -import java.util.Optional; -import java.util.concurrent.ConcurrentLinkedQueue; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.Executors; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; - -/** - * Captured logs. - * - * @since 0.30 - */ -@SuppressWarnings({"JTCOP.RuleAllTestsHaveProductionClass", "JTCOP.RuleCorrectTestName"}) -public final class Logs { - - /** - * Captured logs. - */ - private final Collection container; - - /** - * Ctor. - */ - Logs() { - this(new ConcurrentLinkedQueue<>()); - } - - /** - * Ctor. - * @param collection Captured logs. - */ - private Logs(final Collection collection) { - this.container = collection; - } - - /** - * Return all captured logs up to this point. - * @return Captured logs. - */ - public Collection captured() { - return Collections.unmodifiableCollection(this.container); - } - - /** - * Since logging is usually asynchronous, we need to wait for the message to appear in the - * output. Moreover, logging system can take extra time to initialize. - * @param message Expected part of the message - * @return Logged message with formatting - */ - public String waitForMessage(final String message) { - return this.waitForMessage( - message, - () -> { - } - ); - } - - /** - * Waits until the logger is initialized. - * If that method is finished it means that loggers are initialized. - */ - void waitForInit() { - final String msg = "ping"; - this.waitForMessage(msg, () -> Logger.info(this, msg)); - } - - /** - * Append log message. - * @param log Log message. - */ - void append(final String log) { - this.container.add(log); - } - - /** - * Wait for message. - * @param message Message to wait for - * @param action Action to perform before checking the message on each check iteration - * @return Logged message - */ - private String waitForMessage(final String message, final Runnable action) { - try { - return Executors.newSingleThreadExecutor().submit( - () -> { - while (true) { - action.run(); - final Optional full = this.container.stream() - .filter(s -> s.contains(message)) - .findFirst(); - if (full.isPresent()) { - return full.get(); - } - } - } - ).get(10, TimeUnit.SECONDS); - } catch (final InterruptedException exception) { - Thread.currentThread().interrupt(); - throw new IllegalStateException( - String.format( - "Waiting thread was interrupted, can't read '%s' msg", - message - ), - exception - ); - } catch (final ExecutionException exception) { - throw new IllegalStateException( - String.format( - "Some problem happened, can't read '%s' msg", - message - ), - exception - ); - } catch (final TimeoutException exception) { - throw new IllegalStateException( - String.format( - "Timeout limit exceed to read msg %s, current set of captured logs: %s", - message, - this.container - ), - exception - ); - } - } -} diff --git a/eo-maven-plugin/src/test/java/org/eolang/maven/log/package-info.java b/eo-maven-plugin/src/test/java/org/eolang/maven/log/package-info.java deleted file mode 100644 index ca77c3923e..0000000000 --- a/eo-maven-plugin/src/test/java/org/eolang/maven/log/package-info.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * The MIT License (MIT) - * - * Copyright (c) 2016-2025 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. - */ -/** - * The package for log capturing during unit tests. - * Includes JUnit extension and a logger appender. - * - * @since 0.30 - */ -package org.eolang.maven.log; diff --git a/eo-maven-plugin/src/test/java/org/eolang/maven/util/HmOptionalTest.java b/eo-maven-plugin/src/test/java/org/eolang/maven/util/HmOptionalTest.java index ff5b6753be..b33c609d31 100644 --- a/eo-maven-plugin/src/test/java/org/eolang/maven/util/HmOptionalTest.java +++ b/eo-maven-plugin/src/test/java/org/eolang/maven/util/HmOptionalTest.java @@ -32,8 +32,6 @@ import org.cactoos.text.Randomized; import org.cactoos.text.TextOf; import org.cactoos.text.UncheckedText; -import org.eolang.maven.log.CaptureLogs; -import org.eolang.maven.log.Logs; import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; import org.junit.jupiter.api.Assertions; @@ -99,34 +97,6 @@ void savesIfFileExistsAndRewriteTrue(@Mktmp final Path dir) throws IOException { ); } - @Test - @CaptureLogs - void savesIfFileExistsAndRewriteFalse( - @Mktmp final Path dir, - final Logs out) throws IOException { - final String first = new UncheckedText(new Randomized(this.size)).asString(); - final Path file = Paths.get(this.sample); - final HmBase base = new HmBase(dir); - base.save(first, file); - final HmOptional optional = new HmOptional(base, false); - final String second = new UncheckedText(new Randomized(this.size)).asString(); - optional.save(second, file); - final Path absolute = dir.resolve(file); - MatcherAssert.assertThat( - "The first file shouldn't be rewritten.", - new UncheckedText(new TextOf(absolute)).asString(), - Matchers.is(first) - ); - Assertions.assertTrue( - out.captured().stream().anyMatch( - log -> log.contains( - String.format("Rewriting of the %s file was skipped", absolute) - ) - ), - "When user tries to rewrite a file, a log should be shown." - ); - } - @Test void exists(@Mktmp final Path dir) throws IOException { final Path file = Paths.get(this.sample); diff --git a/eo-maven-plugin/src/test/resources/log4j.properties b/eo-maven-plugin/src/test/resources/log4j.properties index e965065312..c8d557433c 100644 --- a/eo-maven-plugin/src/test/resources/log4j.properties +++ b/eo-maven-plugin/src/test/resources/log4j.properties @@ -26,16 +26,5 @@ log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender log4j.appender.CONSOLE.layout=com.jcabi.log.MulticolorLayout log4j.appender.CONSOLE.layout.ConversionPattern=%d{HH:mm:ss} [%p] %c: %m%n -log4j.logger.org.eolang=INFO -log4j.logger.com.yegor256.Jaxec=WARN -log4j.logger.com.yegor256.farea=WARN -log4j.logger.org.eolang.parser.Syntax=WARN -log4j.logger.com.jcabi.log.VerboseProcess=WARN -log4j.logger.org.eolang.parser.EoSyntax=WARN -log4j.logger.org.eolang.parser.Program=WARN -log4j.logger.org.eolang.maven.SodgMojo=WARN -log4j.logger.org.eolang.maven.SodgMojoTest=WARN -log4j.logger.org.eolang.maven.TargetSpy=WARN -log4j.logger.org.eolang.parser.Scenario=WARN -log4j.logger.org.eolang.maven.Save=WARN -log4j.logger.com.yegor256.xsline.Xsline=WARN +log4j.logger.com.yegor256.farea=OFF +log4j.logger.org.eolang=OFF diff --git a/eo-maven-plugin/src/test/resources/org/eolang/maven/mess.eo b/eo-maven-plugin/src/test/resources/org/eolang/maven/mess.eo index 98709be939..70cb8a621b 100644 --- a/eo-maven-plugin/src/test/resources/org/eolang/maven/mess.eo +++ b/eo-maven-plugin/src/test/resources/org/eolang/maven/mess.eo @@ -27,7 +27,10 @@ +tests +package org.eolang.examples +version 0.0.0 ++unlint atom-is-not-unique +unlint broken-ref ++unlint incorrect-alias ++unlint object-is-not-unique +unlint broken-alias-second +unlint object-has-data diff --git a/eo-parser/src/test/resources/log4j.properties b/eo-parser/src/test/resources/log4j.properties index 93ee7ca82c..cb14ff4e20 100644 --- a/eo-parser/src/test/resources/log4j.properties +++ b/eo-parser/src/test/resources/log4j.properties @@ -26,9 +26,5 @@ log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender log4j.appender.CONSOLE.layout=com.jcabi.log.MulticolorLayout log4j.appender.CONSOLE.layout.ConversionPattern=%d{HH:mm:ss} [%color{%p}] %c: %m%n -log4j.logger.com.jcabi.log=WARN -log4j.logger.com.yegor256.xsline=WARN -log4j.logger.com.yegor256.xsline.StSchema=DEBUG -log4j.logger.org.eolang=WARN -log4j.logger.org.eolang.parser.XmirTest=WARN -log4j.logger.org.eolang.parser.CheckPack=INFO +log4j.logger.com.jcabi.xml=OFF +log4j.logger.org.eolang=OFF diff --git a/eo-runtime/pom.xml b/eo-runtime/pom.xml index 0257177f48..4357dfdebd 100644 --- a/eo-runtime/pom.xml +++ b/eo-runtime/pom.xml @@ -235,6 +235,7 @@ SOFTWARE. register compile + lint transpile xmir-to-phi phi-to-xmir diff --git a/eo-runtime/src/main/eo/org/eolang/net/socket.eo b/eo-runtime/src/main/eo/org/eolang/net/socket.eo index e747c8084b..66b7244920 100644 --- a/eo-runtime/src/main/eo/org/eolang/net/socket.eo +++ b/eo-runtime/src/main/eo/org/eolang/net/socket.eo @@ -189,10 +189,10 @@ [sockfd] > scoped-socket # Makes an `input` from `socket`. # The object allows to use `socket` as input stream and `read` from it sequentially. - as-input recv > as-input + ^.^.as-input recv > as-input # Makes an `output` from posix socket. # The object allows to use `socket` as output stream and `write` to it sequentially. - as-output send > as-output + ^.^.as-output send > as-output # Send bytes through the socket. # Here `buffer` must be an object that can be dataized. @@ -382,10 +382,10 @@ [sockfd] > scoped-socket # Makes an `input` from win32 `socket`. # The object allows to use `socket` as input stream and `read` from it sequentially. - as-input recv > as-input + ^.^.as-input recv > as-input # Makes an `output` from win32 socket. # The object allows to use `socket` as output stream and `write` to it sequentially. - as-output send > as-output + ^.^.as-output send > as-output # Send bytes through the socket. # Here `buffer` must be an object that can be dataized. diff --git a/eo-runtime/src/test/eo/org/eolang/bool-tests.eo b/eo-runtime/src/test/eo/org/eolang/bool-tests.eo index 1cc75df894..cb09ebbece 100644 --- a/eo-runtime/src/test/eo/org/eolang/bool-tests.eo +++ b/eo-runtime/src/test/eo/org/eolang/bool-tests.eo @@ -28,55 +28,55 @@ +unlint object-has-data # This unit test is supposed to check the functionality of the corresponding object. -[] > compares-two-bools +[] > tests-compares-two-bools eq. > @ true true # This unit test is supposed to check the functionality of the corresponding object. -[] > true-as-bool +[] > tests-true-as-bool true.as-bool > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > compares-two-different-types +[] > tests-compares-two-different-bool-types not. > @ eq. true 42 # This unit test is supposed to check the functionality of the corresponding object. -[] > compares-bool-to-bytes +[] > tests-compares-bool-to-bytes and. > @ true.eq 01- false.eq 00- # This unit test is supposed to check the functionality of the corresponding object. -[] > compares-bool-to-string +[] > tests-compares-bool-to-string and. > @ true.eq "\001" false.eq "\000" # This unit test is supposed to check the functionality of the corresponding object. -[] > compares-bool-to-bytes-reverse +[] > tests-compares-bool-to-bytes-reverse and. > @ 01-.as-bytes.eq true 00-.as-bytes.eq false # This unit test is supposed to check the functionality of the corresponding object. -[] > true-not-is-false +[] > tests-true-not-is-false eq. > @ true.not false # This unit test is supposed to check the functionality of the corresponding object. -[] > true-and-false-is-false +[] > tests-true-and-false-is-false not. > @ and. true false # This unit test is supposed to check the functionality of the corresponding object. -[] > forks-on-true-condition +[] > tests-forks-on-true-condition eq. > @ if. 5.eq 5 @@ -85,7 +85,7 @@ 123 # This unit test is supposed to check the functionality of the corresponding object. -[] > forks-on-false-condition +[] > tests-forks-on-false-condition eq. > @ if. 5.eq 8 diff --git a/eo-runtime/src/test/eo/org/eolang/bytes-tests.eo b/eo-runtime/src/test/eo/org/eolang/bytes-tests.eo index d80f7c041f..e117979ef5 100644 --- a/eo-runtime/src/test/eo/org/eolang/bytes-tests.eo +++ b/eo-runtime/src/test/eo/org/eolang/bytes-tests.eo @@ -28,7 +28,7 @@ +unlint object-has-data # This unit test is supposed to check the functionality of the corresponding object. -[] > takes-part-of-bytes +[] > tests-takes-part-of-bytes eq. > @ slice. 20-1F-EE-B5-90 @@ -37,7 +37,7 @@ 1F-EE-B5 # This unit test is supposed to check the functionality of the corresponding object. -[] > size-of-part-is-correct +[] > tests-size-of-part-is-correct eq. > @ size. slice. @@ -47,42 +47,41 @@ 3 # This unit test is supposed to check the functionality of the corresponding object. -[] > counts-size-of-bytes +[] > tests-counts-size-of-bytes eq. > @ size. F1-20-5F-EC-B5-90-32 7 # This unit test is supposed to check the functionality of the corresponding object. -[] > turns-bytes-into-a-string +[] > tests-turns-bytes-into-a-string eq. > @ string E4-BD-A0-E5-A5-BD-2C-20-D0-B4-D1-80-D1-83-D0-B3-21 "你好, друг!" # This unit test is supposed to check the functionality of the corresponding object. -[] > left-zero +[] > tests-left-zero not. > @ eq. 0.as-bytes.left 1 -1.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > left-with-zero +[] > tests-left-with-zero not. > @ eq. 2.as-bytes.left 0 -3.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > left-with-odd-neg - not. > @ - eq. - -17.as-bytes.left 1 - 33.as-bytes +not. > tests-left-with-odd-neg + eq. + -17.as-bytes.left 1 + 33.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > left-with-minus-one +[] > tests-left-with-minus-one eq. > @ eq. -1.as-bytes.left 3 @@ -91,55 +90,55 @@ # This unit test is supposed to check the functionality of the corresponding object. # (-18.left 2).eq 71.not -[] > left-with-even-neg +[] > tests-left-with-even-neg eq. > @ FF-FF-FF-FF-FF-FF-FF-EE.left 2 00-00-00-00-00-00-00-47.not # This unit test is supposed to check the functionality of the corresponding object. -[] > left-with-even-plus +[] > tests-left-with-even-plus not. > @ eq. 4.as-bytes.left 3 -33.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > left-with-odd-plus +[] > tests-left-with-odd-plus not. > @ eq. 5.as-bytes.left 3 -41.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > right-with-zero +[] > tests-right-with-zero not. > @ eq. 0.as-bytes.right 2 -1.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > right-with-odd-neg +[] > tests-right-with-odd-neg not. > @ eq. -37.as-bytes.right 3 4.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > right-with-minus-one +[] > tests-right-with-minus-one not. > @ eq. -1.as-bytes.right 4 0.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > right-with-even-neg +[] > tests-right-with-even-neg not. > @ eq. -38.as-bytes.right 1 18.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > right-with-even-plus +[] > tests-right-with-even-plus eq. > @ eq. 36.as-bytes.right 2 @@ -147,14 +146,14 @@ false # This unit test is supposed to check the functionality of the corresponding object. -[] > right-with-odd-plus +[] > tests-right-with-odd-plus not. > @ eq. 37.as-bytes.right 3 -5.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > and-with-zero +[] > tests-and-with-zero not. > @ eq. and. @@ -163,14 +162,14 @@ -1.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > and-with-two-neg +[] > tests-and-with-two-neg not. > @ eq. -6.as-bytes.and -4.as-bytes 7.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > and-with-two-plus +[] > tests-and-with-two-plus not. > @ eq. and. @@ -179,91 +178,91 @@ -1.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > and-with-one-neg-one-plus +[] > tests-and-with-one-neg-one-plus not. > @ eq. -7.as-bytes.and 7.as-bytes -2.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > or-with-zero +[] > tests-or-with-zero not. > @ eq. -11.as-bytes.or 0.as-bytes 10.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > or-with-two-neg +[] > tests-or-with-two-neg not. > @ eq. -27.as-bytes.or -13.as-bytes 8.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > or-with-two-plus +[] > tests-or-with-two-plus not. > @ eq. 5.as-bytes.or 14.as-bytes -16.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > or-with-one-neg-one-plus +[] > tests-or-with-one-neg-one-plus not. > @ eq. -7.as-bytes.or 23.as-bytes 0.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > xor-with-zero +[] > tests-xor-with-zero not. > @ eq. 0.as-bytes.xor 29.as-bytes -30.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > xor-with-two-neg +[] > tests-xor-with-two-neg not. > @ eq. -1.as-bytes.xor -123.as-bytes -123.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > xor-with-two-plus +[] > tests-xor-with-two-plus not. > @ eq. 53.as-bytes.xor 24.as-bytes -46.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > xor-with-one-neg-one-plus +[] > tests-xor-with-one-neg-one-plus not. > @ eq. -36.as-bytes.xor 43.as-bytes 8.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > not-with-zero +[] > tests-not-with-zero not. > @ eq. 0.as-bytes 0.as-bytes.not # This unit test is supposed to check the functionality of the corresponding object. -[] > not-with-neg +[] > tests-not-with-neg not. > @ eq. -1.as-bytes -1.as-bytes.not # This unit test is supposed to check the functionality of the corresponding object. -[] > not-with-plus +[] > tests-not-with-plus not. > @ eq. 53.as-bytes 53.as-bytes.not # This unit test is supposed to check the functionality of the corresponding object. -[] > conjunction-of-bytes +[] > tests-conjunction-of-bytes 02-EF-D4-05-5E-78-3A > a 12-33-C1-B5-5E-71-55 > b eq. > @ @@ -271,7 +270,7 @@ 02-23-C0-05-5E-70-10 # This unit test is supposed to check the functionality of the corresponding object. -[] > written-in-several-lines +[] > tests-written-in-several-lines eq. > @ size. CA-FE- @@ -279,7 +278,7 @@ 4 # This unit test is supposed to check the functionality of the corresponding object. -[] > bitwise-works +[] > tests-bitwise-works eq. > @ as-number. and. @@ -288,7 +287,7 @@ 1 # This unit test is supposed to check the functionality of the corresponding object. -[] > convertible-to-bool +[] > tests-convertible-to-bool not. > @ eq. 01-.as-bool @@ -296,7 +295,7 @@ # This unit test is supposed to check the functionality of the corresponding object. # (-127.or 127).eq -1 -[] > bitwise-works-negative +[] > tests-bitwise-works-negative eq. > @ as-number. or. @@ -305,7 +304,7 @@ FF-FF-FF-FF-FF-FF-FF-FF # This unit test is supposed to check the functionality of the corresponding object. -[] > concatenation-of-bytes +[] > tests-concatenation-of-bytes 02-EF-D4-05-5E-78-3A > a 12-33-C1-B5-5E-71-55 > b eq. > @ @@ -313,7 +312,7 @@ 02-EF-D4-05-5E-78-3A-12-33-C1-B5-5E-71-55 # This unit test is supposed to check the functionality of the corresponding object. -[] > concat-bools-as-bytes +[] > tests-concat-bools-as-bytes true.as-bytes > b1 false.as-bytes > b2 eq. > @ @@ -323,7 +322,7 @@ 01-00 # This unit test is supposed to check the functionality of the corresponding object. -[] > concat-with-empty +[] > tests-concat-with-empty eq. > @ concat. 05-5E-78 @@ -331,7 +330,7 @@ 05-5E-78 # This unit test is supposed to check the functionality of the corresponding object. -[] > concat-empty-with +[] > tests-concat-empty-with eq. > @ concat. -- @@ -339,7 +338,7 @@ 05-5E-78 # This unit test is supposed to check the functionality of the corresponding object. -[] > concat-empty +[] > tests-concat-empty eq. > @ concat. -- @@ -347,7 +346,7 @@ -- # This unit test is supposed to check the functionality of the corresponding object. -[] > concat-strings +[] > tests-concat-strings concat. > s-bytes "hello ".as-bytes "world".as-bytes @@ -357,68 +356,68 @@ # This unit test is supposed to check the functionality of the corresponding object. # (2397719729.xor 4294967295).eq 1897247566 -[] > xor-works +[] > tests-xor-works eq. > @ 00-00-00-00-8E-EA-4C-B1.xor 00-00-00-00-FF-FF-FF-FF 00-00-00-00-71-15-B3-4E # This unit test is supposed to check the functionality of the corresponding object. -[] > one-xor-one-as-number +[] > tests-one-xor-one-as-number eq. > @ (1.as-bytes.xor 1.as-bytes).as-number 0 # This unit test is supposed to check the functionality of the corresponding object. # (2397719729.or -4294967296).eq -1897247567 -[] > or-neg-bytes-with-leading-zeroes +[] > tests-or-neg-bytes-with-leading-zeroes eq. > @ 00-00-00-00-8E-EA-4C-B1.or FF-FF-FF-FF-00-00-00-00 FF-FF-FF-FF-8E-EA-4C-B1 # This unit test is supposed to check the functionality of the corresponding object. # (2397719729.and -4294967296).eq 0 -[] > and-neg-bytes-as-number-with-leading-zeroes +[] > tests-and-neg-bytes-as-number-with-leading-zeroes eq. > @ (00-00-00-00-8E-EA-4C-B1.and FF-FF-FF-FF-00-00-00-00).as-number 0 # This unit test is supposed to check the functionality of the corresponding object. # (2397719729.xor -4294967296).eq -1897247567 -[] > xor-neg-bytes-with-leading-zeroes +[] > tests-xor-neg-bytes-with-leading-zeroes eq. > @ 00-00-00-00-8E-EA-4C-B1.xor FF-FF-FF-FF-00-00-00-00 FF-FF-FF-FF-8E-EA-4C-B1 # This unit test is supposed to check the functionality of the corresponding object. # (4294967295.or -4294967296).eq -1 -[] > or-neg-bytes-without-leading-zeroes +[] > tests-or-neg-bytes-without-leading-zeroes eq. > @ 00-00-00-00-FF-FF-FF-FF.or FF-FF-FF-FF-00-00-00-00 FF-FF-FF-FF-FF-FF-FF-FF # This unit test is supposed to check the functionality of the corresponding object. # (4294967295.and -4294967296).eq 0 -[] > and-neg-bytes-as-number-without-leading-zeroes +[] > tests-and-neg-bytes-as-number-without-leading-zeroes eq. > @ (00-00-00-00-FF-FF-FF-FF.and FF-FF-FF-FF-00-00-00-00).as-number 0 # This unit test is supposed to check the functionality of the corresponding object. # (4294967295.xor -4294967296).eq -1 -[] > xor-neg-bytes-as-number-without-leading-zeroes +[] > tests-xor-neg-bytes-as-number-without-leading-zeroes eq. > @ (00-00-00-00-FF-FF-FF-FF.xor FF-FF-FF-FF-00-00-00-00).as-number FF-FF-FF-FF-FF-FF-FF-FF # This unit test is supposed to check the functionality of the corresponding object. -[] > or-neg-bytes-as-number-with-zero +[] > tests-or-neg-bytes-as-number-with-zero eq. > @ (-4294967296.as-bytes.or 0.as-bytes).as-number -4294967296 # This unit test is supposed to check the functionality of the corresponding object. # (-4294967296L.or 1).eq -4294967295L -[] > or-neg-bytes-with-one +[] > tests-or-neg-bytes-with-one eq. > @ FF-FF-FF-FF-00-00-00-00.or 00-00-00-00-00-00-00-01 FF-FF-FF-FF-00-00-00-01 @@ -432,19 +431,19 @@ 01-01-01-01.as-i64 > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > bytes-converts-to-i64 +[] > tests-bytes-converts-to-i64 eq. > @ 00-00-00-00-00-00-00-2A.as-i64 42.as-i64 # This unit test is supposed to check the functionality of the corresponding object. -[] > bytes-converts-to-i64-and-back +[] > tests-bytes-converts-to-i64-and-back eq. > @ 00-00-00-00-00-00-00-33.as-i64.as-bytes 00-00-00-00-00-00-00-33 # This unit test is supposed to check the functionality of the corresponding object. -[] > bytes-as-i64-as-bytes-not-eq-to-number-as-bytes +[] > tests-bytes-as-i64-as-bytes-not-eq-to-number-as-bytes not. > @ eq. 00-00-00-00-00-00-00-2A.as-i64.as-bytes diff --git a/eo-runtime/src/test/eo/org/eolang/cti-test.eo b/eo-runtime/src/test/eo/org/eolang/cti-test.eo index 0e4e58d7fd..bb2672c360 100644 --- a/eo-runtime/src/test/eo/org/eolang/cti-test.eo +++ b/eo-runtime/src/test/eo/org/eolang/cti-test.eo @@ -28,7 +28,7 @@ +unlint object-has-data # This unit test is supposed to check the functionality of the corresponding object. -[] > just-prints-warning +[] > tests-tests-just-prints-warning eq. > @ cti 2.times 2 diff --git a/eo-runtime/src/test/eo/org/eolang/dataized-tests.eo b/eo-runtime/src/test/eo/org/eolang/dataized-tests.eo index d405142c78..a2cce46029 100644 --- a/eo-runtime/src/test/eo/org/eolang/dataized-tests.eo +++ b/eo-runtime/src/test/eo/org/eolang/dataized-tests.eo @@ -28,7 +28,7 @@ +unlint object-has-data # This unit test is supposed to check the functionality of the corresponding object. -[] > dataized-does-not-do-recalculation +[] > tests-dataized-does-not-do-recalculation eq. > @ malloc.for 0 @@ -45,7 +45,7 @@ 1 # This unit test is supposed to check the functionality of the corresponding object. -[] > dataizes-as-bytes-behaves-as-exclamationed +[] > tests-dataizes-as-bytes-behaves-as-exclamationed # Func. [] > func malloc.for > @ diff --git a/eo-runtime/src/test/eo/org/eolang/fs/dir-tests.eo b/eo-runtime/src/test/eo/org/eolang/fs/dir-tests.eo index 2c21d7c883..84f49ef6d6 100644 --- a/eo-runtime/src/test/eo/org/eolang/fs/dir-tests.eo +++ b/eo-runtime/src/test/eo/org/eolang/fs/dir-tests.eo @@ -32,19 +32,19 @@ +unlint unused-alias # This unit test is supposed to check the functionality of the corresponding object. -[] > bound-tmpfile-does-not-recreates-file +[] > tests-bound-tmpfile-does-not-recreates-file tmpdir.tmpfile.as-file > f f.path.eq f.path > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > makes-new-directory +[] > tests-makes-new-directory (tmpdir.tmpfile.deleted.as-path.resolved "foo-new").as-dir.made > d and. > @ d.exists d.is-directory # This unit test is supposed to check the functionality of the corresponding object. -[] > deletes-empty-directory +[] > tests-deletes-empty-directory tmpdir .tmpfile .deleted @@ -64,7 +64,7 @@ true > [d] # This unit test is supposed to check the functionality of the corresponding object. -[] > deletes-directory-with-files-recursively +[] > tests-deletes-directory-with-files-recursively (dir tmpdir.tmpfile.deleted).made > d d.tmpfile > first d.tmpfile > second @@ -79,7 +79,7 @@ second.exists.not # This unit test is supposed to check the functionality of the corresponding object. -[] > deletes-directory-with-file-and-dir +[] > tests-deletes-directory-with-file-and-dir (dir tmpdir.tmpfile.deleted).made > d (dir d.tmpfile.deleted).made > inner d.tmpfile > f @@ -96,7 +96,7 @@ f.exists.not # This unit test is supposed to check the functionality of the corresponding object. -[] > walks-recursively +[] > tests-walks-recursively (dir tmpdir.tmpfile.deleted).made.as-path > d seq > @ * diff --git a/eo-runtime/src/test/eo/org/eolang/fs/file-tests.eo b/eo-runtime/src/test/eo/org/eolang/fs/file-tests.eo index 060d358c0d..35efd1f788 100644 --- a/eo-runtime/src/test/eo/org/eolang/fs/file-tests.eo +++ b/eo-runtime/src/test/eo/org/eolang/fs/file-tests.eo @@ -36,41 +36,41 @@ +unlint unused-alias # This unit test is supposed to check the functionality of the corresponding object. -[] > check-if-current-directory-is-directory +[] > tests-check-if-current-directory-is-directory (file ".").is-directory > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > check-if-absent-file-does-not-exist +[] > tests-check-if-absent-file-does-not-exist (file "absent.txt").exists.not > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > returns-self-after-deleting +[] > tests-returns-self-after-deleting tmpdir.tmpfile > temp temp.deleted.path.eq temp.path > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > returns-self-after-touching +[] > tests-returns-self-after-touching tmpdir.tmpfile > temp temp.deleted.touched.path.eq temp.path > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > checks-file-does-not-exist-after-deleting +[] > tests-checks-file-does-not-exist-after-deleting tmpdir.tmpfile.deleted.exists.not > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > touches-a-file +[] > tests-touches-a-file tmpdir.tmpfile.deleted.touched.exists > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > measures-empty-file-after-touching +[] > tests-measures-empty-file-after-touching tmpdir.tmpfile.deleted.touched.size.eq 0 > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > does-not-fail-on-double-touching +[] > tests-does-not-fail-on-double-touching tmpdir.tmpfile.deleted.touched.touched.exists > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > does-not-fail-on-double-deleting +[] > tests-does-not-fail-on-double-deleting tmpdir.tmpfile.deleted.deleted.exists.not > @ # This unit test is supposed to check the functionality of the corresponding object. @@ -78,7 +78,7 @@ (tmpdir.as-path.resolved "foo").as-dir.tmpfile > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > resolves-and-touches +[] > tests-resolves-and-touches (tmpdir.as-path.resolved "foo/bar").as-dir > resolved resolved.tmpfile > f seq > @ @@ -93,7 +93,7 @@ * "foo" "bar" # This unit test is supposed to check the functionality of the corresponding object. -[] > moves-a-file +[] > tests-moves-a-file tmpdir.tmpfile > temp sprintf > dest "%s.dest" @@ -129,7 +129,7 @@ f > [f] # Test -[] > touches-absent-file-on-opening-for-writing +[] > tests-touches-absent-file-on-opening-for-writing tmpdir .tmpfile .deleted @@ -139,7 +139,7 @@ .exists > @ # Test -[] > touches-absent-file-on-opening-for-appending +[] > tests-touches-absent-file-on-opening-for-appending tmpdir .tmpfile .deleted @@ -149,7 +149,7 @@ .exists > @ # Test -[] > touches-absent-file-on-opening-for-writing-or-reading +[] > tests-touches-absent-file-on-opening-for-writing-or-reading tmpdir .tmpfile .deleted @@ -159,7 +159,7 @@ .exists > @ # Test -[] > touches-absent-file-on-opening-for-reading-or-appending +[] > tests-touches-absent-file-on-opening-for-reading-or-appending tmpdir .tmpfile .deleted @@ -169,7 +169,7 @@ .exists > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > writes-data-to-file +[] > tests-writes-data-to-file tmpdir .tmpfile .open @@ -179,7 +179,7 @@ .eq 12 > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > appending-data-to-file +[] > tests-appending-data-to-file tmpdir .tmpfile .open @@ -192,7 +192,7 @@ .eq 13 > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > truncates-file-opened-for-writing +[] > tests-truncates-file-opened-for-writing tmpdir .tmpfile .open @@ -205,7 +205,7 @@ .eq 0 > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > truncates-file-opened-for-writing-or-reading +[] > tests-truncates-file-opened-for-writing-or-reading tmpdir .tmpfile .open @@ -218,7 +218,7 @@ .eq 0 > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > does-not-truncate-file-opened-for-appending +[] > tests-does-not-truncate-file-opened-for-appending tmpdir .tmpfile .open @@ -231,7 +231,7 @@ .eq 12 > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > does-not-truncate-file-opened-for-reading-or-appending +[] > tests-does-not-truncate-file-opened-for-reading-or-appending tmpdir .tmpfile .open @@ -244,7 +244,7 @@ .eq 12 > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > does-not-truncate-file-opened-for-reading +[] > tests-does-not-truncate-file-opened-for-reading tmpdir .tmpfile .open @@ -265,7 +265,7 @@ f.write "Hello" > [f] # This unit test is supposed to check the functionality of the corresponding object. -[] > reads-from-file +[] > tests-reads-from-file malloc .of 12 @@ -294,7 +294,7 @@ f.read 12 > [f] # This unit test is supposed to check the functionality of the corresponding object. -[] > reads-from-file-from-different-instances +[] > tests-reads-from-file-from-different-instances tmpdir.tmpfile > temp temp.path > src seq > @ @@ -320,7 +320,7 @@ .eq "Shrek is love" # This unit test is supposed to check the functionality of the corresponding object. -[] > writes-to-file-from-different-instances +[] > tests-writes-to-file-from-different-instances tmpdir.tmpfile > temp temp.path > src seq > @ @@ -349,7 +349,7 @@ .eq "Shrek is love!" # This unit test is supposed to check the functionality of the corresponding object. -[] > reads-from-file-sequentially +[] > tests-reads-from-file-sequentially malloc .of 5 @@ -371,7 +371,7 @@ .eq "world" > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > writes-to-file-sequentially +[] > tests-writes-to-file-sequentially tmpdir .tmpfile .open diff --git a/eo-runtime/src/test/eo/org/eolang/fs/path-tests.eo b/eo-runtime/src/test/eo/org/eolang/fs/path-tests.eo index b7c7204989..043e2fff35 100644 --- a/eo-runtime/src/test/eo/org/eolang/fs/path-tests.eo +++ b/eo-runtime/src/test/eo/org/eolang/fs/path-tests.eo @@ -32,7 +32,7 @@ +unlint unused-alias # This unit test is supposed to check the functionality of the corresponding object. -[] > determines-separator-depending-on-os +[] > tests-determines-separator-depending-on-os eq. > @ path.separator if. @@ -41,13 +41,13 @@ path.posix.separator # This unit test is supposed to check the functionality of the corresponding object. -[] > detects-absolute-posix-path +[] > tests-detects-absolute-posix-path and. > @ (path.posix "/var/www/html").is-absolute (path.posix "foo/bar/baz").is-absolute.not # This unit test is supposed to check the functionality of the corresponding object. -[] > detects-absolute-win32-path +[] > tests-detects-absolute-win32-path and. > @ and. (path.win32 "C:\\Windows\\Users").is-absolute @@ -55,151 +55,151 @@ (path.win32 "temp\\var").is-absolute.not # This unit test is supposed to check the functionality of the corresponding object. -[] > normalizes-posix-path +[] > tests-normalizes-posix-path eq. > @ (path.posix "/foo/bar/.//./baz//../x/").normalized "/foo/bar/x/" # This unit test is supposed to check the functionality of the corresponding object. -[] > normalizes-posix-relative-path +[] > tests-normalizes-posix-relative-path eq. > @ (path.posix "../../foo/./bar/../x/../y").normalized "../../foo/y" # This unit test is supposed to check the functionality of the corresponding object. -[] > normalizes-empty-posix-path-to-current-dir +[] > tests-normalizes-empty-posix-path-to-current-dir eq. > @ (path.posix "").normalized "." # This unit test is supposed to check the functionality of the corresponding object. -[] > normalizes-path-to-root +[] > tests-normalizes-path-to-root eq. > @ (path.posix "/foo/bar/baz/../../../../").normalized "/" # This unit test is supposed to check the functionality of the corresponding object. -[] > normalizes-absolute-win32-path-without-drive +[] > tests-normalizes-absolute-win32-path-without-drive eq. > @ (path.win32 "\\Windows\\Users\\..\\App\\\\.\\Local\\\\").normalized "\\Windows\\App\\Local\\" # This unit test is supposed to check the functionality of the corresponding object. -[] > normalizes-absolute-win32-path-with-drive +[] > tests-normalizes-absolute-win32-path-with-drive eq. > @ (path.win32 "C:\\Windows\\\\..\\Users\\.\\AppLocal").normalized "C:\\Users\\AppLocal" # This unit test is supposed to check the functionality of the corresponding object. -[] > normalizes-relative-win32-path +[] > tests-normalizes-relative-win32-path eq. > @ (path.win32 "..\\..\\foo\\bar\\..\\x\\y\\\\").normalized "..\\..\\foo\\x\\y\\" # This unit test is supposed to check the functionality of the corresponding object. -[] > normalizes-empty-win32-driveless-path-to-current-dir +[] > tests-normalizes-empty-win32-driveless-path-to-current-dir eq. > @ (path.win32 "").normalized "." # This unit test is supposed to check the functionality of the corresponding object. -[] > normalizes-win32-path-down-to-drive-with-separator +[] > tests-normalizes-win32-path-down-to-drive-with-separator eq. > @ (path.win32 "C:\\Windows\\..").normalized "C:\\" # This unit test is supposed to check the functionality of the corresponding object. -[] > normalizes-win32-path-down-to-drive-without-separator +[] > tests-normalizes-win32-path-down-to-drive-without-separator eq. > @ (path.win32 "C:hello\\..").normalized "C:" # This unit test is supposed to check the functionality of the corresponding object. -[] > normalizes-win32-path-with-replacing-slashes +[] > tests-normalizes-win32-path-with-replacing-slashes eq. > @ (path.win32 "/var/www/../html/").normalized "\\var\\html\\" # This unit test is supposed to check the functionality of the corresponding object. -[] > resolves-posix-absolute-path-against-other-absolute-path +[] > tests-resolves-posix-absolute-path-against-other-absolute-path eq. > @ (path.posix "/var/temp").resolved "/www/html" "/www/html" # This unit test is supposed to check the functionality of the corresponding object. -[] > resolves-posix-absolute-path-against-other-relative-path +[] > tests-resolves-posix-absolute-path-against-other-relative-path eq. > @ (path.posix "/var/temp").resolved "./www/html" "/var/temp/www/html" # This unit test is supposed to check the functionality of the corresponding object. -[] > resolves-posix-relative-path-against-other-absolute-path +[] > tests-resolves-posix-relative-path-against-other-absolute-path eq. > @ (path.posix "./var/temp").resolved "/www/html" "/www/html" # This unit test is supposed to check the functionality of the corresponding object. -[] > resolves-posix-relative-path-against-other-relative-path +[] > tests-resolves-posix-relative-path-against-other-relative-path eq. > @ (path.posix "./var/temp").resolved "../www/html" "var/www/html" # This unit test is supposed to check the functionality of the corresponding object. -[] > resolves-win32-relative-path-against-other-relative-path +[] > tests-resolves-win32-relative-path-against-other-relative-path eq. > @ (path.win32 ".\\temp\\var").resolved ".\\..\\x" "temp\\x" # This unit test is supposed to check the functionality of the corresponding object. -[] > resolves-win32-relative-path-against-other-drive-relative-path +[] > tests-resolves-win32-relative-path-against-other-drive-relative-path eq. > @ (path.win32 ".\\temp\\var").resolved "C:\\Windows\\Users" "C:\\Windows\\Users" # This unit test is supposed to check the functionality of the corresponding object. -[] > resolves-win32-relative-path-against-other-root-relative-path +[] > tests-resolves-win32-relative-path-against-other-root-relative-path eq. > @ (path.win32 ".\\temp\\var").resolved "\\Windows\\Users" "\\Windows\\Users" # This unit test is supposed to check the functionality of the corresponding object. -[] > resolves-win32-drive-relative-path-against-other-relative-path +[] > tests-resolves-win32-drive-relative-path-against-other-relative-path eq. > @ (path.win32 "C:\\users\\local").resolved ".\\var\\temp" "C:\\users\\local\\var\\temp" # This unit test is supposed to check the functionality of the corresponding object. -[] > resolves-win32-drive-relative-path-against-other-drive-relative-path +[] > tests-resolves-win32-drive-relative-path-against-other-drive-relative-path eq. > @ (path.win32 "C:\\users\\local").resolved "D:\\local\\var" "D:\\local\\var" # This unit test is supposed to check the functionality of the corresponding object. -[] > resolves-win32-drive-relative-path-against-other-root-relative-path +[] > tests-resolves-win32-drive-relative-path-against-other-root-relative-path eq. > @ (path.win32 "C:\\users\\local").resolved "\\local\\var" "C:\\local\\var" # This unit test is supposed to check the functionality of the corresponding object. -[] > resolves-win32-root-relative-path-against-other-relative-path +[] > tests-resolves-win32-root-relative-path-against-other-relative-path eq. > @ (path.win32 "\\users\\local").resolved ".\\hello\\var" "\\users\\local\\hello\\var" # This unit test is supposed to check the functionality of the corresponding object. -[] > resolves-win32-root-relative-path-against-other-drive-relative-path +[] > tests-resolves-win32-root-relative-path-against-other-drive-relative-path eq. > @ (path.win32 "\\users\\local").resolved "D:\\hello\\var" "D:\\hello\\var" # This unit test is supposed to check the functionality of the corresponding object. -[] > resolves-win32-root-relative-path-against-other-root-relative-path +[] > tests-resolves-win32-root-relative-path-against-other-root-relative-path eq. > @ (path.win32 "\\users\\local").resolved "\\hello\\var" "\\hello\\var" # This unit test is supposed to check the functionality of the corresponding object. -[] > takes-valid-basename +[] > tests-takes-valid-basename eq. > @ basename. path.joined @@ -207,7 +207,7 @@ "hello.eo" # This unit test is supposed to check the functionality of the corresponding object. -[] > returns-empty-basename-from-path-ended-with-separator +[] > tests-returns-empty-basename-from-path-ended-with-separator eq. > @ basename. path.joined @@ -215,19 +215,19 @@ "" # This unit test is supposed to check the functionality of the corresponding object. -[] > returns-base-with-backslash-in-path-on-posix +[] > tests-returns-base-with-backslash-in-path-on-posix eq. > @ (path.posix "/var/www/html/foo\\bar").basename "foo\\bar" # This unit test is supposed to check the functionality of the corresponding object. -[] > returns-the-same-string-if-no-separator-is-found +[] > tests-returns-the-same-string-if-no-separator-is-found eq. > @ (path "Somebody").basename "Somebody" # This unit test is supposed to check the functionality of the corresponding object. -[] > takes-file-extname +[] > tests-takes-file-extname eq. > @ extname. path.joined @@ -235,7 +235,7 @@ ".txt" # This unit test is supposed to check the functionality of the corresponding object. -[] > does-not-take-extname-on-file-without-extension +[] > tests-does-not-take-extname-on-file-without-extension eq. > @ extname. path.joined @@ -243,7 +243,7 @@ "" # This unit test is supposed to check the functionality of the corresponding object. -[] > does-not-take-extname-if-ends-with-separator +[] > tests-does-not-take-extname-if-ends-with-separator eq. > @ extname. path.joined @@ -251,7 +251,7 @@ "" # This unit test is supposed to check the functionality of the corresponding object. -[] > returns-valid-dirname-from-file-path +[] > tests-returns-valid-dirname-from-file-path eq. > @ dirname. path.joined @@ -260,7 +260,7 @@ * "var" "www" # This unit test is supposed to check the functionality of the corresponding object. -[] > returns-valid-dirname-from-dir-path +[] > tests-returns-valid-dirname-from-dir-path eq. > @ dirname. path.joined @@ -269,7 +269,7 @@ * "var" "www" # This unit test is supposed to check the functionality of the corresponding object. -[] > returns-valid-dirname-from-file-path-without-extension +[] > tests-returns-valid-dirname-from-file-path-without-extension eq. > @ dirname. path.joined diff --git a/eo-runtime/src/test/eo/org/eolang/go-tests.eo b/eo-runtime/src/test/eo/org/eolang/go-tests.eo index 72947dea55..c0b88a4b26 100644 --- a/eo-runtime/src/test/eo/org/eolang/go-tests.eo +++ b/eo-runtime/src/test/eo/org/eolang/go-tests.eo @@ -29,7 +29,7 @@ +unlint broken-ref # This unit test is supposed to check the functionality of the corresponding object. -[] > goto-jumps-backwards +[] > tests-goto-jumps-backwards eq. > @ malloc.of 8 @@ -50,7 +50,7 @@ 10 # This unit test is supposed to check the functionality of the corresponding object. -[] > goto-jumps-forward +[] > tests-goto-jumps-forward [x] > div malloc.for > @ 0 @@ -73,7 +73,7 @@ 0 # This unit test is supposed to check the functionality of the corresponding object. -[] > returns-from-method-body +[] > tests-returns-from-method-body [a b] > max go.to > @ [g] >> @@ -89,7 +89,7 @@ 42 # This unit test is supposed to check the functionality of the corresponding object. -[] > nested-goto +[] > tests-nested-goto eq. > @ go.to [g1] diff --git a/eo-runtime/src/test/eo/org/eolang/i16-tests.eo b/eo-runtime/src/test/eo/org/eolang/i16-tests.eo index 7880441668..feb73d18c1 100644 --- a/eo-runtime/src/test/eo/org/eolang/i16-tests.eo +++ b/eo-runtime/src/test/eo/org/eolang/i16-tests.eo @@ -28,134 +28,134 @@ +unlint object-has-data # This unit test is supposed to check the functionality of the corresponding object. -[] > i16-has-valid-bytes +[] > tests-i16-has-valid-bytes eq. > @ 42.as-i64.as-i32.as-i16.as-bytes 00-2A # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-i16-has-valid-bytes +[] > tests-negative-i16-has-valid-bytes eq. > @ -200.as-i64.as-i32.as-i16.as-bytes FF-38 # This unit test is supposed to check the functionality of the corresponding object. -[] > i16-less-true +[] > tests-i16-less-true lt. > @ 10.as-i64.as-i32.as-i16 50.as-i64.as-i32.as-i16 # This unit test is supposed to check the functionality of the corresponding object. -[] > i16-less-equal +[] > tests-i16-less-equal not. > @ lt. 10.as-i64.as-i32.as-i16 10.as-i64.as-i32.as-i16 # This unit test is supposed to check the functionality of the corresponding object. -[] > i16-less-false +[] > tests-i16-less-false not. > @ lt. 10.as-i64.as-i32.as-i16 -5.as-i64.as-i32.as-i16 # This unit test is supposed to check the functionality of the corresponding object. -[] > i16-greater-true +[] > tests-i16-greater-true gt. > @ -200.as-i64.as-i32.as-i16 -1000.as-i64.as-i32.as-i16 # This unit test is supposed to check the functionality of the corresponding object. -[] > i16-greater-false +[] > tests-i16-greater-false not. > @ gt. 0.as-i64.as-i32.as-i16 100.as-i64.as-i32.as-i16 # This unit test is supposed to check the functionality of the corresponding object. -[] > i16-greater-equal +[] > tests-i16-greater-equal not. > @ gt. 0.as-i64.as-i32.as-i16 0.as-i64.as-i32.as-i16 # This unit test is supposed to check the functionality of the corresponding object. -[] > i16-lte-true +[] > tests-i16-lte-true lte. > @ -200.as-i64.as-i32.as-i16 -100.as-i64.as-i32.as-i16 # This unit test is supposed to check the functionality of the corresponding object. -[] > i16-lte-equal +[] > tests-i16-lte-equal lte. > @ 50.as-i64.as-i32.as-i16 50.as-i64.as-i32.as-i16 # This unit test is supposed to check the functionality of the corresponding object. -[] > i16-lte-false +[] > tests-i16-lte-false not. > @ lte. 0.as-i64.as-i32.as-i16 -10.as-i64.as-i32.as-i16 # This unit test is supposed to check the functionality of the corresponding object. -[] > i16-gte-true +[] > tests-i16-gte-true gte. > @ -1000.as-i64.as-i32.as-i16 -1100.as-i64.as-i32.as-i16 # This unit test is supposed to check the functionality of the corresponding object. -[] > i16-gte-equal +[] > tests-i16-gte-equal gte. > @ 113.as-i64.as-i32.as-i16 113.as-i64.as-i32.as-i16 # This unit test is supposed to check the functionality of the corresponding object. -[] > i16-gte-false +[] > tests-i16-gte-false not. > @ gte. 0.as-i64.as-i32.as-i16 10.as-i64.as-i32.as-i16 # This unit test is supposed to check the functionality of the corresponding object. -[] > i16-zero-eq-to-i16-zero +[] > tests-i16-zero-eq-to-i16-zero eq. > @ 0.as-i64.as-i32.as-i16 0.as-i64.as-i32.as-i16 # This unit test is supposed to check the functionality of the corresponding object. -[] > i16-eq-true +[] > tests-i16-eq-true eq. > @ 123.as-i64.as-i32.as-i16 123.as-i64.as-i32.as-i16 # This unit test is supposed to check the functionality of the corresponding object. -[] > i16-eq-false +[] > tests-i16-eq-false not. > @ eq. 123.as-i64.as-i32.as-i16 42.as-i64.as-i32.as-i16 # Test -[] > i16-one-plus-i16-one +[] > tests-i16-one-plus-i16-one eq. > @ 1.as-i64.as-i32.as-i16.plus 1.as-i64.as-i32.as-i16 2.as-i64.as-i32.as-i16 # This unit test is supposed to check the functionality of the corresponding object. -[] > i16-plus-with-overflow +[] > tests-i16-plus-with-overflow eq. > @ 32767.as-i64.as-i32.as-i16.plus 1.as-i64.as-i32.as-i16 -32768.as-i64.as-i32.as-i16 # Test -[] > i16-one-minus-i16-one +[] > tests-i16-one-minus-i16-one eq. > @ 1.as-i64.as-i32.as-i16.minus 1.as-i64.as-i32.as-i16 0.as-i64.as-i32.as-i16 # This unit test is supposed to check the functionality of the corresponding object. -[] > i16-minus-with-overflow +[] > tests-i16-minus-with-overflow eq. > @ -32768.as-i64.as-i32.as-i16.minus 1.as-i64.as-i32.as-i16 32767.as-i64.as-i32.as-i16 @@ -165,7 +165,7 @@ # This unit test is supposed to check the functionality of the corresponding object. # Checks that division by one returns the dividend. -[] > i16-div-by-i16-one +[] > tests-i16-div-by-i16-one -235.as-i64.as-i32.as-i16 > dividend eq. > @ dividend.div 1.as-i64.as-i32.as-i16 @@ -173,25 +173,25 @@ # This unit test is supposed to check the functionality of the corresponding object. # Checks div with remainder -[] > i16-div-with-remainder +[] > tests-i16-div-with-remainder eq. > @ 13.as-i64.as-i32.as-i16.div -5.as-i64.as-i32.as-i16 -2.as-i64.as-i32.as-i16 # This unit test is supposed to check the functionality of the corresponding object. -[] > i16-div-less-than-i16-one +[] > tests-i16-div-less-than-i16-one lt. > @ 1.as-i64.as-i32.as-i16.div 5.as-i64.as-i32.as-i16 1.as-i64.as-i32.as-i16 # This unit test is supposed to check the functionality of the corresponding object. -[] > i16-multiply-by-zero +[] > tests-i16-multiply-by-zero eq. > @ 1000.as-i64.as-i32.as-i16.times 0.as-i64.as-i32.as-i16 0.as-i64.as-i32.as-i16 # This unit test is supposed to check the functionality of the corresponding object. -[] > i16-times-with-overflow +[] > tests-i16-times-with-overflow eq. > @ 32767.as-i64.as-i32.as-i16.times 2.as-i64.as-i32.as-i16 -2.as-i64.as-i32.as-i16 diff --git a/eo-runtime/src/test/eo/org/eolang/i32-tests.eo b/eo-runtime/src/test/eo/org/eolang/i32-tests.eo index 4f67c712f1..670f458a88 100644 --- a/eo-runtime/src/test/eo/org/eolang/i32-tests.eo +++ b/eo-runtime/src/test/eo/org/eolang/i32-tests.eo @@ -28,146 +28,146 @@ +unlint object-has-data # This unit test is supposed to check the functionality of the corresponding object. -[] > i32-has-valid-bytes +[] > tests-i32-has-valid-bytes eq. > @ 42.as-i64.as-i32.as-bytes 00-00-00-2A # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-i32-has-valid-bytes +[] > tests-negative-i32-has-valid-bytes eq. > @ -200.as-i64.as-i32.as-bytes FF-FF-FF-38 # This unit test is supposed to check the functionality of the corresponding object. -[] > i32-to-i16-and-back +[] > tests-i32-to-i16-and-back eq. > @ 123.as-i64.as-i32 123.as-i64.as-i32.as-i16.as-i32 # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-i32-to-i16-and-back +[] > tests-negative-i32-to-i16-and-back eq. > @ -123.as-i64.as-i32 -123.as-i64.as-i32.as-i16.as-i32 # This unit test is supposed to check the functionality of the corresponding object. -[] > i32-less-true +[] > tests-i32-less-true lt. > @ 10.as-i64.as-i32 50.as-i64.as-i32 # This unit test is supposed to check the functionality of the corresponding object. -[] > i32-less-equal +[] > tests-i32-less-equal not. > @ lt. 10.as-i64.as-i32 10.as-i64.as-i32 # This unit test is supposed to check the functionality of the corresponding object. -[] > i32-less-false +[] > tests-i32-less-false not. > @ lt. 10.as-i64.as-i32 -5.as-i64.as-i32 # This unit test is supposed to check the functionality of the corresponding object. -[] > i32-greater-true +[] > tests-i32-greater-true gt. > @ -200.as-i64.as-i32 -1000.as-i64.as-i32 # This unit test is supposed to check the functionality of the corresponding object. -[] > i32-greater-false +[] > tests-i32-greater-false not. > @ gt. 0.as-i64.as-i32 100.as-i64.as-i32 # This unit test is supposed to check the functionality of the corresponding object. -[] > i32-greater-equal +[] > tests-i32-greater-equal not. > @ gt. 0.as-i64.as-i32 0.as-i64.as-i32 # This unit test is supposed to check the functionality of the corresponding object. -[] > i32-lte-true +[] > tests-i32-lte-true lte. > @ -200.as-i64.as-i32 -100.as-i64.as-i32 # This unit test is supposed to check the functionality of the corresponding object. -[] > i32-lte-equal +[] > tests-i32-lte-equal lte. > @ 50.as-i64.as-i32 50.as-i64.as-i32 # This unit test is supposed to check the functionality of the corresponding object. -[] > i32-lte-false +[] > tests-i32-lte-false not. > @ lte. 0.as-i64.as-i32 -10.as-i64.as-i32 # This unit test is supposed to check the functionality of the corresponding object. -[] > i32-gte-true +[] > tests-i32-gte-true gte. > @ -1000.as-i64.as-i32 -1100.as-i64.as-i32 # This unit test is supposed to check the functionality of the corresponding object. -[] > i32-gte-equal +[] > tests-i32-gte-equal gte. > @ 113.as-i64.as-i32 113.as-i64.as-i32 # This unit test is supposed to check the functionality of the corresponding object. -[] > i32-gte-false +[] > tests-i32-gte-false not. > @ gte. 0.as-i64.as-i32 10.as-i64.as-i32 # This unit test is supposed to check the functionality of the corresponding object. -[] > i32-zero-eq-to-i32-zero +[] > tests-i32-zero-eq-to-i32-zero eq. > @ 0.as-i64.as-i32 0.as-i64.as-i32 # This unit test is supposed to check the functionality of the corresponding object. -[] > i32-eq-true +[] > tests-i32-eq-true eq. > @ 123.as-i64.as-i32 123.as-i64.as-i32 # This unit test is supposed to check the functionality of the corresponding object. -[] > i32-eq-false +[] > tests-i32-eq-false not. > @ eq. 123.as-i64.as-i32 42.as-i64.as-i32 # Test -[] > i32-one-plus-i32-one +[] > tests-i32-one-plus-i32-one eq. > @ 1.as-i64.as-i32.plus 1.as-i64.as-i32 2.as-i64.as-i32 # This unit test is supposed to check the functionality of the corresponding object. -[] > i32-plus-with-overflow +[] > tests-i32-plus-with-overflow eq. > @ 2147483647.as-i64.as-i32.plus 1.as-i64.as-i32 -2147483648.as-i64.as-i32 # Test -[] > i32-one-minus-i32-one +[] > tests-i32-one-minus-i32-one eq. > @ 1.as-i64.as-i32.minus 1.as-i64.as-i32 0.as-i64.as-i32 # This unit test is supposed to check the functionality of the corresponding object. -[] > i32-minus-with-overflow +[] > tests-i32-minus-with-overflow eq. > @ -2147483648.as-i64.as-i32.minus 1.as-i64.as-i32 2147483647.as-i64.as-i32 @@ -180,7 +180,7 @@ # This unit test is supposed to check the functionality of the corresponding object. # Checks that division by one returns the dividend. -[] > i32-div-by-i32-one +[] > tests-i32-div-by-i32-one -235.as-i64.as-i32 > dividend eq. > @ dividend.div 1.as-i64.as-i32 @@ -188,25 +188,25 @@ # This unit test is supposed to check the functionality of the corresponding object. # Checks div with remainder -[] > i32-div-with-remainder +[] > tests-i32-div-with-remainder eq. > @ 13.as-i64.as-i32.div -5.as-i64.as-i32 -2.as-i64.as-i32 # This unit test is supposed to check the functionality of the corresponding object. -[] > i32-div-less-than-i32-one +[] > tests-i32-div-less-than-i32-one lt. > @ 1.as-i64.as-i32.div 5.as-i64.as-i32 1.as-i64.as-i32 # This unit test is supposed to check the functionality of the corresponding object. -[] > i32-multiply-by-zero +[] > tests-i32-multiply-by-zero eq. > @ 1000.as-i64.as-i32.times 0.as-i64.as-i32 0.as-i64.as-i32 # This unit test is supposed to check the functionality of the corresponding object. -[] > i32-times-with-overflow +[] > tests-i32-times-with-overflow eq. > @ 2147483647.as-i64.as-i32.times 2.as-i64.as-i32 -2.as-i64.as-i32 diff --git a/eo-runtime/src/test/eo/org/eolang/i64-tests.eo b/eo-runtime/src/test/eo/org/eolang/i64-tests.eo index c057408a7c..796945503b 100644 --- a/eo-runtime/src/test/eo/org/eolang/i64-tests.eo +++ b/eo-runtime/src/test/eo/org/eolang/i64-tests.eo @@ -28,26 +28,26 @@ +unlint object-has-data # This unit test is supposed to check the functionality of the corresponding object. -[] > i64-has-valid-bytes +[] > tests-i64-has-valid-bytes eq. > @ 42.as-i64.as-bytes 00-00-00-00-00-00-00-2A # This unit test is supposed to check the functionality of the corresponding object. -[] > i64-as-bytes-is-not-equal-to-number-bytes +[] > tests-i64-as-bytes-is-not-equal-to-number-bytes not. > @ eq. i64 234.as-bytes 234.as-i64.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > i64-to-i32-and-back +[] > tests-i64-to-i32-and-back eq. > @ 234.as-i64 234.as-i64.as-i32.as-i64 # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-i64-to-i32-and-back +[] > tests-negative-i64-to-i32-and-back eq. > @ -234.as-i64 -234.as-i64.as-i32.as-i64 @@ -56,110 +56,110 @@ 3147483647.as-i64.as-i32 > [] > throws-on-converting-to-i32-if-out-of-bounds # This unit test is supposed to check the functionality of the corresponding object. -[] > i64-less-true +[] > tests-i64-less-true lt. > @ 10.as-i64 50.as-i64 # This unit test is supposed to check the functionality of the corresponding object. -[] > i64-less-equal +[] > tests-i64-less-equal not. > @ lt. 10.as-i64 10.as-i64 # This unit test is supposed to check the functionality of the corresponding object. -[] > i64-less-false +[] > tests-i64-less-false not. > @ lt. 10.as-i64 -5.as-i64 # This unit test is supposed to check the functionality of the corresponding object. -[] > i64-greater-true +[] > tests-i64-greater-true gt. > @ -200.as-i64 -1000.as-i64 # This unit test is supposed to check the functionality of the corresponding object. -[] > i64-greater-false +[] > tests-i64-greater-false not. > @ gt. 0.as-i64 100.as-i64 # This unit test is supposed to check the functionality of the corresponding object. -[] > i64-greater-equal +[] > tests-i64-greater-equal not. > @ gt. 0.as-i64 0.as-i64 # This unit test is supposed to check the functionality of the corresponding object. -[] > i64-lte-true +[] > tests-i64-lte-true lte. > @ -200.as-i64 -100.as-i64 # This unit test is supposed to check the functionality of the corresponding object. -[] > i64-lte-equal +[] > tests-i64-lte-equal lte. > @ 50.as-i64 50.as-i64 # This unit test is supposed to check the functionality of the corresponding object. -[] > i64-lte-false +[] > tests-i64-lte-false not. > @ lte. 0.as-i64 -10.as-i64 # This unit test is supposed to check the functionality of the corresponding object. -[] > i64-gte-true +[] > tests-i64-gte-true gte. > @ -1000.as-i64 -1100.as-i64 # This unit test is supposed to check the functionality of the corresponding object. -[] > i64-gte-equal +[] > tests-i64-gte-equal gte. > @ 113.as-i64 113.as-i64 # This unit test is supposed to check the functionality of the corresponding object. -[] > i64-gte-false +[] > tests-i64-gte-false not. > @ gte. 0.as-i64 10.as-i64 # This unit test is supposed to check the functionality of the corresponding object. -[] > i64-zero-eq-to-i64-zero +[] > tests-i64-zero-eq-to-i64-zero eq. > @ 0.as-i64 0.as-i64 # This unit test is supposed to check the functionality of the corresponding object. -[] > i64-eq-true +[] > tests-i64-eq-true eq. > @ 123.as-i64 123.as-i64 # This unit test is supposed to check the functionality of the corresponding object. -[] > i64-eq-false +[] > tests-i64-eq-false not. > @ eq. 123.as-i64 42.as-i64 # Test -[] > i64-one-plus-i64-one +[] > tests-i64-one-plus-i64-one eq. > @ 1.as-i64.plus 1.as-i64 2.as-i64 # Test -[] > i64-one-minus-i64-one +[] > tests-i64-one-minus-i64-one eq. > @ 1.as-i64.minus 1.as-i64 0.as-i64 @@ -168,26 +168,26 @@ 2.as-i64.div 0.as-i64 > [] > throws-on-division-i64-by-i64-zero # Checks that division by one returns the dividend. -[] > i64-div-by-i64-one +[] > tests-i64-div-by-i64-one -235.as-i64 > dividend eq. > @ dividend.div 1.as-i64 dividend # Checks div with remainder -[] > i64-div-with-remainder +[] > tests-i64-div-with-remainder eq. > @ 13.as-i64.div -5.as-i64 -2.as-i64 # This unit test is supposed to check the functionality of the corresponding object. -[] > i64-div-less-than-i64-one +[] > tests-i64-div-less-than-i64-one lt. > @ 1.as-i64.div 5.as-i64 1.as-i64 # This unit test is supposed to check the functionality of the corresponding object. -[] > i64-multiply-by-zero +[] > tests-i64-multiply-by-zero eq. > @ 1000.as-i64.times 0.as-i64 0.as-i64 diff --git a/eo-runtime/src/test/eo/org/eolang/io/bytes-as-input-test.eo b/eo-runtime/src/test/eo/org/eolang/io/bytes-as-input-test.eo index e098bdde36..8b61a3818a 100644 --- a/eo-runtime/src/test/eo/org/eolang/io/bytes-as-input-test.eo +++ b/eo-runtime/src/test/eo/org/eolang/io/bytes-as-input-test.eo @@ -30,7 +30,7 @@ +unlint broken-alias-second # This unit test is supposed to check the functionality of the corresponding object. -[] > makes-an-input-from-bytes-and-reads +[] > tests-makes-an-input-from-bytes-and-reads bytes-as-input > i 01-02-03-04-05-06-07-08-F5-F6 i.read 4 > i1 diff --git a/eo-runtime/src/test/eo/org/eolang/io/console-test.eo b/eo-runtime/src/test/eo/org/eolang/io/console-test.eo index 2306d23cb8..962a3dafda 100644 --- a/eo-runtime/src/test/eo/org/eolang/io/console-test.eo +++ b/eo-runtime/src/test/eo/org/eolang/io/console-test.eo @@ -32,6 +32,6 @@ # Prints a simple message to the console. We can't validate # the output, so we just run it and see if it crashes. -[] > writes-to-console +[] > tests-writes-to-console console.write > @ "Hello, console-test!\n" diff --git a/eo-runtime/src/test/eo/org/eolang/io/dead-input-tests.eo b/eo-runtime/src/test/eo/org/eolang/io/dead-input-tests.eo index da2511784a..0cfbdaa3ef 100644 --- a/eo-runtime/src/test/eo/org/eolang/io/dead-input-tests.eo +++ b/eo-runtime/src/test/eo/org/eolang/io/dead-input-tests.eo @@ -31,7 +31,7 @@ +unlint unused-alias # This unit test is supposed to check the functionality of the corresponding object. -[] > reads-empty-bytes +[] > tests-reads-empty-bytes dead-input.read 10 > i1 i1.read 10 > i2 and. > @ diff --git a/eo-runtime/src/test/eo/org/eolang/io/input-length-tests.eo b/eo-runtime/src/test/eo/org/eolang/io/input-length-tests.eo index 6a2790141e..b9e3144c8f 100644 --- a/eo-runtime/src/test/eo/org/eolang/io/input-length-tests.eo +++ b/eo-runtime/src/test/eo/org/eolang/io/input-length-tests.eo @@ -33,7 +33,7 @@ +unlint broken-alias-second # This unit test is supposed to check the functionality of the corresponding object. -[] > reads-all-bytes-and-returns-length +[] > tests-reads-all-bytes-and-returns-length eq. > @ input-length bytes-as-input @@ -41,7 +41,7 @@ 10 # This unit test is supposed to check the functionality of the corresponding object. -[] > copies-all-bytes-to-output-and-returns-length +[] > tests-copies-all-bytes-to-output-and-returns-length eq. > @ malloc.of 10 diff --git a/eo-runtime/src/test/eo/org/eolang/io/malloc-as-output-test.eo b/eo-runtime/src/test/eo/org/eolang/io/malloc-as-output-test.eo index f27a3cf5a1..40d71f9a61 100644 --- a/eo-runtime/src/test/eo/org/eolang/io/malloc-as-output-test.eo +++ b/eo-runtime/src/test/eo/org/eolang/io/malloc-as-output-test.eo @@ -30,7 +30,7 @@ +unlint broken-alias-second # This unit test is supposed to check the functionality of the corresponding object. -[] > makes-an-output-from-malloc-and-writes +[] > tests-makes-an-output-from-malloc-and-writes eq. > @ malloc.of 10 diff --git a/eo-runtime/src/test/eo/org/eolang/io/stdout-test.eo b/eo-runtime/src/test/eo/org/eolang/io/stdout-test.eo index 868a4b1016..4ff6457e86 100644 --- a/eo-runtime/src/test/eo/org/eolang/io/stdout-test.eo +++ b/eo-runtime/src/test/eo/org/eolang/io/stdout-test.eo @@ -31,6 +31,6 @@ # Prints a simple message to the console. We can't validate # the output, so we just run it and see if it crashes. -[] > prints-to-console +[] > tests-prints-to-console stdout > @ "Hello, stdout-test!\n" diff --git a/eo-runtime/src/test/eo/org/eolang/io/tee-input-tests.eo b/eo-runtime/src/test/eo/org/eolang/io/tee-input-tests.eo index 039fe0f9b3..b43d095b15 100644 --- a/eo-runtime/src/test/eo/org/eolang/io/tee-input-tests.eo +++ b/eo-runtime/src/test/eo/org/eolang/io/tee-input-tests.eo @@ -33,7 +33,7 @@ +unlint broken-alias-second # This unit test is supposed to check the functionality of the corresponding object. -[] > reads-from-bytes-and-writes-to-memory +[] > tests-reads-from-bytes-and-writes-to-memory eq. > @ malloc.of 5 @@ -46,7 +46,7 @@ 01-02-03-04-05 # This unit test is supposed to check the functionality of the corresponding object. -[] > reads-from-bytes-and-writes-to-memory-by-portions +[] > tests-reads-from-bytes-and-writes-to-memory-by-portions eq. > @ malloc.of 5 @@ -63,7 +63,7 @@ 01-02-03-04-05 # This unit test is supposed to check the functionality of the corresponding object. -[] > reads-from-bytes-and-writes-to-two-memory-blocks +[] > tests-reads-from-bytes-and-writes-to-two-memory-blocks eq. > @ malloc.of 6 diff --git a/eo-runtime/src/test/eo/org/eolang/malloc-tests.eo b/eo-runtime/src/test/eo/org/eolang/malloc-tests.eo index 08dac84e9a..d068ac6a9b 100644 --- a/eo-runtime/src/test/eo/org/eolang/malloc-tests.eo +++ b/eo-runtime/src/test/eo/org/eolang/malloc-tests.eo @@ -29,7 +29,7 @@ +unlint broken-ref # This unit test is supposed to check the functionality of the corresponding object. -[] > writes-into-memory-of +[] > tests-writes-into-memory-of malloc.of > mem 8 [m] @@ -40,14 +40,14 @@ mem.eq 10 > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > puts-into-memory-for +[] > tests-puts-into-memory-for malloc.for > mem 0 m.put 10 > [m] mem.eq 10 > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > returns-size-from-scope +[] > tests-returns-size-from-scope eq. > @ malloc.of 5 @@ -55,7 +55,7 @@ 5 # This unit test is supposed to check the functionality of the corresponding object. -[] > malloc-scope-is-dataized-twice +[] > tests-malloc-scope-is-dataized-twice eq. > @ 2 malloc.for @@ -70,7 +70,7 @@ second # This unit test is supposed to check the functionality of the corresponding object. -[] > malloc-for-writes-first-init-value +[] > tests-malloc-for-writes-first-init-value eq. > @ malloc.for 42 @@ -78,7 +78,7 @@ 42 # This unit test is supposed to check the functionality of the corresponding object. -[] > malloc-puts-over-the-previous-data +[] > tests-malloc-puts-over-the-previous-data malloc.of > mem 13 [m] @@ -92,7 +92,7 @@ mem # This unit test is supposed to check the functionality of the corresponding object. -[] > malloc-rewrites-and-increments-itself +[] > tests-malloc-rewrites-and-increments-itself malloc.of > mem 8 [m] @@ -103,7 +103,7 @@ mem.eq 6 > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > writes-into-two-malloc-objects +[] > tests-writes-into-two-malloc-objects malloc.of > a 8 m.put 10 > [m] @@ -127,7 +127,7 @@ m.put "Much longer string!" > [m] # This unit test is supposed to check the functionality of the corresponding object. -[] > malloc-is-strictly-sized-int +[] > tests-malloc-is-strictly-sized-int eq. > @ malloc.for 12248 @@ -135,7 +135,7 @@ 2556 # This unit test is supposed to check the functionality of the corresponding object. -[] > malloc-is-strictly-typed-float +[] > tests-malloc-is-strictly-typed-float eq. > @ malloc.for 245.88 @@ -143,7 +143,7 @@ 82.22 # This unit test is supposed to check the functionality of the corresponding object. -[] > memory-is-strictly-sized-string +[] > tests-memory-is-strictly-sized-string eq. > @ malloc.for "Hello" @@ -151,19 +151,19 @@ "Proto" # This unit test is supposed to check the functionality of the corresponding object. -[] > malloc-is-strictly-typed-bool +[] > tests-malloc-is-strictly-typed-bool malloc.for > @ false m.put true > [m] # This unit test is supposed to check the functionality of the corresponding object. -[] > malloc-gives-id-to-allocated-block +[] > tests-malloc-gives-id-to-allocated-block malloc.of > @ 1 m.put (m.id.gt 0) > [m] # This unit test is supposed to check the functionality of the corresponding object. -[] > malloc-allocates-right-size-block +[] > tests-malloc-allocates-right-size-block malloc.of > @ 1 [b] @@ -172,7 +172,7 @@ b.put (m.size.eq 10) > [m] >> # This unit test is supposed to check the functionality of the corresponding object. -[] > malloc-writes-and-reads +[] > tests-malloc-writes-and-reads malloc.of > @ 1 [b] @@ -189,7 +189,7 @@ "Hello, Jeff!" # This unit test is supposed to check the functionality of the corresponding object. -[] > malloc-concacts-strings-with-offset +[] > tests-malloc-concacts-strings-with-offset malloc.of > @ 1 [b] @@ -210,7 +210,7 @@ m.write 1 true > [m] # This unit test is supposed to check the functionality of the corresponding object. -[] > malloc-reads-with-offset-and-length +[] > tests-malloc-reads-with-offset-and-length malloc.of > @ 1 [b] @@ -224,7 +224,7 @@ (m.read 2 5).eq "Hello" # Creates memory block of zero bytes (this should be a legal operation) -[] > allocates-zero-bytes +[] > tests-allocates-zero-bytes eq. > @ 0 malloc.of @@ -232,7 +232,7 @@ m.size > [m] # This unit test is supposed to check the functionality of the corresponding object. -[] > malloc-increases-block-size +[] > tests-malloc-increases-block-size malloc.of > @ 1 [b] @@ -245,7 +245,7 @@ m.get.eq 01-02-03-04-00-00 # This unit test is supposed to check the functionality of the corresponding object. -[] > malloc-decreases-block-size +[] > tests-malloc-decreases-block-size malloc.of > @ 1 [b] @@ -264,12 +264,12 @@ m.resized -1 > [m] # This unit test is supposed to check the functionality of the corresponding object. -[] > malloc-empty-is-empty +[] > tests-malloc-empty-is-empty malloc.empty > @ m.size.eq 0 > [m] # This unit test is supposed to check the functionality of the corresponding object. -[] > copies-data-inside-itself +[] > tests-copies-data-inside-itself malloc.for > @ 01-02-03-04-05 [m] @@ -278,7 +278,7 @@ m.get.eq 01-02-02-03-05 # This unit test is supposed to check the functionality of the corresponding object. -[] > copies-data-from-start-to-end +[] > tests-copies-data-from-start-to-end malloc.for > @ 01-02-03-04-05-06 [m] diff --git a/eo-runtime/src/test/eo/org/eolang/math/angle-tests.eo b/eo-runtime/src/test/eo/org/eolang/math/angle-tests.eo index 051948dd07..757fec26ab 100644 --- a/eo-runtime/src/test/eo/org/eolang/math/angle-tests.eo +++ b/eo-runtime/src/test/eo/org/eolang/math/angle-tests.eo @@ -31,37 +31,37 @@ +unlint broken-alias-second # This unit test is supposed to check the functionality of the corresponding object. -[] > sin-zero +[] > tests-sin-zero eq. > @ (angle 0).sin 0 # This unit test is supposed to check the functionality of the corresponding object. -[] > sin-pi-div-2 +[] > tests-sin-pi-div-2 eq. > @ (angle (pi.div 2)).sin 1 # This unit test is supposed to check the functionality of the corresponding object. -[] > sin-pi-floored +[] > tests-sin-pi-floored eq. > @ (angle pi).sin.floor 0 # This unit test is supposed to check the functionality of the corresponding object. -[] > cos-zero +[] > tests-cos-zero eq. > @ (angle 0).cos 1 # This unit test is supposed to check the functionality of the corresponding object. -[] > cos-pi-div-2-floored +[] > tests-cos-pi-div-2-floored eq. > @ (angle (pi.div 2)).cos.floor 0 # This unit test is supposed to check the functionality of the corresponding object. -[] > cos-pi +[] > tests-cos-pi eq. > @ (angle pi).cos -1 diff --git a/eo-runtime/src/test/eo/org/eolang/math/integral-tests.eo b/eo-runtime/src/test/eo/org/eolang/math/integral-tests.eo index 91fab63596..0866c969d6 100644 --- a/eo-runtime/src/test/eo/org/eolang/math/integral-tests.eo +++ b/eo-runtime/src/test/eo/org/eolang/math/integral-tests.eo @@ -30,7 +30,7 @@ +unlint broken-alias-second # This unit test is supposed to check the functionality of the corresponding object. -[] > calculates-lineal-integral +[] > tests-calculates-lineal-integral as-number. > lineal integral x > [x] @@ -57,7 +57,7 @@ value.neg # This unit test is supposed to check the functionality of the corresponding object. -[] > calculates-quadratic-integral +[] > tests-calculates-quadratic-integral as-number. > quadratic integral x.times x > [x] @@ -84,7 +84,7 @@ value.neg # This unit test is supposed to check the functionality of the corresponding object. -[] > calculates-cube-integral +[] > tests-calculates-cube-integral as-number. > cube integral (x.times x).times x > [x] diff --git a/eo-runtime/src/test/eo/org/eolang/math/numbers-tests.eo b/eo-runtime/src/test/eo/org/eolang/math/numbers-tests.eo index d50ba5b242..dfe90364f4 100644 --- a/eo-runtime/src/test/eo/org/eolang/math/numbers-tests.eo +++ b/eo-runtime/src/test/eo/org/eolang/math/numbers-tests.eo @@ -36,49 +36,49 @@ (numbers *).min > [] > throws-on-taking-min-from-empty-sequence-of-numbers # This unit test is supposed to check the functionality of the corresponding object. -[] > max-of-one-item-array +[] > tests-max-of-one-item-array eq. > @ (numbers (* 42)).max 42 # This unit test is supposed to check the functionality of the corresponding object. -[] > min-of-one-item-array +[] > tests-min-of-one-item-array eq. > @ (numbers (* 42)).min 42 # This unit test is supposed to check the functionality of the corresponding object. -[] > max-of-array-is-first +[] > tests-max-of-array-is-first eq. > @ (numbers (* 25 12 -2)).max 25 # This unit test is supposed to check the functionality of the corresponding object. -[] > max-of-array-is-in-the-center +[] > tests-max-of-array-is-in-the-center eq. > @ (numbers (* 12 25 -2)).max 25 # This unit test is supposed to check the functionality of the corresponding object. -[] > max-of-array-is-last +[] > tests-max-of-array-is-last eq. > @ (numbers (* 12 -2 25)).max 25 # This unit test is supposed to check the functionality of the corresponding object. -[] > min-of-array-is-first +[] > tests-min-of-array-is-first eq. > @ (numbers (* -2 25 12)).min -2 # This unit test is supposed to check the functionality of the corresponding object. -[] > min-of-array-is-in-the-center +[] > tests-min-of-array-is-in-the-center eq. > @ (numbers (* 12 -2 25)).min -2 # This unit test is supposed to check the functionality of the corresponding object. -[] > min-of-array-is-last +[] > tests-min-of-array-is-last eq. > @ (numbers (* 12 25 -2)).min -2 diff --git a/eo-runtime/src/test/eo/org/eolang/math/random-tests.eo b/eo-runtime/src/test/eo/org/eolang/math/random-tests.eo index 45760db6ef..5562479710 100644 --- a/eo-runtime/src/test/eo/org/eolang/math/random-tests.eo +++ b/eo-runtime/src/test/eo/org/eolang/math/random-tests.eo @@ -30,7 +30,7 @@ +unlint broken-alias-second # This unit test is supposed to check the functionality of the corresponding object. -[] > random-with-seed +[] > tests-random-with-seed random 51 > r not. > @ eq. @@ -38,13 +38,13 @@ r.next.next # This unit test is supposed to check the functionality of the corresponding object. -[] > seeded-randoms-are-equal +[] > tests-seeded-randoms-are-equal eq. > @ (random 1654).next.next.next (random 1654).next.next.next # This unit test is supposed to check the functionality of the corresponding object. -[] > random-is-in-range +[] > tests-random-is-in-range (random 123).fixed > r and. > @ and. @@ -59,6 +59,6 @@ (r.next.next.lt 0).not # This unit test is supposed to check the functionality of the corresponding object. -[] > two-random-numbers-not-equal +[] > tests-two-random-numbers-not-equal not. > @ random.pseudo.eq random.pseudo diff --git a/eo-runtime/src/test/eo/org/eolang/math/real-tests.eo b/eo-runtime/src/test/eo/org/eolang/math/real-tests.eo index 4ac933e541..7422cd16d6 100644 --- a/eo-runtime/src/test/eo/org/eolang/math/real-tests.eo +++ b/eo-runtime/src/test/eo/org/eolang/math/real-tests.eo @@ -32,61 +32,61 @@ +unlint broken-alias-second # This unit test is supposed to check the functionality of the corresponding object. -[] > abs-int-positive +[] > tests-abs-int-positive eq. > @ (real 3).abs 3 # This unit test is supposed to check the functionality of the corresponding object. -[] > abs-int-negative +[] > tests-abs-int-negative eq. > @ (real -3).abs 3 # This unit test is supposed to check the functionality of the corresponding object. -[] > abs-zero +[] > tests-abs-zero eq. > @ (real 0).abs 0 # This unit test is supposed to check the functionality of the corresponding object. -[] > abs-float-positive +[] > tests-abs-float-positive eq. > @ (real 13.5).abs 13.5 # This unit test is supposed to check the functionality of the corresponding object. -[] > abs-float-negative +[] > tests-abs-float-negative eq. > @ (real -17.9).abs 17.9 # This unit test is supposed to check the functionality of the corresponding object. -[] > mod-1-2 +[] > tests-mod-n1-n2 eq. > @ (real 1).mod 2 1 # This unit test is supposed to check the functionality of the corresponding object. -[] > mod-0-5 +[] > tests-mod-n0-n5 eq. > @ (real 0).mod 5 0 # This unit test is supposed to check the functionality of the corresponding object. -[] > mod-0-15-neg +[] > tests-mod-n0-n15-neg eq. > @ (real 0).mod -15 0 # This unit test is supposed to check the functionality of the corresponding object. -[] > mod-1-neg-7 +[] > tests-mod-n1-neg-n7 eq. > @ (real -1).mod 7 -1 # This unit test is supposed to check the functionality of the corresponding object. -[] > mod-16-200-neg +[] > tests-mod-n16-n200-neg eq. > @ (real 16).mod -200 16 @@ -94,7 +94,7 @@ # This unit test is supposed to check the functionality of the corresponding object. # Checks mathematical equality # A = ((A div B) * B) + (A mod B) -[] > div-mod-compatibility +[] > tests-div-mod-compatibility -13 > dividend 5 > divisor (real dividend).mod divisor > remainder @@ -109,44 +109,44 @@ # This unit test is supposed to check the functionality of the corresponding object. # Checks modulo: dividend < divisor. -[] > mod-dividend-less-than-divisor +[] > tests-mod-dividend-less-than-divisor eq. > @ (real -1).mod 5 -1 # This unit test is supposed to check the functionality of the corresponding object. # Checks modulo by 1. -[] > mod-dividend-by-one +[] > tests-mod-dividend-by-one eq. > @ (real 133).mod 1 0 # This unit test is supposed to check the functionality of the corresponding object. -[] > pow-test +[] > tests-pow-test eq. > @ (real 2).pow 4 16 # This unit test is supposed to check the functionality of the corresponding object. -[] > pow-is-zero +[] > tests-pow-is-zero eq. > @ (real 2).pow 0 1 # This unit test is supposed to check the functionality of the corresponding object. -[] > pow-is-negative +[] > tests-pow-is-negative eq. > @ (real 984782).pow -12341 0 # This unit test is supposed to check the functionality of the corresponding object. -[] > pow-of-two +[] > tests-pow-of-two eq. > @ (real 3).pow 2 9 # This unit test is supposed to check the functionality of the corresponding object. -[] > pow-of-zero +[] > tests-pow-of-zero eq. > @ (real 0).pow 145 0 @@ -157,217 +157,217 @@ # This unit test is supposed to check the functionality of the corresponding object. # Check pow works with NaNs. -[] > nan-to-the-pow-of-nan-is-nan +[] > tests-nan-to-the-pow-of-nan-is-nan is-nan. > @ (real nan).pow nan # This unit test is supposed to check the functionality of the corresponding object. -[] > nan-to-the-pow-of-any-is-nan +[] > tests-nan-to-the-pow-of-any-is-nan is-nan. > @ (real nan).pow 42 # This unit test is supposed to check the functionality of the corresponding object. -[] > any-to-the-pow-of-nan-is-nan +[] > tests-any-to-the-pow-of-nan-is-nan is-nan. > @ (real 52).pow nan # This unit test is supposed to check the functionality of the corresponding object. # Check if pow is zero. -[] > any-int-to-the-pow-of-zero-is-one +[] > tests-any-int-to-the-pow-of-zero-is-one eq. > @ (real 42).pow 0 1 # This unit test is supposed to check the functionality of the corresponding object. -[] > any-float-to-the-pow-of-zero-is-one +[] > tests-any-float-to-the-pow-of-zero-is-one eq. > @ (real 42.5).pow 0 1 # This unit test is supposed to check the functionality of the corresponding object. # Check if pow is less than zero -[] > zero-to-the-negative-pow-is-positive-infinity +[] > tests-zero-to-the-negative-pow-is-positive-infinity eq. > @ (real 0).pow -52 positive-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > zero-to-the-negative-infinity-pow-is-positive-infinity +[] > tests-zero-to-the-negative-infinity-pow-is-positive-infinity eq. > @ (real 0).pow negative-infinity positive-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-int-to-the-pow-of-negative-infinity-is-zero +[] > tests-positive-int-to-the-pow-of-negative-infinity-is-zero eq. > @ (real 42).pow negative-infinity 0 # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-float-to-the-pow-of-negative-infinity-is-zero +[] > tests-positive-float-to-the-pow-of-negative-infinity-is-zero eq. > @ (real 42.5).pow negative-infinity 0 # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-int-to-the-pow-of-negative-infinity-is-zero +[] > tests-negative-int-to-the-pow-of-negative-infinity-is-zero eq. > @ (real -42).pow negative-infinity 0 # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-float-to-the-pow-of-negative-infinity-is-zero +[] > tests-negative-float-to-the-pow-of-negative-infinity-is-zero eq. > @ (real -42.5).pow negative-infinity 0 # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-to-the-pow-of-negative-infinity-is-zero +[] > tests-positive-infinity-to-the-pow-of-negative-infinity-is-zero eq. > @ (real positive-infinity).pow negative-infinity 0 # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-to-the-pow-of-negative-infinity-is-zero +[] > tests-negative-infinity-to-the-pow-of-negative-infinity-is-zero eq. > @ (real negative-infinity).pow negative-infinity 0 # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-to-the-finite-negative-int-pow-is-zero +[] > tests-positive-infinity-to-the-finite-negative-int-pow-is-zero eq. > @ (real positive-infinity).pow -42 0 # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-to-the-finite-negative-float-pow-is-zero +[] > tests-positive-infinity-to-the-finite-negative-float-pow-is-zero eq. > @ (real positive-infinity).pow -42.2 0.0 # This unit test is supposed to check the functionality of the corresponding object. -[] > two-to-the-pow-of-minus-one +[] > tests-two-to-the-pow-of-minus-one eq. > @ (real 2).pow -1 0.5 # This unit test is supposed to check the functionality of the corresponding object. -[] > two-to-the-pow-of-int-minus-two +[] > tests-two-to-the-pow-of-int-minus-two eq. > @ (real 2).pow -2 0.25 # This unit test is supposed to check the functionality of the corresponding object. -[] > two-to-the-pow-of-minus-three +[] > tests-two-to-the-pow-of-minus-three eq. > @ (real 2).pow -3 0.125 # This unit test is supposed to check the functionality of the corresponding object. -[] > four-to-the-pow-of-minus-three +[] > tests-four-to-the-pow-of-minus-three eq. > @ (real 4).pow -3.0 0.015625 # This unit test is supposed to check the functionality of the corresponding object. # Check if pow more than zero. -[] > zero-to-the-pow-of-positive-int-is-zero +[] > tests-zero-to-the-pow-of-positive-int-is-zero eq. > @ (real 0).pow 4 0 # This unit test is supposed to check the functionality of the corresponding object. -[] > zero-to-the-pow-of-positive-float-is-zero +[] > tests-zero-to-the-pow-of-positive-float-is-zero eq. > @ (real 0).pow 4.2 0 # This unit test is supposed to check the functionality of the corresponding object. -[] > zero-to-the-pow-of-positive-infinity-is-zero +[] > tests-zero-to-the-pow-of-positive-infinity-is-zero eq. > @ (real 0).pow positive-infinity 0 # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-int-to-the-pow-of-positive-infinity-is-positive-infinity +[] > tests-negative-int-to-the-pow-of-positive-infinity-is-positive-infinity eq. > @ (real -10).pow positive-infinity positive-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-float-to-the-pow-of-positive-infinity-is-infinity +[] > tests-negative-float-to-the-pow-of-positive-infinity-is-infinity eq. > @ (real -4.2).pow positive-infinity positive-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-int-to-the-pow-of-positive-infinity-is-positive-infinity +[] > tests-positive-int-to-the-pow-of-positive-infinity-is-positive-infinity eq. > @ (real 42).pow positive-infinity positive-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-float-to-the-pow-of-positive-infinity-is-positive-infinity +[] > tests-positive-float-to-the-pow-of-positive-infinity-is-positive-infinity eq. > @ (real 42.5).pow positive-infinity positive-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-to-the-pow-of-positive-int-is-positive-infinity +[] > tests-positive-infinity-to-the-pow-of-positive-int-is-positive-infinity eq. > @ (real positive-infinity).pow 42 positive-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-to-the-pow-of-positive-float-is-positive-infinity +[] > tests-positive-infinity-to-the-pow-of-positive-float-is-positive-infinity eq. > @ (real positive-infinity).pow 10.8 positive-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-to-the-pow-of-positive-infinity-is-positive-infinity +[] > tests-positive-infinity-to-the-pow-of-positive-infinity-is-positive-infinity eq. > @ (real positive-infinity).pow positive-infinity positive-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-to-the-pow-of-positive-float-is-positive-infinity +[] > tests-negative-infinity-to-the-pow-of-positive-float-is-positive-infinity eq. > @ (real negative-infinity).pow 9.9 positive-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-to-the-pow-of-even-positive-int-is-positive-infinity +[] > tests-negative-infinity-to-the-pow-of-even-positive-int-is-positive-infinity eq. > @ (real negative-infinity).pow 10 positive-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-to-the-pow-of-odd-positive-int-is-positive-infinity +[] > tests-negative-infinity-to-the-pow-of-odd-positive-int-is-positive-infinity eq. > @ (real negative-infinity).pow 9 negative-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-int-to-the-pow-of-positive-int-is-int +[] > tests-positive-int-to-the-pow-of-positive-int-is-int eq. > @ (real 2).pow 3 8 # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-float-to-the-pow-of-positive-int-is-float +[] > tests-positive-float-to-the-pow-of-positive-int-is-float eq. > @ (real 3.5).pow 4 150.0625 # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-int-to-the-pow-of-positive-float-is-float +[] > tests-positive-int-to-the-pow-of-positive-float-is-float eq. > @ (real 4).pow 5 1024 # This unit test is supposed to check the functionality of the corresponding object. -[] > sqrt-check-zero-input +[] > tests-sqrt-check-zero-input lt. > @ abs. real @@ -378,13 +378,13 @@ 0.00000000001 # This unit test is supposed to check the functionality of the corresponding object. -[] > sqrt-check-negative-input +[] > tests-sqrt-check-negative-input is-nan. > @ sqrt. real -0.1 # This unit test is supposed to check the functionality of the corresponding object. -[] > sqrt-check-float-input +[] > tests-sqrt-check-float-input lt. > @ abs. real @@ -396,7 +396,7 @@ 0.00000000001 # This unit test is supposed to check the functionality of the corresponding object. -[] > sqrt-check-int-input +[] > tests-sqrt-check-int-input lt. > @ abs. real @@ -408,87 +408,87 @@ 0.00000000001 # This unit test is supposed to check the functionality of the corresponding object. -[] > sqrt-check-nan-input +[] > tests-sqrt-check-nan-input is-nan. > @ sqrt. real nan # This unit test is supposed to check the functionality of the corresponding object. -[] > sqrt-check-infinity-1 +[] > tests-sqrt-check-infinity-n1 eq. > @ sqrt. real positive-infinity positive-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > sqrt-check-infinity-2 +[] > tests-sqrt-check-infinity-n2 is-nan. > @ sqrt. real negative-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > ln-of-negative-float-is-nan +[] > tests-ln-of-negative-float-is-nan is-nan. > @ ln. real -2.2 # This unit test is supposed to check the functionality of the corresponding object. -[] > ln-of-zero-is-negative-infinity +[] > tests-ln-of-zero-is-negative-infinity eq. > @ ln. real 0 negative-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > ln-of-one-is-zero +[] > tests-ln-of-one-is-zero eq. > @ ln. real 1 0 # This unit test is supposed to check the functionality of the corresponding object. -[] > ln-of-e-one-is-one +[] > tests-ln-of-e-one-is-one eq. > @ ln. real e 1 # This unit test is supposed to check the functionality of the corresponding object. -[] > ln-of-negative-int-is-nan +[] > tests-ln-of-negative-int-is-nan is-nan. > @ ln. real -42 # This unit test is supposed to check the functionality of the corresponding object. -[] > ln-of-int-zero-is-negative-infinity +[] > tests-ln-of-int-zero-is-negative-infinity eq. > @ ln. real 0 negative-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > ln-of-int-one-is-zero +[] > tests-ln-of-int-one-is-zero eq. > @ ln. real 1 0 # This unit test is supposed to check the functionality of the corresponding object. -[] > ln-of-twenty +[] > tests-ln-of-twenty eq. > @ ln. real 20 2.995732273553991 # This unit test is supposed to check the functionality of the corresponding object. -[] > arccos-negative-one-test +[] > tests-arccos-negative-one-test eq. > @ acos. real -1.0 pi # This unit test is supposed to check the functionality of the corresponding object. -[] > arccos-zero-test +[] > tests-arccos-zero-test eq. > @ acos. real 0 @@ -497,14 +497,14 @@ 2 # This unit test is supposed to check the functionality of the corresponding object. -[] > arccos-one-test +[] > tests-arccos-one-test eq. > @ acos. real 1.0 0 # This unit test is supposed to check the functionality of the corresponding object. -[] > arccos-positive-calculated-test +[] > tests-arccos-positive-calculated-test lt. > @ abs. real @@ -515,7 +515,7 @@ 0.000001 # This unit test is supposed to check the functionality of the corresponding object. -[] > arccos-negative-calculated-test +[] > tests-arccos-negative-calculated-test lt. > @ abs. real @@ -526,18 +526,18 @@ 0.000001 # This unit test is supposed to check the functionality of the corresponding object. -[] > arccos-nan-positive-value-test +[] > tests-arccos-nan-positive-value-test is-nan. > @ acos. real 2.0 # This unit test is supposed to check the functionality of the corresponding object. -[] > arccos-nan-negative-value-test +[] > tests-arccos-nan-negative-value-test is-nan. > @ (real -2.0).acos # This unit test is supposed to check the functionality of the corresponding object. -[] > exp-check-0 +[] > tests-exp-check-n0 lt. > @ abs. real @@ -547,7 +547,7 @@ 0.00000001 # This unit test is supposed to check the functionality of the corresponding object. -[] > exp-check-1 +[] > tests-exp-check-n1 lt. > @ abs. real @@ -557,7 +557,7 @@ 0.00000001 # This unit test is supposed to check the functionality of the corresponding object. -[] > exp-check-2 +[] > tests-exp-check-n2 lt. > @ abs. real @@ -567,7 +567,7 @@ 0.00000001 # This unit test is supposed to check the functionality of the corresponding object. -[] > exp-check-3 +[] > tests-exp-check-n3 lt. > @ abs. real @@ -577,7 +577,7 @@ 0.0000001 # This unit test is supposed to check the functionality of the corresponding object. -[] > exp-check-4 +[] > tests-exp-check-n4 lt. > @ abs. real @@ -587,18 +587,18 @@ 0.000000000001 # This unit test is supposed to check the functionality of the corresponding object. -[] > exp-check-nan +[] > tests-exp-check-nan is-nan. > @ (real nan).exp # This unit test is supposed to check the functionality of the corresponding object. -[] > exp-check-infinity-1 +[] > tests-exp-check-infinity-n1 eq. > @ (real positive-infinity).exp positive-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > exp-check-infinity-2 +[] > tests-exp-check-infinity-n2 eq. > @ (real negative-infinity).exp 0 diff --git a/eo-runtime/src/test/eo/org/eolang/nan-tests.eo b/eo-runtime/src/test/eo/org/eolang/nan-tests.eo index 446ef988a5..3f181be5c4 100644 --- a/eo-runtime/src/test/eo/org/eolang/nan-tests.eo +++ b/eo-runtime/src/test/eo/org/eolang/nan-tests.eo @@ -28,123 +28,123 @@ +unlint object-has-data # This unit test is supposed to check the functionality of the corresponding object. -[] > nan-not-eq-number +[] > tests-nan-not-eq-number not. > @ eq. nan 42 # This unit test is supposed to check the functionality of the corresponding object. -[] > nan-not-eq-nan +[] > tests-nan-not-eq-nan not. > @ eq. nan nan # This unit test is supposed to check the functionality of the corresponding object. -[] > nan-not-lt-number +[] > tests-nan-not-lt-number eq. > @ nan.lt 42 false # This unit test is supposed to check the functionality of the corresponding object. -[] > nan-not-lt-nan +[] > tests-nan-not-lt-nan eq. > @ nan.lt nan false # This unit test is supposed to check the functionality of the corresponding object. -[] > nan-not-lte-number +[] > tests-nan-not-lte-number eq. > @ nan.lte 42 false # This unit test is supposed to check the functionality of the corresponding object. -[] > nan-not-lte-nan +[] > tests-nan-not-lte-nan eq. > @ nan.lte nan false # This unit test is supposed to check the functionality of the corresponding object. -[] > nan-not-gt-number +[] > tests-nan-not-gt-number eq. > @ nan.gt 42 false # This unit test is supposed to check the functionality of the corresponding object. -[] > nan-not-gt-nan +[] > tests-nan-not-gt-nan eq. > @ nan.gt nan false # This unit test is supposed to check the functionality of the corresponding object. -[] > nan-not-gte-number +[] > tests-nan-not-gte-number eq. > @ nan.gte 42 false # This unit test is supposed to check the functionality of the corresponding object. -[] > nan-not-gte-nan +[] > tests-nan-not-gte-nan eq. > @ nan.gte nan false # This unit test is supposed to check the functionality of the corresponding object. -[] > nan-times-number-is-nan +[] > tests-nan-times-number-is-nan eq. > @ (nan.times 42).as-bytes nan.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > nan-times-nan-is-nan +[] > tests-nan-times-nan-is-nan eq. > @ (nan.times nan).as-bytes nan.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > nan-div-number-is-nan +[] > tests-nan-div-number-is-nan eq. > @ (nan.div 42).as-bytes nan.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > nan-div-nan-is-nan +[] > tests-nan-div-nan-is-nan eq. > @ (nan.div nan).as-bytes nan.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > nan-plus-number-is-nan +[] > tests-nan-plus-number-is-nan eq. > @ (nan.plus 42).as-bytes nan.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > nan-plus-nan-is-nan +[] > tests-nan-plus-nan-is-nan eq. > @ (nan.plus nan).as-bytes nan.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > nan-neg-is-nan +[] > tests-nan-neg-is-nan eq. > @ nan.neg.as-bytes nan.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > nan-minus-number-is-nan +[] > tests-nan-minus-number-is-nan eq. > @ (nan.minus 42).as-bytes nan.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > nan-minus-nan-is-nan +[] > tests-nan-minus-nan-is-nan eq. > @ (nan.minus nan).as-bytes nan.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > nan-as-bytes-is-bytes-of-zero-div-zero +[] > tests-nan-as-bytes-is-bytes-of-zero-div-zero eq. > @ nan.as-bytes (0.0.div 0.0).as-bytes diff --git a/eo-runtime/src/test/eo/org/eolang/negative-infinity-tests.eo b/eo-runtime/src/test/eo/org/eolang/negative-infinity-tests.eo index 235521b2d4..35b27fe56e 100644 --- a/eo-runtime/src/test/eo/org/eolang/negative-infinity-tests.eo +++ b/eo-runtime/src/test/eo/org/eolang/negative-infinity-tests.eo @@ -28,417 +28,417 @@ +unlint object-has-data # Equal to. -[] > negative-infinity-is-equal-to-one-div-zero +[] > tests-negative-infinity-is-equal-to-one-div-zero eq. > @ negative-infinity -1.0.div 0.0 # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-eq-negative-infinity +[] > tests-negative-infinity-eq-negative-infinity eq. > @ negative-infinity negative-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-not-eq-positive-infinity +[] > tests-negative-infinity-not-eq-positive-infinity not. > @ eq. negative-infinity positive-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-not-eq-nan +[] > tests-negative-infinity-not-eq-nan not. > @ eq. negative-infinity nan # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-not-eq-int +[] > tests-negative-infinity-not-eq-int not. > @ eq. negative-infinity 42 # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-not-eq-float +[] > tests-negative-infinity-not-eq-float not. > @ eq. negative-infinity 42.5 # Less than. -[] > negative-infinity-lt-negative-infinity +[] > tests-negative-infinity-lt-negative-infinity eq. > @ negative-infinity.lt negative-infinity false # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-lt-positive-infinity +[] > tests-negative-infinity-lt-positive-infinity eq. > @ negative-infinity.lt positive-infinity true # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-not-lt-nan +[] > tests-negative-infinity-not-lt-nan eq. > @ negative-infinity.lt nan false # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-lt-int +[] > tests-negative-infinity-lt-int lt. > @ negative-infinity 42 # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-lt-float +[] > tests-negative-infinity-lt-float lt. > @ negative-infinity 42.5 # Less or equal than. -[] > negative-infinity-lte-negative-infinity +[] > tests-negative-infinity-lte-negative-infinity eq. > @ negative-infinity.lte negative-infinity true # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-lte-positive-infinity +[] > tests-negative-infinity-lte-positive-infinity eq. > @ negative-infinity.lte positive-infinity true # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-not-lte-nan +[] > tests-negative-infinity-not-lte-nan eq. > @ negative-infinity.lte nan false # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-lte-int +[] > tests-negative-infinity-lte-int eq. > @ negative-infinity.lte 42 true # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-lte-float +[] > tests-negative-infinity-lte-float eq. > @ negative-infinity.lte 42.5 true # Greater than. -[] > negative-infinity-gt-negative-infinity +[] > tests-negative-infinity-gt-negative-infinity not. > @ gt. negative-infinity negative-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-not-gt-positive-infinity +[] > tests-negative-infinity-not-gt-positive-infinity eq. > @ negative-infinity.gt positive-infinity false # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-not-gt-nan +[] > tests-negative-infinity-not-gt-nan eq. > @ negative-infinity.gt nan false # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-not-gt-int +[] > tests-negative-infinity-not-gt-int eq. > @ negative-infinity.gt 42 false # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-not-gt-float +[] > tests-negative-infinity-not-gt-float eq. > @ negative-infinity.gt 42.5 false # Greater or equal than. -[] > negative-infinity-gte-negative-infinity +[] > tests-negative-infinity-gte-negative-infinity eq. > @ negative-infinity.gte negative-infinity true # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-not-gte-positive-infinity +[] > tests-negative-infinity-not-gte-positive-infinity eq. > @ negative-infinity.gte positive-infinity false # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-not-gte-nan +[] > tests-negative-infinity-not-gte-nan eq. > @ negative-infinity.gte nan false # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-not-gte-int +[] > tests-negative-infinity-not-gte-int eq. > @ negative-infinity.gte 42 false # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-not-gte-float +[] > tests-negative-infinity-not-gte-float eq. > @ negative-infinity.gte 42.5 false # Times. # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-times-float-zero +[] > tests-negative-infinity-times-float-zero eq. > @ as-bytes. negative-infinity.times 0.0 nan.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-times-neg-float-zero +[] > tests-negative-infinity-times-neg-float-zero eq. > @ as-bytes. negative-infinity.times -0.0 nan.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-times-int-zero +[] > tests-negative-infinity-times-int-zero eq. > @ as-bytes. positive-infinity.times 0 nan.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-times-nan +[] > tests-negative-infinity-times-nan eq. > @ as-bytes. negative-infinity.times nan nan.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-times-positive-infinity +[] > tests-negative-infinity-times-positive-infinity eq. > @ negative-infinity.times positive-infinity negative-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-times-negative-infinity +[] > tests-negative-infinity-times-negative-infinity eq. > @ negative-infinity.times negative-infinity positive-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-times-positive-float +[] > tests-negative-infinity-times-positive-float eq. > @ negative-infinity.times 42.5 negative-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-times-positive-int +[] > tests-negative-infinity-times-positive-int eq. > @ negative-infinity.times 42 negative-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-times-negative-float +[] > tests-negative-infinity-times-negative-float eq. > @ negative-infinity.times -42.5 positive-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-times-negative-int +[] > tests-negative-infinity-times-negative-int eq. > @ negative-infinity.times -42 positive-infinity # Plus # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-plus-nan +[] > tests-negative-infinity-plus-nan eq. > @ as-bytes. negative-infinity.plus nan nan.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-plus-positive-infinity +[] > tests-negative-infinity-plus-positive-infinity eq. > @ as-bytes. negative-infinity.plus positive-infinity nan.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-plus-negative-infinity +[] > tests-negative-infinity-plus-negative-infinity eq. > @ negative-infinity negative-infinity.plus negative-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-plus-positive-float +[] > tests-negative-infinity-plus-positive-float eq. > @ negative-infinity.plus 42.5 negative-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-plus-positive-int +[] > tests-negative-infinity-plus-positive-int eq. > @ negative-infinity.plus 42 negative-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-plus-negative-float +[] > tests-negative-infinity-plus-negative-float eq. > @ negative-infinity.plus -42.5 negative-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-plus-negative-int +[] > tests-negative-infinity-plus-negative-int eq. > @ negative-infinity.plus -42 negative-infinity # Negation. # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-neg-is-positive-infinity +[] > tests-negative-infinity-neg-is-positive-infinity eq. > @ negative-infinity.neg positive-infinity # Minus. # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-minus-nan +[] > tests-negative-infinity-minus-nan eq. > @ as-bytes. negative-infinity.minus nan nan.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-minus-negative-infinity +[] > tests-negative-infinity-minus-negative-infinity eq. > @ as-bytes. negative-infinity.minus negative-infinity nan.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-minus-positive-infinity +[] > tests-negative-infinity-minus-positive-infinity eq. > @ negative-infinity.minus positive-infinity negative-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-minus-positive-float +[] > tests-negative-infinity-minus-positive-float eq. > @ negative-infinity.minus 42.5 negative-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-minus-positive-int +[] > tests-negative-infinity-minus-positive-int eq. > @ negative-infinity.minus 42 negative-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-minus-negative-float +[] > tests-negative-infinity-minus-negative-float eq. > @ negative-infinity.minus -42.5 negative-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-minus-negative-int +[] > tests-negative-infinity-minus-negative-int eq. > @ negative-infinity.minus -42 negative-infinity # Division # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-div-float-zero +[] > tests-negative-infinity-div-float-zero eq. > @ negative-infinity.div 0.0 negative-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-div-neg-float-zero +[] > tests-negative-infinity-div-neg-float-zero eq. > @ negative-infinity.div -0.0 positive-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-div-int-zero +[] > tests-negative-infinity-div-int-zero eq. > @ negative-infinity.div 0 negative-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-div-neg-int-zero +[] > tests-negative-infinity-div-neg-int-zero eq. > @ negative-infinity.div -0 positive-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-div-nan +[] > tests-negative-infinity-div-nan eq. > @ as-bytes. negative-infinity.div nan nan.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-div-positive-infinity +[] > tests-negative-infinity-div-positive-infinity eq. > @ as-bytes. negative-infinity.div positive-infinity nan.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-div-negative-infinity +[] > tests-negative-infinity-div-negative-infinity eq. > @ as-bytes. negative-infinity.div negative-infinity nan.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-div-positive-float +[] > tests-negative-infinity-div-positive-float eq. > @ negative-infinity.div 42.5 negative-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-div-positive-int +[] > tests-negative-infinity-div-positive-int eq. > @ negative-infinity.div 42 negative-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-div-negative-float +[] > tests-negative-infinity-div-negative-float eq. > @ negative-infinity.div -42.5 positive-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-div-negative-int +[] > tests-negative-infinity-div-negative-int eq. > @ negative-infinity.div -42 positive-infinity # Bytes. # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-as-bytes-is-valid +[] > tests-negative-infinity-as-bytes-is-valid eq. > @ negative-infinity.as-bytes (-1.0.div 0.0).as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-floor-is-equal-to-self +[] > tests-negative-infinity-floor-is-equal-to-self negative-infinity.floor.eq negative-infinity > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-is-not-nan +[] > tests-negative-infinity-is-not-nan negative-infinity.is-nan.not > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-is-not-finite +[] > tests-negative-infinity-is-not-finite negative-infinity.is-finite.not > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > negative-infinity-is-not-integer +[] > tests-negative-infinity-is-not-integer negative-infinity.is-integer.not > @ diff --git a/eo-runtime/src/test/eo/org/eolang/number-tests.eo b/eo-runtime/src/test/eo/org/eolang/number-tests.eo index f73efedffc..7e69594837 100644 --- a/eo-runtime/src/test/eo/org/eolang/number-tests.eo +++ b/eo-runtime/src/test/eo/org/eolang/number-tests.eo @@ -28,13 +28,13 @@ +unlint object-has-data # This unit test is supposed to check the functionality of the corresponding object. -[] > int-less-true +[] > tests-int-less-true lt. > @ 10 50 # This unit test is supposed to check the functionality of the corresponding object. -[] > int-less-equal +[] > tests-int-less-equal eq. > @ not. lt. @@ -43,7 +43,7 @@ true # This unit test is supposed to check the functionality of the corresponding object. -[] > int-less-false +[] > tests-int-less-false eq. > @ not. lt. @@ -52,7 +52,7 @@ true # This unit test is supposed to check the functionality of the corresponding object. -[] > int-greater-true +[] > tests-int-greater-true eq. > @ gt. -200 @@ -60,7 +60,7 @@ true # This unit test is supposed to check the functionality of the corresponding object. -[] > int-greater-false +[] > tests-int-greater-false eq. > @ not. gt. @@ -69,7 +69,7 @@ true # This unit test is supposed to check the functionality of the corresponding object. -[] > int-greater-equal +[] > tests-int-greater-equal eq. > @ not. gt. @@ -78,7 +78,7 @@ true # This unit test is supposed to check the functionality of the corresponding object. -[] > int-leq-true +[] > tests-int-leq-true eq. > @ lte. -200 @@ -86,7 +86,7 @@ true # This unit test is supposed to check the functionality of the corresponding object. -[] > int-leq-equal +[] > tests-int-leq-equal eq. > @ lte. 50 @@ -94,7 +94,7 @@ true # This unit test is supposed to check the functionality of the corresponding object. -[] > int-leq-false +[] > tests-int-leq-false eq. > @ not. lte. @@ -103,7 +103,7 @@ true # This unit test is supposed to check the functionality of the corresponding object. -[] > int-gte-true +[] > tests-int-gte-true eq. > @ gte. -1000 @@ -111,7 +111,7 @@ true # This unit test is supposed to check the functionality of the corresponding object. -[] > int-gte-equal +[] > tests-int-gte-equal eq. > @ gte. 113 @@ -119,7 +119,7 @@ true # This unit test is supposed to check the functionality of the corresponding object. -[] > int-gte-false +[] > tests-int-gte-false eq. > @ not. gte. @@ -128,7 +128,7 @@ true # This unit test is supposed to check the functionality of the corresponding object. -[] > int-equal-to-nan-and-infinites-is-false +[] > tests-int-equal-to-nan-and-infinites-is-false eq. > @ and. and. @@ -144,7 +144,7 @@ true # This unit test is supposed to check the functionality of the corresponding object. -[] > int-zero-eq-to-zero +[] > tests-int-zero-eq-to-zero eq. > @ eq. 0 @@ -152,7 +152,7 @@ true # This unit test is supposed to check the functionality of the corresponding object. -[] > int-zero-eq-to-float-zero +[] > tests-int-zero-eq-to-float-zero eq. > @ eq. 0 @@ -160,7 +160,7 @@ true # This unit test is supposed to check the functionality of the corresponding object. -[] > int-eq-true +[] > tests-int-eq-true eq. > @ eq. 123 @@ -168,7 +168,7 @@ true # This unit test is supposed to check the functionality of the corresponding object. -[] > int-eq-false +[] > tests-int-eq-false eq. > @ not. eq. @@ -177,25 +177,25 @@ true # Test -[] > one-plus-one +[] > tests-one-plus-one eq. > @ 1.plus 1 2 # Test -[] > one-minus-one +[] > tests-one-minus-one eq. > @ 1.minus 1 0 # This unit test is supposed to check the functionality of the corresponding object. -[] > compares-two-different-types +[] > tests-compares-two-different-number-types eq. > @ 68.eq "12345678" false # This unit test is supposed to check the functionality of the corresponding object. -[] > calculates-fibonacci-number-with-recursion +[] > tests-calculates-fibonacci-number-with-recursion # Fibonacci. [n] > fibo if. > @ @@ -209,7 +209,7 @@ 3 # This unit test is supposed to check the functionality of the corresponding object. -[] > calculates-fibonacci-number-with-tail +[] > tests-calculates-fibonacci-number-with-tail eq. > @ fibonacci 4 3 @@ -236,7 +236,7 @@ rec (n.minus 1) (minus1.plus minus2) minus1 # Checks that division by zero does not return an error object. -[] > zero-division +[] > tests-zero-division try > @ seq * @@ -246,33 +246,33 @@ false # Checks that division by one returns the dividend. -[] > division-by-one +[] > tests-division-by-one -235 > dividend eq. > @ dividend.div 1 dividend # Checks that div works properly with dividends greater than zero -[] > div-for-dividend-greater-than-zero +[] > tests-div-for-dividend-greater-than-zero eq. > @ 256.div 16 16 # Checks div with remainder -[] > div-with-remainder +[] > tests-div-with-remainder eq. > @ floor. 13.div -5 -2 # This unit test is supposed to check the functionality of the corresponding object. -[] > div-less-than-one +[] > tests-div-less-than-one lt. > @ 1.div 5 1 # This unit test is supposed to check the functionality of the corresponding object. -[] > to-bytes-and-backwards +[] > tests-to-bytes-and-backwards eq. > @ as-number. as-bytes. @@ -280,25 +280,25 @@ 42 # This unit test is supposed to check the functionality of the corresponding object. -[] > as-bytes-equals-to-int +[] > tests-as-bytes-equals-to-int eq. > @ 42 42.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > as-bytes-equals-to-int-backwards +[] > tests-as-bytes-equals-to-int-backwards eq. > @ 42.as-bytes 42 # This unit test is supposed to check the functionality of the corresponding object. -[] > multiply-by-zero +[] > tests-multiply-by-zero eq. > @ 1000.times 0 0 # This unit test is supposed to check the functionality of the corresponding object. -[] > simple-number-is-not-nan +[] > tests-simple-number-is-not-nan 42.5.is-nan.not > @ # This unit test is supposed to check the functionality of the corresponding object. @@ -311,9 +311,9 @@ 32.is-finite > [] > simple-number-is-finite # Test -[] > number-with-nan-bytes-is-nan +[] > tests-number-with-nan-bytes-is-nan (number nan.as-bytes).is-nan > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > number-with-infinite-bytes-is-not-finite +[] > tests-number-with-infinite-bytes-is-not-finite (number positive-infinity.as-bytes).is-finite.not > @ diff --git a/eo-runtime/src/test/eo/org/eolang/positive-infinity-tests.eo b/eo-runtime/src/test/eo/org/eolang/positive-infinity-tests.eo index 4fc67e3e8d..8abe6b3fa4 100644 --- a/eo-runtime/src/test/eo/org/eolang/positive-infinity-tests.eo +++ b/eo-runtime/src/test/eo/org/eolang/positive-infinity-tests.eo @@ -28,169 +28,169 @@ +unlint object-has-data # Equal to. -[] > positive-infinity-is-equal-to-one-div-zero +[] > tests-positive-infinity-is-equal-to-one-div-zero eq. > @ positive-infinity 1.0.div 0.0 # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-eq-positive-infinity +[] > tests-positive-infinity-eq-positive-infinity eq. > @ positive-infinity positive-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-not-eq-negative-infinity +[] > tests-positive-infinity-not-eq-negative-infinity not. > @ eq. positive-infinity negative-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-not-eq-nan +[] > tests-positive-infinity-not-eq-nan not. > @ eq. positive-infinity nan # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-not-eq-int +[] > tests-positive-infinity-not-eq-int not. > @ eq. positive-infinity 42 # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-not-eq-float +[] > tests-positive-infinity-not-eq-float not. > @ eq. positive-infinity 42.5 # Less than. -[] > positive-infinity-lt-positive-infinity +[] > tests-positive-infinity-lt-positive-infinity eq. > @ positive-infinity.lt positive-infinity false # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-not-lt-negative-infinity +[] > tests-positive-infinity-not-lt-negative-infinity eq. > @ positive-infinity.lt negative-infinity false # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-not-lt-nan +[] > tests-positive-infinity-not-lt-nan eq. > @ positive-infinity.lt nan false # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-not-lt-int +[] > tests-positive-infinity-not-lt-int eq. > @ positive-infinity.lt 42 false # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-not-lt-float +[] > tests-positive-infinity-not-lt-float eq. > @ positive-infinity.lt 42.5 false # Less or equal than. -[] > positive-infinity-lte-positive-infinity +[] > tests-positive-infinity-lte-positive-infinity eq. > @ positive-infinity.lte positive-infinity true # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-not-lte-negative-infinity +[] > tests-positive-infinity-not-lte-negative-infinity eq. > @ positive-infinity.lte negative-infinity false # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-not-lte-nan +[] > tests-positive-infinity-not-lte-nan eq. > @ positive-infinity.lte nan false # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-not-lte-int +[] > tests-positive-infinity-not-lte-int eq. > @ positive-infinity.lte 42 false # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-not-lte-float +[] > tests-positive-infinity-not-lte-float eq. > @ positive-infinity.lte 42.5 false # Greater than. -[] > positive-infinity-gt-positive-infinity +[] > tests-positive-infinity-gt-positive-infinity not. > @ gt. positive-infinity positive-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-gt-negative-infinity +[] > tests-positive-infinity-gt-negative-infinity gt. > @ positive-infinity negative-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-not-gt-nan +[] > tests-positive-infinity-not-gt-nan not. > @ gt. positive-infinity nan # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-gt-int +[] > tests-positive-infinity-gt-int gt. > @ positive-infinity 42 # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-gt-float +[] > tests-positive-infinity-gt-float gt. > @ positive-infinity 42.5 # Greater or equal than. -[] > positive-infinity-gte-positive-infinity +[] > tests-positive-infinity-gte-positive-infinity eq. > @ positive-infinity.gte positive-infinity true # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-gte-negative-infinity +[] > tests-positive-infinity-gte-negative-infinity eq. > @ positive-infinity.gte negative-infinity true # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-not-gte-nan +[] > tests-positive-infinity-not-gte-nan eq. > @ positive-infinity.gte nan false # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-gte-int +[] > tests-positive-infinity-gte-int eq. > @ positive-infinity.gte 42 true # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-gte-float +[] > tests-positive-infinity-gte-float eq. > @ positive-infinity.gte 42.5 true # This unit test is supposed to check the functionality of the corresponding object. -[] > float-equal-to-nan-and-infinites-is-false-highload +[] > tests-float-equal-to-nan-and-infinites-is-false-highload negative-infinity > neg-inf eq. > @ and. @@ -220,238 +220,238 @@ # Times. # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-times-float-zero +[] > tests-positive-infinity-times-float-zero eq. > @ as-bytes. positive-infinity.times 0.0 nan.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-times-neg-float-zero +[] > tests-positive-infinity-times-neg-float-zero eq. > @ as-bytes. positive-infinity.times -0.0 nan.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-times-int-zero +[] > tests-positive-infinity-times-int-zero eq. > @ as-bytes. positive-infinity.times 0 nan.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-times-nan +[] > tests-positive-infinity-times-nan eq. > @ as-bytes. positive-infinity.times nan nan.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-times-negative-infinity +[] > tests-positive-infinity-times-negative-infinity negative-infinity > neg-inf eq. > @ positive-infinity.times neg-inf neg-inf # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-times-positive-infinity +[] > tests-positive-infinity-times-positive-infinity eq. > @ positive-infinity.times positive-infinity positive-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-times-positive-float +[] > tests-positive-infinity-times-positive-float eq. > @ positive-infinity.times 42.5 positive-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-times-positive-int +[] > tests-positive-infinity-times-positive-int eq. > @ positive-infinity.times 42 positive-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-times-negative-float +[] > tests-positive-infinity-times-negative-float eq. > @ positive-infinity.times -42.5 negative-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-times-negative-int +[] > tests-positive-infinity-times-negative-int eq. > @ positive-infinity.times -42 negative-infinity # Plus # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-plus-nan +[] > tests-positive-infinity-plus-nan eq. > @ as-bytes. positive-infinity.plus nan nan.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-plus-negative-infinity +[] > tests-positive-infinity-plus-negative-infinity eq. > @ as-bytes. positive-infinity.plus negative-infinity nan.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-plus-positive-infinity +[] > tests-positive-infinity-plus-positive-infinity eq. > @ positive-infinity.plus positive-infinity positive-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-plus-positive-float +[] > tests-positive-infinity-plus-positive-float eq. > @ positive-infinity.plus 42.5 positive-infinity # Negation # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-neg-is-negative-infinity +[] > tests-positive-infinity-neg-is-negative-infinity eq. > @ positive-infinity.neg negative-infinity # Minus # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-minus-nan +[] > tests-positive-infinity-minus-nan eq. > @ as-bytes. positive-infinity.minus nan nan.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-minus-positive-infinity +[] > tests-positive-infinity-minus-positive-infinity eq. > @ as-bytes. positive-infinity.minus positive-infinity nan.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-minus-negative-infinity +[] > tests-positive-infinity-minus-negative-infinity eq. > @ positive-infinity.minus negative-infinity positive-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-minus-positive-float +[] > tests-positive-infinity-minus-positive-float eq. > @ positive-infinity.minus 42.5 positive-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-minus-positive-int +[] > tests-positive-infinity-minus-positive-int eq. > @ positive-infinity.minus 42 positive-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-minus-negative-float +[] > tests-positive-infinity-minus-negative-float eq. > @ positive-infinity.minus -42.5 positive-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-minus-negative-int +[] > tests-positive-infinity-minus-negative-int eq. > @ positive-infinity.minus -42 positive-infinity # Division # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-div-float-zero +[] > tests-positive-infinity-div-float-zero eq. > @ positive-infinity.div 0.0 positive-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-div-neg-float-zero +[] > tests-positive-infinity-div-neg-float-zero eq. > @ positive-infinity.div -0.0 negative-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-div-int-zero +[] > tests-positive-infinity-div-int-zero eq. > @ positive-infinity.div 0 positive-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-div-neg-int-zero +[] > tests-positive-infinity-div-neg-int-zero eq. > @ positive-infinity.div -0 negative-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-div-nan +[] > tests-positive-infinity-div-nan eq. > @ as-bytes. positive-infinity.div nan nan.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-div-negative-infinity +[] > tests-positive-infinity-div-negative-infinity eq. > @ as-bytes. positive-infinity.div negative-infinity nan.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-div-positive-infinity +[] > tests-positive-infinity-div-positive-infinity eq. > @ as-bytes. positive-infinity.div positive-infinity nan.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-div-positive-float +[] > tests-positive-infinity-div-positive-float eq. > @ positive-infinity.div 42.5 positive-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-div-positive-int +[] > tests-positive-infinity-div-positive-int eq. > @ positive-infinity.div 42 positive-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-div-negative-float +[] > tests-positive-infinity-div-negative-float eq. > @ positive-infinity.div -42.5 negative-infinity # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-div-negative-int +[] > tests-positive-infinity-div-negative-int eq. > @ positive-infinity.div -42 negative-infinity # Bytes. # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-as-bytes-is-valid +[] > tests-positive-infinity-as-bytes-is-valid eq. > @ positive-infinity.as-bytes (1.0.div 0.0).as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-floor-is-equal-to-self +[] > tests-positive-infinity-floor-is-equal-to-self positive-infinity.floor.eq positive-infinity > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-is-not-nan +[] > tests-positive-infinity-is-not-nan positive-infinity.is-nan.not > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-is-not-finite +[] > tests-positive-infinity-is-not-finite positive-infinity.is-finite.not > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > positive-infinity-is-not-integer +[] > tests-positive-infinity-is-not-integer positive-infinity.is-integer.not > @ diff --git a/eo-runtime/src/test/eo/org/eolang/runtime-tests.eo b/eo-runtime/src/test/eo/org/eolang/runtime-tests.eo index 5073280b26..f6cace9dc4 100644 --- a/eo-runtime/src/test/eo/org/eolang/runtime-tests.eo +++ b/eo-runtime/src/test/eo/org/eolang/runtime-tests.eo @@ -33,7 +33,7 @@ true > global-test # This unit test is supposed to check the functionality of the corresponding object. -[] > understands-this-correctly +[] > tests-understands-this-correctly [x] > a $.x > @ eq. > @ @@ -41,7 +41,7 @@ true > global-test 42 # This unit test is supposed to check the functionality of the corresponding object. -[] > takes-parent-object +[] > tests-takes-parent-object [x] > a [] > take ^.x > @ @@ -51,7 +51,7 @@ true > global-test 42 # This unit test is supposed to check the functionality of the corresponding object. -[] > makes-object-a-constant +[] > tests-makes-object-a-constant [] > foo times. > @ 50 @@ -62,7 +62,7 @@ true > global-test f # This unit test is supposed to check the functionality of the corresponding object. -[] > takes-parent-through-attribute +[] > tests-takes-parent-through-attribute 42 > x $ > this [] > @ @@ -80,7 +80,7 @@ true > global-test closed true > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > makes-deep-object-recursively +[] > tests-makes-deep-object-recursively eq. > @ x 5 0 @@ -92,7 +92,7 @@ true > global-test i.minus 1 # This unit test is supposed to check the functionality of the corresponding object. -[] > calculates-only-once +[] > tests-calculates-only-once eq. > @ malloc.for 0 @@ -109,7 +109,7 @@ true > global-test 1 # This unit test is supposed to check the functionality of the corresponding object. -[] > recursion-without-arguments +[] > tests-recursion-without-arguments [n] > func if. > @ n.as-number.gt 0 @@ -126,19 +126,19 @@ true > global-test 0 # This unit test is supposed to check the functionality of the corresponding object. -[] > unescapes-slashes +[] > tests-unescapes-slashes eq. > @ "x\\b\\f\\u\\r\\t\\n\\'" 78-5C-62-5C-66-5C-75-5C-72-5C-74-5C-6E-5C-27 # This unit test is supposed to check the functionality of the corresponding object. -[] > unescapes-symbols +[] > tests-unescapes-symbols eq. > @ "\b\f\n\r\t\u27E6" 08-0C-0A-0D-09-E2-9F-A6 # This unit test is supposed to check the functionality of the corresponding object. -[] > compiles-correctly-with-long-duplicate-names +[] > tests-compiles-correctly-with-long-duplicate-names [] > long-object-name [] > long-object-name [] > long-object-name @@ -148,14 +148,14 @@ true > global-test true > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > named-inner-abstract-object +[] > tests-named-inner-abstract-object seq > @ * [] > a true > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > app-that-calls-func +[] > tests-app-that-calls-func [] > app [args] > f 1 > a @@ -168,7 +168,7 @@ true > global-test 2 # This unit test is supposed to check the functionality of the corresponding object. -[] > directly-accesses-objects-from-root +[] > tests-directly-accesses-objects-from-root eq. > @ Q.org.eolang.malloc.of 8 @@ -181,7 +181,7 @@ true > global-test 40 # This unit test is supposed to check the functionality of the corresponding object. -[] > directly-accesses-objects-from-standard-root +[] > tests-directly-accesses-objects-from-standard-root eq. > @ QQ.malloc.of 8 @@ -194,7 +194,7 @@ true > global-test 40 # This unit test is supposed to check the functionality of the corresponding object. -[] > standard-root-and-root +[] > tests-standard-root-and-root QQ.sys.os > stand-root Q.org.eolang.sys.os > root eq. > @ @@ -202,7 +202,7 @@ true > global-test stand-root # This unit test is supposed to check the functionality of the corresponding object. -[] > extract-attribute-from-decoratee +[] > tests-extract-attribute-from-decoratee [foo] > return [] > a ^.return > @ @@ -214,7 +214,7 @@ true > global-test 43 # This unit test is supposed to check the functionality of the corresponding object. -[] > constant-defends-against-side-effects +[] > tests-constant-defends-against-side-effects [x] > inc seq > @ * @@ -234,7 +234,7 @@ true > global-test 64 # This unit test is supposed to check the functionality of the corresponding object. -[] > parent-in-vertical-notation +[] > tests-parent-in-vertical-notation 5 > m [] > value [] > @ @@ -246,7 +246,7 @@ true > global-test 5 # This unit test is supposed to check the functionality of the corresponding object. -[] > parent-in-horizontal-notation +[] > tests-parent-in-horizontal-notation 5 > m [] > value [] > @ @@ -256,7 +256,7 @@ true > global-test 5 # This unit test is supposed to check the functionality of the corresponding object. -[] > phi-in-vertical-notation +[] > tests-phi-in-vertical-notation [] > value [] > @ 100 > @ @@ -266,7 +266,7 @@ true > global-test 100 # This unit test is supposed to check the functionality of the corresponding object. -[] > phi-in-horizontal-notation +[] > tests-phi-in-horizontal-notation [] > value [] > @ 100 > @ @@ -275,7 +275,7 @@ true > global-test 100 # This unit test is supposed to check the functionality of the corresponding object. -[] > right-way-to-use-hierarchy +[] > tests-right-way-to-use-hierarchy # Bool mock [value] > pybool value > @ @@ -287,7 +287,7 @@ true > global-test ((pyint 1).add (pyint 3)).eq (pyint 4) > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > check-triple-quotes +[] > tests-check-triple-quotes eq. > @ """ Hello @@ -297,7 +297,7 @@ true > global-test "Hello\n\nHello" # This unit test is supposed to check the functionality of the corresponding object. -[] > correctly-handles-same-name-attrs-simplified +[] > tests-correctly-handles-same-name-attrs-simplified [first second] > calc plus. > @ first @@ -315,7 +315,7 @@ true > global-test 3 # This unit test is supposed to check the functionality of the corresponding object. -[] > correctly-handles-same-name-attrs +[] > tests-correctly-handles-same-name-attrs [f s] > calc plus. > @ f.next @@ -341,7 +341,7 @@ true > global-test 9 # This unit test is supposed to check the functionality of the corresponding object. -[] > with-void-phi +[] > tests-with-void-phi [@] > x "Hello" > hello x 5 > five @@ -353,7 +353,7 @@ true > global-test [] (seq (* (five.eq 5) true) > @) (5 > five) > complex-horizontal # This unit test is supposed to check the functionality of the corresponding object. -[] > vertical-bound-method +[] > tests-vertical-bound-method eq. > @ if. true @@ -363,7 +363,7 @@ true > global-test "first" # Nesting blah test. -[] > nesting-blah-test +[] > tests-nesting-blah-test blah0 > @ [] > blah0 blah1 > @ 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 23c7aa2595..875a116f81 100644 --- a/eo-runtime/src/test/eo/org/eolang/seq-tests.eo +++ b/eo-runtime/src/test/eo/org/eolang/seq-tests.eo @@ -29,7 +29,7 @@ +unlint broken-ref # This unit test is supposed to check the functionality of the corresponding object. -[] > seq-single-dataization-float-less +[] > tests-seq-single-dataization-float-less malloc.of > @ 1 [b] @@ -45,7 +45,7 @@ 1.1 # This unit test is supposed to check the functionality of the corresponding object. -[] > seq-single-dataization-float-greater +[] > tests-seq-single-dataization-float-greater malloc.of > @ 1 [b] @@ -61,7 +61,7 @@ 0.9 # This unit test is supposed to check the functionality of the corresponding object. -[] > seq-single-dataization-int-less +[] > tests-seq-single-dataization-int-less malloc.of > @ 1 [b] @@ -77,7 +77,7 @@ 2 # This unit test is supposed to check the functionality of the corresponding object. -[] > seq-single-dataization-int-less-or-equal +[] > tests-seq-single-dataization-int-less-or-equal malloc.of > @ 1 [b] @@ -93,7 +93,7 @@ 1 # This test should have acceptable time to pass. -[] > very-long-seq +[] > tests-very-long-seq eq. > @ true seq @@ -142,7 +142,7 @@ true # This unit test is supposed to check the functionality of the corresponding object. -[] > seq-single-dataization-int-equal-to-test +[] > tests-seq-single-dataization-int-equal-to-test malloc.of > @ 1 [b] @@ -159,7 +159,7 @@ 1 # This unit test is supposed to check the functionality of the corresponding object. -[] > seq-single-dataization-int-equal-to-cache-problem-test +[] > tests-seq-single-dataization-int-equal-to-cache-problem-test malloc.of > @ 1 [b] @@ -178,7 +178,7 @@ 1 # This unit test is supposed to check the functionality of the corresponding object. -[] > seq-calculates-and-returns +[] > tests-seq-calculates-and-returns eq. > @ 1 seq @@ -187,7 +187,7 @@ 1 # This unit test is supposed to check the functionality of the corresponding object. -[] > seq-calculates-and-returns-object +[] > tests-seq-calculates-and-returns-object eq. > @ "Hello!" seq diff --git a/eo-runtime/src/test/eo/org/eolang/string-tests.eo b/eo-runtime/src/test/eo/org/eolang/string-tests.eo index d818a447e4..ee9e3a0092 100644 --- a/eo-runtime/src/test/eo/org/eolang/string-tests.eo +++ b/eo-runtime/src/test/eo/org/eolang/string-tests.eo @@ -28,45 +28,45 @@ +unlint object-has-data # This unit test is supposed to check the functionality of the corresponding object. -[] > calculates-length-of-spaces-only +[] > tests-calculates-length-of-spaces-only eq. > @ " ".length 1 # This unit test is supposed to check the functionality of the corresponding object. -[] > turns-string-into-bytes +[] > tests-turns-string-into-bytes eq. > @ "€ друг".as-bytes E2-82-AC-20-D0-B4-D1-80-D1-83-D0-B3 # This unit test is supposed to check the functionality of the corresponding object. -[] > bytes-equal-to-string +[] > tests-bytes-equal-to-string eq. > @ D0-B4-D1-80-D1-83-D0-B3 "друг" # This unit test is supposed to check the functionality of the corresponding object. -[] > string-equals-to-bytes +[] > tests-string-equals-to-bytes eq. > @ "друг" D0-B4-D1-80-D1-83-D0-B3 # This unit test is supposed to check the functionality of the corresponding object. -[] > reads-the-length-with-2-byte-characters +[] > tests-reads-the-length-with-n2-byte-characters "Hello, друг!" > str and. > @ str.length.eq 12 str.as-bytes.size.eq 16 # This unit test is supposed to check the functionality of the corresponding object. -[] > reads-the-length-with-3-byte-characters +[] > tests-reads-the-length-with-n3-byte-characters "The अ devanagari" > str and. > @ str.length.eq 16 str.as-bytes.size.eq 18 # This unit test is supposed to check the functionality of the corresponding object. -[] > reads-the-length-with-4-byte-characters +[] > tests-reads-the-length-with-n4-byte-characters "The 😀 smile" > str and. > @ str.length.eq 11 @@ -75,39 +75,39 @@ # This unit test is supposed to check the functionality of the corresponding object. # The smile emoji is F0-9F-98-80 in bytes. Here we check if string.length fails if it faces # incomplete 4 byte character. -[] > throws-on-taking-length-of-incomplete-4-byte-character +[] > throws-on-taking-length-of-incomplete-n4-byte-character string F0-9F-98 > should-be-smile should-be-smile.length > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > compares-two-different-types +[] > tests-compares-two-different-string-types not. > @ eq. "Hello" 42 # This unit test is supposed to check the functionality of the corresponding object. -[] > compares-string-with-nan +[] > tests-compares-string-with-nan not. > @ eq. nan "друг" # This unit test is supposed to check the functionality of the corresponding object. -[] > compares-string-with-positive-infinity +[] > tests-compares-string-with-positive-infinity eq. > @ positive-infinity.eq "друг" false # This unit test is supposed to check the functionality of the corresponding object. -[] > compares-string-with-negative-infinity +[] > tests-compares-string-with-negative-infinity not. > @ eq. negative-infinity "друг" # This unit test is supposed to check the functionality of the corresponding object. -[] > text-block-one-line +[] > tests-text-block-one-line eq. > @ """ Abc @@ -115,7 +115,7 @@ "Abc" # This unit test is supposed to check the functionality of the corresponding object. -[] > text-block-tree-lines +[] > tests-text-block-tree-lines eq. > @ """ e @@ -125,7 +125,7 @@ 65-0A-65-0A-65 # This unit test is supposed to check the functionality of the corresponding object. -[] > text-block-with-margin +[] > tests-text-block-with-margin eq. > @ """ z @@ -135,20 +135,20 @@ 7A-0A-20-20-79-0A-20-78 # This unit test is supposed to check the functionality of the corresponding object. -[] > compares-two-different-strings +[] > tests-compares-two-different-strings not. > @ eq. "Hello" "Good bye" # This unit test is supposed to check the functionality of the corresponding object. -[] > supports-escape-sequences +[] > tests-supports-escape-sequences eq. > @ "Hello, \u0434\u0440\u0443\u0433!\n" "Hello, друг!\n" # This unit test is supposed to check the functionality of the corresponding object. -[] > supports-escape-sequences-in-text +[] > tests-supports-escape-sequences-in-text eq. > @ """ Hello, \u0434\u0440\u0443\u0433!\n @@ -156,7 +156,7 @@ "Hello, друг!\n" # This unit test is supposed to check the functionality of the corresponding object. -[] > preserves-indentation-in-text +[] > tests-preserves-indentation-in-text eq. > @ """ a @@ -166,7 +166,7 @@ "a\n b\n c" # This unit test is supposed to check the functionality of the corresponding object. -[] > compares-two-strings +[] > tests-compares-two-strings eq. > @ eq. "x" @@ -174,55 +174,55 @@ true # This unit test is supposed to check the functionality of the corresponding object. -[] > one-symbol-string-compares +[] > tests-one-symbol-string-compares eq. > @ "Ф" "Ф" # This unit test is supposed to check the functionality of the corresponding object. -[] > supports-escape-sequences-line-break +[] > tests-supports-escape-sequences-line-break eq. > @ "\n" "\012" # This unit test is supposed to check the functionality of the corresponding object. -[] > supports-escape-sequences-unicode +[] > tests-supports-escape-sequences-unicode eq. > @ "\u0424" "Ф" # This unit test is supposed to check the functionality of the corresponding object. -[] > slice-from-start +[] > tests-slice-from-start eq. > @ "hello".slice 0 1 "h" # This unit test is supposed to check the functionality of the corresponding object. -[] > slice-in-the-middle +[] > tests-slice-in-the-middle eq. > @ "hello".slice 2 3 "llo" # This unit test is supposed to check the functionality of the corresponding object. -[] > slice-from-the-end +[] > tests-slice-from-the-end eq. > @ "hello".slice 4 1 "o" # This unit test is supposed to check the functionality of the corresponding object. -[] > slice-empty-string +[] > tests-slice-empty-string eq. > @ "".slice 0 0 "" # This unit test is supposed to check the functionality of the corresponding object. -[] > no-slice-string +[] > tests-no-slice-string eq. > @ "no slice".slice 0 0 "" # This unit test is supposed to check the functionality of the corresponding object. -[] > slice-escape-sequences-line-break +[] > tests-slice-escape-sequences-line-break eq. > @ "\n".slice 0 @@ -230,7 +230,7 @@ "\012" # This unit test is supposed to check the functionality of the corresponding object. -[] > slice-escape-sequences-unicode +[] > tests-slice-escape-sequences-unicode eq. > @ "\u0424".slice 0 @@ -238,25 +238,25 @@ "Ф" # This unit test is supposed to check the functionality of the corresponding object. -[] > slice-with-2-byte-characters +[] > tests-slice-with-n2-byte-characters eq. > @ "привет".slice 1 2 "ри" # This unit test is supposed to check the functionality of the corresponding object. -[] > slice-with-3-byte-characters +[] > tests-slice-with-n3-byte-characters eq. > @ "The अ is अ".slice 1 6 "he अ i" # This unit test is supposed to check the functionality of the corresponding object. -[] > slice-with-4-byte-characters +[] > tests-slice-with-n4-byte-characters eq. > @ "One 😀 and 😀 another".slice 3 8 " 😀 and 😀" # This unit test is supposed to check the functionality of the corresponding object. -[] > slice-foreign-literals +[] > tests-slice-foreign-literals eq. > @ "hello, 大家!".slice 7 diff --git a/eo-runtime/src/test/eo/org/eolang/structs/bytes-as-array-tests.eo b/eo-runtime/src/test/eo/org/eolang/structs/bytes-as-array-tests.eo index 0a4fa06275..d62e122192 100644 --- a/eo-runtime/src/test/eo/org/eolang/structs/bytes-as-array-tests.eo +++ b/eo-runtime/src/test/eo/org/eolang/structs/bytes-as-array-tests.eo @@ -31,7 +31,7 @@ +unlint broken-alias-second # This unit test is supposed to check the functionality of the corresponding object. -[] > converts-bytes-to-array +[] > tests-converts-bytes-to-array eq. > @ list bytes-as-array @@ -39,7 +39,7 @@ * 20- 1F- EE- B5- FF- # This unit test is supposed to check the functionality of the corresponding object. -[] > single-byte-to-array +[] > tests-single-byte-to-array eq. > @ list bytes-as-array @@ -47,7 +47,7 @@ * 1F- # This unit test is supposed to check the functionality of the corresponding object. -[] > zero-bytes-to-array +[] > tests-zero-bytes-to-array eq. > @ list bytes-as-array diff --git a/eo-runtime/src/test/eo/org/eolang/structs/hash-code-of-tests.eo b/eo-runtime/src/test/eo/org/eolang/structs/hash-code-of-tests.eo index ef88deeb47..97ab07a65f 100644 --- a/eo-runtime/src/test/eo/org/eolang/structs/hash-code-of-tests.eo +++ b/eo-runtime/src/test/eo/org/eolang/structs/hash-code-of-tests.eo @@ -30,7 +30,7 @@ +unlint broken-alias-second # This unit test is supposed to check the functionality of the corresponding object. -[] > hash-code-of-bools-is-number +[] > tests-hash-code-of-bools-is-number hash-code-of true > true-code hash-code-of false > false-code and. > @ @@ -38,7 +38,7 @@ false-code.as-bytes.size.eq 8 # This unit test is supposed to check the functionality of the corresponding object. -[] > hash-code-of-int-is-int +[] > tests-hash-code-of-int-is-int hash-code-of 42 > num-code! eq. > @ 1 @@ -47,34 +47,34 @@ number num-code # This unit test is supposed to check the functionality of the corresponding object. -[] > hash-codes-of-the-same-big-ints-are-equal +[] > tests-hash-codes-of-the-same-big-ints-are-equal 123456789012345678 > big-int eq. > @ hash-code-of big-int hash-code-of big-int # This unit test is supposed to check the functionality of the corresponding object. -[] > hash-codes-of-the-same-ints-are-equal +[] > tests-hash-codes-of-the-same-ints-are-equal eq. > @ hash-code-of 42 hash-code-of 42 # This unit test is supposed to check the functionality of the corresponding object. -[] > hash-codes-of-different-ints-are-not-equal +[] > tests-hash-codes-of-different-ints-are-not-equal not. > @ eq. hash-code-of 42 hash-code-of 24 # This unit test is supposed to check the functionality of the corresponding object. -[] > hash-codes-of-different-sign-ints-are-not-equal +[] > tests-hash-codes-of-different-sign-ints-are-not-equal not. > @ eq. hash-code-of 42 hash-code-of -42 # This unit test is supposed to check the functionality of the corresponding object. -[] > hash-code-of-string-is-int +[] > tests-hash-code-of-string-is-int hash-code-of "hello" > str-code! eq. > @ 1 @@ -83,27 +83,27 @@ number str-code # This unit test is supposed to check the functionality of the corresponding object. -[] > hash-codes-of-the-same-strings-are-equal +[] > tests-hash-codes-of-the-same-strings-are-equal eq. > @ hash-code-of "Hello" hash-code-of "Hello" # This unit test is supposed to check the functionality of the corresponding object. -[] > hash-codes-of-same-length-strings-are-not-equal +[] > tests-hash-codes-of-same-length-strings-are-not-equal not. > @ eq. hash-code-of "one" hash-code-of "two" # This unit test is supposed to check the functionality of the corresponding object. -[] > hash-codes-of-different-strings-are-not-equal +[] > tests-hash-codes-of-different-strings-are-not-equal not. > @ eq. hash-code-of "hello" hash-code-of "bye!!!" # This unit test is supposed to check the functionality of the corresponding object. -[] > hash-code-of-abstract-object-is-int +[] > tests-hash-code-of-abstract-object-is-int [x] > obj x > @ hash-code-of (obj 42) > obj-code! @@ -114,7 +114,7 @@ number obj-code # This unit test is supposed to check the functionality of the corresponding object. -[] > hash-codes-of-the-same-abstract-objects-are-equal +[] > tests-hash-codes-of-the-same-abstract-objects-are-equal [x] > obj x > @ obj 42 > forty-two-obj @@ -123,7 +123,7 @@ hash-code-of forty-two-obj # This unit test is supposed to check the functionality of the corresponding object. -[] > hash-codes-of-different-abstract-objects-are-not-equal +[] > tests-hash-codes-of-different-abstract-objects-are-not-equal [x] > obj x > @ not. > @ @@ -132,7 +132,7 @@ hash-code-of (obj "42") # This unit test is supposed to check the functionality of the corresponding object. -[] > hash-code-of-float-is-int +[] > tests-hash-code-of-float-is-int hash-code-of 42.42 > float-code! eq. > @ 1 @@ -141,28 +141,28 @@ number float-code # This unit test is supposed to check the functionality of the corresponding object. -[] > hash-codes-of-the-same-floats-are-equal +[] > tests-hash-codes-of-the-same-floats-are-equal 0.911 > emergency eq. > @ hash-code-of emergency hash-code-of emergency # This unit test is supposed to check the functionality of the corresponding object. -[] > hash-codes-of-the-same-big-floats-are-equal +[] > tests-hash-codes-of-the-same-big-floats-are-equal 42.42e42 > big-float! eq. > @ hash-code-of big-float hash-code-of big-float # This unit test is supposed to check the functionality of the corresponding object. -[] > hash-codes-of-different-floats-are-not-equal +[] > tests-hash-codes-of-different-floats-are-not-equal not. > @ eq. hash-code-of 3.14 hash-code-of 2.72 # This unit test is supposed to check the functionality of the corresponding object. -[] > hash-codes-of-different-sign-floats-are-not-equal +[] > tests-hash-codes-of-different-sign-floats-are-not-equal not. > @ eq. hash-code-of 3.22 diff --git a/eo-runtime/src/test/eo/org/eolang/structs/list-tests.eo b/eo-runtime/src/test/eo/org/eolang/structs/list-tests.eo index f51941a6f5..8053719b6a 100644 --- a/eo-runtime/src/test/eo/org/eolang/structs/list-tests.eo +++ b/eo-runtime/src/test/eo/org/eolang/structs/list-tests.eo @@ -32,7 +32,7 @@ +unlint broken-alias-second # This unit test is supposed to check the functionality of the corresponding object. -[] > list-should-not-be-empty +[] > tests-list-should-not-be-empty not. > @ is-empty. list @@ -42,7 +42,7 @@ (list *).is-empty > [] > list-should-be-empty # This unit test is supposed to check the functionality of the corresponding object. -[] > list-should-not-be-empty-with-three-objects +[] > tests-list-should-not-be-empty-with-three-objects * > xs [x] [y] @@ -50,13 +50,13 @@ (list xs).is-empty.not > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > list-should-not-be-empty-with-one-anon-object +[] > tests-list-should-not-be-empty-with-one-anon-object * > xs [f] (list xs).is-empty.not > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > list-simple-with +[] > tests-list-simple-with eq. > @ with. list @@ -65,7 +65,7 @@ * 1 2 3 # This unit test is supposed to check the functionality of the corresponding object. -[] > simple-insert +[] > tests-simple-insert eq. > @ withi. list @@ -75,7 +75,7 @@ * 1 2 3 "hello" 4 5 # This unit test is supposed to check the functionality of the corresponding object. -[] > insert-with-zero-index +[] > tests-insert-with-zero-index eq. > @ withi. list @@ -85,7 +85,7 @@ * "hello" 1 2 3 4 5 # This unit test is supposed to check the functionality of the corresponding object. -[] > reduce-list-with-index +[] > tests-reduce-list-with-index * 2 2 > src eq. > @ 6 @@ -100,7 +100,7 @@ ^.src.at i # This unit test is supposed to check the functionality of the corresponding object. -[] > list-reducedi-long-int-array +[] > tests-list-reducedi-long-int-array eq. > @ reducedi. list @@ -110,7 +110,7 @@ 1 # This unit test is supposed to check the functionality of the corresponding object. -[] > list-reducedi-bools-array +[] > tests-list-reducedi-bools-array not. > @ reducedi. list @@ -119,7 +119,7 @@ x.and a > [a x i] # This unit test is supposed to check the functionality of the corresponding object. -[] > list-reducedi-nested-functions +[] > tests-list-reducedi-nested-functions eq. > @ reducedi. list @@ -137,7 +137,7 @@ 0.minus 500 # This unit test is supposed to check the functionality of the corresponding object. -[] > list-reduce-without-index +[] > tests-list-reduce-without-index eq. > @ reduced. list @@ -147,7 +147,7 @@ -24 # This unit test is supposed to check the functionality of the corresponding object. -[] > list-reduced-printing +[] > tests-list-reduced-printing eq. > @ reduced. list @@ -161,7 +161,7 @@ "01" # This unit test is supposed to check the functionality of the corresponding object. -[] > complex-objects-list-comparison +[] > tests-complex-objects-list-comparison list > res * list (* 0 1) @@ -174,7 +174,7 @@ * 7 3 # This unit test is supposed to check the functionality of the corresponding object. -[] > list-mappedi-should-work +[] > tests-list-mappedi-should-work eq. > @ mappedi. list @@ -183,7 +183,7 @@ * 0 2 6 12 # This unit test is supposed to check the functionality of the corresponding object. -[] > simple-list-mapping +[] > tests-simple-list-mapping eq. > @ mapped. list @@ -192,7 +192,7 @@ * 2 4 6 # This unit test is supposed to check the functionality of the corresponding object. -[] > iterates-with-eachi +[] > tests-iterates-with-eachi eq. > @ malloc.for 0 @@ -208,7 +208,7 @@ 9 # This unit test is supposed to check the functionality of the corresponding object. -[] > iterates-with-each +[] > tests-iterates-with-each eq. > @ malloc.for 0 @@ -220,7 +220,7 @@ 6 # This unit test is supposed to check the functionality of the corresponding object. -[] > list-withouti +[] > tests-list-withouti eq. > @ withouti. list @@ -229,7 +229,7 @@ * 1 3 # This unit test is supposed to check the functionality of the corresponding object. -[] > list-withouti-complex-case +[] > tests-list-withouti-complex-case [a] > foo withouti. > @ list a @@ -240,7 +240,7 @@ * "text" "f" # This unit test is supposed to check the functionality of the corresponding object. -[] > list-withouti-nested-array +[] > tests-list-withouti-nested-array * 3 2 1 > nested eq. > @ withouti. @@ -250,7 +250,7 @@ * "smthg" 27 # This unit test is supposed to check the functionality of the corresponding object. -[] > list-without +[] > tests-list-without eq. > @ without. list @@ -259,14 +259,14 @@ * 1 1 1 5 # This unit test is supposed to check the functionality of the corresponding object. -[] > equality-test +[] > tests-equality-test eq. > @ list * 1 2 3 * 1 2 3 # This unit test is supposed to check the functionality of the corresponding object. -[] > not-equality-test +[] > tests-not-equality-test not. > @ eq. list @@ -274,7 +274,7 @@ * 3 2 1 # This unit test is supposed to check the functionality of the corresponding object. -[] > concatenates-lists +[] > tests-concatenates-lists list (* 0 1) > list1 list (* 2 3) > list2 withouti. > list3 @@ -291,7 +291,7 @@ * 1 2 3 # This unit test is supposed to check the functionality of the corresponding object. -[] > concatenates-with-tuple +[] > tests-concatenates-with-tuple eq. > @ concat. list @@ -300,7 +300,7 @@ * 0 1 2 4 # This unit test is supposed to check the functionality of the corresponding object. -[] > returns-index-of +[] > tests-returns-index-of eq. > @ 1 index-of. @@ -309,7 +309,7 @@ 2 # This unit test is supposed to check the functionality of the corresponding object. -[] > returns-first-index-of-element +[] > tests-returns-first-index-of-element eq. > @ 0 index-of. @@ -318,7 +318,7 @@ -1 # This unit test is supposed to check the functionality of the corresponding object. -[] > does-not-find-index-of +[] > tests-does-not-find-index-of eq. > @ -1 index-of. @@ -327,7 +327,7 @@ 7 # This unit test is supposed to check the functionality of the corresponding object. -[] > finds-index-of-string +[] > tests-finds-index-of-string eq. > @ 1 index-of. @@ -336,7 +336,7 @@ "qwerty" # This unit test is supposed to check the functionality of the corresponding object. -[] > finds-last-index-of +[] > tests-finds-last-index-of eq. > @ 1 last-index-of. @@ -345,7 +345,7 @@ 2 # This unit test is supposed to check the functionality of the corresponding object. -[] > finds-last-index-of-repeated +[] > tests-finds-last-index-of-repeated eq. > @ 2 last-index-of. @@ -354,7 +354,7 @@ 24 # This unit test is supposed to check the functionality of the corresponding object. -[] > last-index-of-not-found +[] > tests-last-index-of-not-found eq. > @ -1 last-index-of. @@ -363,7 +363,7 @@ 0 # This unit test is supposed to check the functionality of the corresponding object. -[] > last-index-of-empty +[] > tests-last-index-of-empty eq. > @ -1 last-index-of. @@ -371,7 +371,7 @@ "abc" # This unit test is supposed to check the functionality of the corresponding object. -[] > last-index-of-unicode +[] > tests-last-index-of-unicode eq. > @ 3 last-index-of. @@ -380,21 +380,21 @@ "Привет" # This unit test is supposed to check the functionality of the corresponding object. -[] > list-contains-string +[] > tests-list-contains-string contains. > @ list * "qwerty" "asdfgh" 3 "qwerty" "qwerty" # This unit test is supposed to check the functionality of the corresponding object. -[] > list-contains-number +[] > tests-list-contains-number contains. > @ list * "qwerty" "asdfgh" 3 "qwerty" 3 # This unit test is supposed to check the functionality of the corresponding object. -[] > list-does-not-contain +[] > tests-list-does-not-contain not. > @ contains. list @@ -402,7 +402,7 @@ "Hi" # This unit test is supposed to check the functionality of the corresponding object. -[] > filteredi-with-lt +[] > tests-filteredi-with-lt eq. > @ filteredi. list @@ -411,7 +411,7 @@ * 1 2 # This unit test is supposed to check the functionality of the corresponding object. -[] > filteredi-with-string-length +[] > tests-filteredi-with-string-length eq. > @ filteredi. list @@ -420,7 +420,7 @@ * "Hello" # This unit test is supposed to check the functionality of the corresponding object. -[] > filteredi-with-empty-list +[] > tests-filteredi-with-empty-list is-empty. > @ filteredi. list @@ -428,7 +428,7 @@ v.lt 3 > [v i] # This unit test is supposed to check the functionality of the corresponding object. -[] > filteredi-by-index +[] > tests-filteredi-by-index eq. > @ filteredi. list @@ -437,7 +437,7 @@ * 1 4 # This unit test is supposed to check the functionality of the corresponding object. -[] > filteredi-with-bools +[] > tests-filteredi-with-bools eq. > @ filteredi. list @@ -446,7 +446,7 @@ * false # This unit test is supposed to check the functionality of the corresponding object. -[] > simple-filtered +[] > tests-simple-filtered eq. > @ filtered. list @@ -455,7 +455,7 @@ * 3 4 5 # This unit test is supposed to check the functionality of the corresponding object. -[] > filtered-with-bools +[] > tests-filtered-with-bools eq. > @ filtered. list @@ -464,7 +464,7 @@ * false # This unit test is supposed to check the functionality of the corresponding object. -[] > simple-head +[] > tests-simple-head eq. > @ head. list @@ -473,7 +473,7 @@ * 1 # This unit test is supposed to check the functionality of the corresponding object. -[] > list-head-with-zero-index +[] > tests-list-head-with-zero-index is-empty. > @ head. list @@ -481,7 +481,7 @@ 0 # This unit test is supposed to check the functionality of the corresponding object. -[] > list-head-with-length-index +[] > tests-list-head-with-length-index eq. > @ head. list @@ -490,7 +490,7 @@ * 1 2 3 # This unit test is supposed to check the functionality of the corresponding object. -[] > complex-head +[] > tests-complex-head eq. > @ head. list @@ -499,7 +499,7 @@ * "foo" 2.2 # This unit test is supposed to check the functionality of the corresponding object. -[] > head-with-negative +[] > tests-head-with-negative eq. > @ head. list @@ -508,7 +508,7 @@ * 3 # This unit test is supposed to check the functionality of the corresponding object. -[] > complex-head-with-negative +[] > tests-complex-head-with-negative eq. > @ head. list @@ -517,7 +517,7 @@ * 2.2 00-01 "bar" # This unit test is supposed to check the functionality of the corresponding object. -[] > simple-tail +[] > tests-simple-tail eq. > @ tail. list @@ -526,7 +526,7 @@ * 4 5 # This unit test is supposed to check the functionality of the corresponding object. -[] > zero-index-in-tail +[] > tests-zero-index-in-tail is-empty. > @ tail. list @@ -534,7 +534,7 @@ 0 # This unit test is supposed to check the functionality of the corresponding object. -[] > large-index-in-tail +[] > tests-large-index-in-tail eq. > @ tail. list diff --git a/eo-runtime/src/test/eo/org/eolang/structs/map-tests.eo b/eo-runtime/src/test/eo/org/eolang/structs/map-tests.eo index 3d544d0ef4..44b56f4f2c 100644 --- a/eo-runtime/src/test/eo/org/eolang/structs/map-tests.eo +++ b/eo-runtime/src/test/eo/org/eolang/structs/map-tests.eo @@ -31,7 +31,7 @@ +unlint broken-alias-second # This unit test is supposed to check the functionality of the corresponding object. -[] > map-rebuilds-itself +[] > tests-map-rebuilds-itself map > mp * map.entry 1 1 @@ -41,7 +41,7 @@ 2.eq mp.size > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > map-rebuilds-itself-only-once +[] > tests-map-rebuilds-itself-only-once eq. > @ 1 malloc.for @@ -59,7 +59,7 @@ m # This unit test is supposed to check the functionality of the corresponding object. -[] > returns-list-of-keys +[] > tests-returns-list-of-keys eq. > @ keys. map @@ -70,7 +70,7 @@ * 1 2 3 # This unit test is supposed to check the functionality of the corresponding object. -[] > returns-list-of-values +[] > tests-returns-list-of-values eq. > @ values. map @@ -81,7 +81,7 @@ * 2 3 4 # This unit test is supposed to check the functionality of the corresponding object. -[] > finds-element-by-key-in-map +[] > tests-finds-element-by-key-in-map map > mp * map.entry "one" 1 @@ -91,7 +91,7 @@ 2.eq found.get > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > does-not-find-element-by-key-in-hash-map +[] > tests-does-not-find-element-by-key-in-hash-map map * map.entry "one" 1 @@ -101,7 +101,7 @@ .not > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > has-element-with-key-in-hash-map +[] > tests-has-element-with-key-in-hash-map map * map.entry "one" 1 @@ -109,7 +109,7 @@ .has "two" > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > does-not-have-element-by-key-in-hash-map +[] > tests-does-not-have-element-by-key-in-hash-map map * map.entry "one" 1 @@ -118,7 +118,7 @@ .not > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > does-not-change-map-without-non-existed-element +[] > tests-does-not-change-map-without-non-existed-element map * map.entry "one" 1 @@ -127,7 +127,7 @@ .eq 1 > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > removes-element-from-map-by-key +[] > tests-removes-element-from-map-by-key map * map.entry "one" 1 @@ -138,7 +138,7 @@ (mp.has "one").not # This unit test is supposed to check the functionality of the corresponding object. -[] > adds-new-pair-to-hash-map +[] > tests-adds-new-pair-to-hash-map map * map.entry "one" 1 @@ -148,7 +148,7 @@ mp.has "two" # This unit test is supposed to check the functionality of the corresponding object. -[] > replaces-value-if-pair-with-key-exists-in-map +[] > tests-replaces-value-if-pair-with-key-exists-in-map map * map.entry "one" 1 diff --git a/eo-runtime/src/test/eo/org/eolang/structs/range-of-ints-tests.eo b/eo-runtime/src/test/eo/org/eolang/structs/range-of-ints-tests.eo index b849b7d68d..c0a3f30239 100644 --- a/eo-runtime/src/test/eo/org/eolang/structs/range-of-ints-tests.eo +++ b/eo-runtime/src/test/eo/org/eolang/structs/range-of-ints-tests.eo @@ -30,23 +30,23 @@ +unlint broken-alias-second # This unit test is supposed to check the functionality of the corresponding object. -[] > simple-range-of-ints-from-one-to-ten +[] > tests-simple-range-of-ints-from-one-to-ten eq. > @ range-of-ints 1 10 * 1 2 3 4 5 6 7 8 9 # This unit test is supposed to check the functionality of the corresponding object. -[] > range-of-ints-from-ten-to-ten-is-empty +[] > tests-range-of-ints-from-ten-to-ten-is-empty is-empty. > @ range-of-ints 10 10 # This unit test is supposed to check the functionality of the corresponding object. -[] > range-of-descending-ints-is-empty +[] > tests-range-of-descending-ints-is-empty is-empty. > @ range-of-ints 10 1 # This unit test is supposed to check the functionality of the corresponding object. -[] > range-of-negative-ints-works-as-well +[] > tests-range-of-negative-ints-works-as-well eq. > @ range-of-ints -5 0 * -5 -4 -3 -2 -1 diff --git a/eo-runtime/src/test/eo/org/eolang/structs/range-tests.eo b/eo-runtime/src/test/eo/org/eolang/structs/range-tests.eo index c149968673..84515e0a96 100644 --- a/eo-runtime/src/test/eo/org/eolang/structs/range-tests.eo +++ b/eo-runtime/src/test/eo/org/eolang/structs/range-tests.eo @@ -30,7 +30,7 @@ +unlint broken-alias-second # This unit test is supposed to check the functionality of the corresponding object. -[] > simple-range-from-one-to-ten +[] > tests-simple-range-from-one-to-ten range > rng [] [i] > build @@ -43,7 +43,7 @@ * 1 2 3 4 5 6 7 8 9 # This unit test is supposed to check the functionality of the corresponding object. -[] > simple-range-with-floats-from-one-to-five +[] > tests-simple-range-with-floats-from-one-to-five range > rng [] [i] > x @@ -56,7 +56,7 @@ * 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 # This unit test is supposed to check the functionality of the corresponding object. -[] > range-with-out-of-bounds +[] > tests-range-with-out-of-bounds range > rng [] [num] > b @@ -69,7 +69,7 @@ * 1 6 # This unit test is supposed to check the functionality of the corresponding object. -[] > range-with-wrong-items-is-an-empty-array +[] > tests-range-with-wrong-items-is-an-empty-array range > rng [] [num] > y diff --git a/eo-runtime/src/test/eo/org/eolang/structs/set-tests.eo b/eo-runtime/src/test/eo/org/eolang/structs/set-tests.eo index 2ccca15c52..b976a80d32 100644 --- a/eo-runtime/src/test/eo/org/eolang/structs/set-tests.eo +++ b/eo-runtime/src/test/eo/org/eolang/structs/set-tests.eo @@ -30,14 +30,14 @@ +unlint broken-alias-second # This unit test is supposed to check the functionality of the corresponding object. -[] > set-rebuilds-itself +[] > tests-set-rebuilds-itself eq. > @ set * 1 2 2 * 1 2 # This unit test is supposed to check the functionality of the corresponding object. -[] > does-not-append-existed-item-to-set +[] > tests-does-not-append-existed-item-to-set set * 1 2 .with 1 @@ -45,14 +45,14 @@ .eq 2 > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > appends-new-item-to-set +[] > tests-appends-new-item-to-set set * 1 2 .with 3 .has 3 > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > empty-set-has-size-of-zero +[] > tests-empty-set-has-size-of-zero set * .size diff --git a/eo-runtime/src/test/eo/org/eolang/switch-tests.eo b/eo-runtime/src/test/eo/org/eolang/switch-tests.eo index b636eb7df0..123869c737 100644 --- a/eo-runtime/src/test/eo/org/eolang/switch-tests.eo +++ b/eo-runtime/src/test/eo/org/eolang/switch-tests.eo @@ -29,7 +29,7 @@ +unlint broken-ref # This unit test is supposed to check the functionality of the corresponding object. -[] > switch-simple-case +[] > tests-switch-simple-case eq. > @ switch * @@ -42,7 +42,7 @@ "2" # This unit test is supposed to check the functionality of the corresponding object. -[] > switch-strings-case +[] > tests-switch-strings-case "swordfish" > password eq. > @ switch @@ -59,7 +59,7 @@ "password is correct!" # This unit test is supposed to check the functionality of the corresponding object. -[] > switch-with-several-true-cases +[] > tests-switch-with-several-true-cases eq. > @ switch * @@ -75,7 +75,7 @@ "TRUE1" # This unit test is supposed to check the functionality of the corresponding object. -[] > switch-with-all-false-cases +[] > tests-switch-with-all-false-cases switch > @ * * @@ -90,7 +90,7 @@ switch * > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > switch-complex-case +[] > tests-switch-complex-case [] > c1 false > @ [] > c2 diff --git a/eo-runtime/src/test/eo/org/eolang/sys/os-tests.eo b/eo-runtime/src/test/eo/org/eolang/sys/os-tests.eo index 086315bac8..7f3fc59a32 100644 --- a/eo-runtime/src/test/eo/org/eolang/sys/os-tests.eo +++ b/eo-runtime/src/test/eo/org/eolang/sys/os-tests.eo @@ -31,7 +31,7 @@ +unlint unused-alias # This unit test is supposed to check the functionality of the corresponding object. -[] > checks-os-family +[] > tests-checks-os-family or. > @ or. os.is-windows diff --git a/eo-runtime/src/test/eo/org/eolang/sys/posix-tests.eo b/eo-runtime/src/test/eo/org/eolang/sys/posix-tests.eo index 4ab551567e..ac26ba14f4 100644 --- a/eo-runtime/src/test/eo/org/eolang/sys/posix-tests.eo +++ b/eo-runtime/src/test/eo/org/eolang/sys/posix-tests.eo @@ -32,7 +32,7 @@ +unlint unused-alias # This unit test is supposed to check the functionality of the corresponding object. -[] > invokes-getpid-correctly +[] > tests-invokes-getpid-correctly or. > @ os.is-windows gt. @@ -43,7 +43,7 @@ 0 # This unit test is supposed to check the functionality of the corresponding object. -[] > opens-posix-tcp-socket +[] > tests-opens-posix-tcp-socket code. > sd posix "socket" @@ -59,7 +59,7 @@ * sd # This unit test is supposed to check the functionality of the corresponding object. -[] > closes-posix-tcp-socket +[] > tests-closes-posix-tcp-socket code. > sd posix "socket" @@ -78,7 +78,7 @@ -1 # This unit test is supposed to check the functionality of the corresponding object. -[] > returns-valid-posix-inet-addr-for-localhost +[] > tests-returns-valid-posix-inet-addr-for-localhost code. > addr posix "inet_addr" diff --git a/eo-runtime/src/test/eo/org/eolang/sys/win32-tests.eo b/eo-runtime/src/test/eo/org/eolang/sys/win32-tests.eo index e56ce57f64..09859da30c 100644 --- a/eo-runtime/src/test/eo/org/eolang/sys/win32-tests.eo +++ b/eo-runtime/src/test/eo/org/eolang/sys/win32-tests.eo @@ -32,7 +32,7 @@ +unlint unused-alias # This unit test is supposed to check the functionality of the corresponding object. -[] > returns-valid-win32-inet-addr-for-localhost +[] > tests-returns-valid-win32-inet-addr-for-localhost code. > addr win32 "inet_addr" diff --git a/eo-runtime/src/test/eo/org/eolang/try-tests.eo b/eo-runtime/src/test/eo/org/eolang/try-tests.eo index 2c45ddfa73..17a011abcf 100644 --- a/eo-runtime/src/test/eo/org/eolang/try-tests.eo +++ b/eo-runtime/src/test/eo/org/eolang/try-tests.eo @@ -28,7 +28,7 @@ +unlint object-has-data # This unit test is supposed to check the functionality of the corresponding object. -[] > catches-simple-exception +[] > tests-catches-simple-exception try > @ slice. "some string" @@ -38,7 +38,7 @@ false # This unit test is supposed to check the functionality of the corresponding object. -[] > two-nested-try-blocks +[] > tests-two-nested-try-blocks try > @ try slice. @@ -51,7 +51,7 @@ false # This unit test is supposed to check the functionality of the corresponding object. -[] > try-without-error-block +[] > tests-try-without-error-block eq. > @ try 30.plus 2 @@ -60,7 +60,7 @@ 32 # This unit test is supposed to check the functionality of the corresponding object. -[] > try-malloc-update-catch +[] > tests-try-malloc-update-catch eq. > @ malloc.of 8 diff --git a/eo-runtime/src/test/eo/org/eolang/tuple-tests.eo b/eo-runtime/src/test/eo/org/eolang/tuple-tests.eo index e2aea6f7d0..9a74532fe4 100644 --- a/eo-runtime/src/test/eo/org/eolang/tuple-tests.eo +++ b/eo-runtime/src/test/eo/org/eolang/tuple-tests.eo @@ -28,26 +28,26 @@ +unlint object-has-data # This unit test is supposed to check the functionality of the corresponding object. -[] > makes-tuple-through-special-syntax +[] > tests-makes-tuple-through-special-syntax eq. > @ (* 1 2).length 2 # This unit test is supposed to check the functionality of the corresponding object. -[] > gets-lengths-of-empty-tuple-through-special-syntax +[] > tests-gets-lengths-of-empty-tuple-through-special-syntax eq. > @ *.length 0 # Check that an empty tuples .length equals to zero. -[] > empty-tuple-length +[] > tests-empty-tuple-length [elements] > arr eq. > @ (arr *).elements.length 0 # Check that tuple.length works properly for non-empty tuples. -[] > non-empty-tuple-length-test +[] > tests-non-empty-tuple-length-test [elements] > arr eq. > @ arr @@ -57,14 +57,14 @@ 5 # This unit test is supposed to check the functionality of the corresponding object. -[] > tuple-as-a-bound-attribute-size-0 +[] > tests-tuple-as-a-bound-attribute-size-0 * > anArray eq. > @ anArray.length 0 # This unit test is supposed to check the functionality of the corresponding object. -[] > tuple-as-a-bound-attribute-size-1 +[] > tests-tuple-as-a-bound-attribute-size-1 * > anArray 100 eq. > @ @@ -72,7 +72,7 @@ 100 # This unit test is supposed to check the functionality of the corresponding object. -[] > tuple-as-a-bound-attribute-size-2 +[] > tests-tuple-as-a-bound-attribute-size-2 * > arr 1 2 @@ -85,7 +85,7 @@ 2 # This unit test is supposed to check the functionality of the corresponding object. -[] > tuple-with +[] > tests-tuple-with with. > arr * 1 2 3 "with" @@ -112,7 +112,7 @@ 20 # This unit test is supposed to check the functionality of the corresponding object. -[] > tuple-fluent-with +[] > tests-tuple-fluent-with ((*.with 1).with 2).with 3 > arr and. > @ and. @@ -127,7 +127,7 @@ 3 # This unit test is supposed to check the functionality of the corresponding object. -[] > tuple-fluent-with-indented +[] > tests-tuple-fluent-with-indented * .with 1 .with 2 @@ -145,41 +145,41 @@ 3 # This unit test is supposed to check the functionality of the corresponding object. -[] > gets-lengths-of-empty-tuple +[] > tests-gets-lengths-of-empty-tuple tuple.empty > a eq. > @ a.length 0 # This unit test is supposed to check the functionality of the corresponding object. -[] > gets-lengths-of-empty-tuple-without-additional-obj +[] > tests-gets-lengths-of-empty-tuple-without-additional-obj eq. > @ tuple.empty.length 0 # This unit test is supposed to check the functionality of the corresponding object. -[] > creates-empty-tuple-with-number +[] > tests-creates-empty-tuple-with-number tuple.empty.with 3 > a eq. > @ a.at 0 3 # Test -[] > at-fast-with-first-element +[] > tests-at-fast-with-first-element * 100 101 102 > arr eq. > @ (arr.at 0).at-fast arr 100 # Test -[] > at-fast-with-last-element +[] > tests-at-fast-with-last-element * 100 101 102 > arr eq. > @ (arr.at 2).at-fast arr 102 # This unit test is supposed to check the functionality of the corresponding object. -[] > tuple-empty-fluent-with-indented-keyword +[] > tests-tuple-empty-fluent-with-indented-keyword tuple .empty .with 1 @@ -198,14 +198,14 @@ 3 # This unit test is supposed to check the functionality of the corresponding object. -[] > tuple-with-negative-index-gets-last +[] > tests-tuple-with-negative-index-gets-last * 0 1 2 3 4 > arr eq. > @ arr.at -1 4 # This unit test is supposed to check the functionality of the corresponding object. -[] > tuple-with-negative-index-gets-first +[] > tests-tuple-with-negative-index-gets-first * 0 1 2 3 4 > arr eq. > @ arr.at -5 diff --git a/eo-runtime/src/test/eo/org/eolang/txt/regex-tests.eo b/eo-runtime/src/test/eo/org/eolang/txt/regex-tests.eo index f6aec2b621..2f9c57b4dd 100644 --- a/eo-runtime/src/test/eo/org/eolang/txt/regex-tests.eo +++ b/eo-runtime/src/test/eo/org/eolang/txt/regex-tests.eo @@ -30,15 +30,15 @@ +unlint broken-alias-second # This unit test is supposed to check the functionality of the corresponding object. -[] > matches-regex-against-the-pattern +[] > tests-matches-regex-against-the-pattern (regex "/[a-z]+/").compiled.matches "hello" > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > does-not-matches-regex-against-the-pattern +[] > tests-does-not-matches-regex-against-the-pattern ((regex "/[a-z]+/").compiled.matches "123").not > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > matched-sequence-has-right-border-indexes +[] > tests-matched-sequence-has-right-border-indexes ((regex "/[a-z]+/").match "!hello!").next > n and. > @ 0.eq n.start @@ -47,11 +47,11 @@ 6.eq n.to # This unit test is supposed to check the functionality of the corresponding object. -[] > regex-returns-valid-matched-string-sequence +[] > tests-regex-returns-valid-matched-string-sequence ((regex "/[a-z]+/").match "!hello!").next.text.eq "hello" > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > regex-returns-valid-second-matched-block +[] > tests-regex-returns-valid-second-matched-block ((regex "/[a-z]+/").match "!hello!world!").next.next > second and. > @ and. @@ -92,7 +92,7 @@ ((regex "/[a-z]+/").match "123").next.text > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > regex-matches-dotall-option +[] > tests-regex-matches-dotall-option regex "/(.*)/s" .compiled @@ -100,7 +100,7 @@ "too \\n many \\n line \\n Feed\\n" # This unit test is supposed to check the functionality of the corresponding object. -[] > regex-matches-with-case-insensitive-option +[] > tests-regex-matches-with-case-insensitive-option regex "/(string)/i" .compiled @@ -108,7 +108,7 @@ "StRiNg" # This unit test is supposed to check the functionality of the corresponding object. -[] > regex-matches-with-multiline-option +[] > tests-regex-matches-with-multiline-option regex "/(^([0-9]+).*)/m" .compiled @@ -116,7 +116,7 @@ "1 bottle of water on the wall. \\n1 bottle of water." # This unit test is supposed to check the functionality of the corresponding object. -[] > regex-matches-entire-pattern +[] > tests-regex-matches-entire-pattern regex "/[0-9]/\\d+/" .compiled @@ -124,7 +124,7 @@ "2/75" # This unit test is supposed to check the functionality of the corresponding object. -[] > regex-matches-with-regex-unix-lines +[] > tests-regex-matches-with-regex-unix-lines regex "/(.+)/d" .compiled @@ -132,7 +132,7 @@ "A\\r\\nB\\rC\\nD" # This unit test is supposed to check the functionality of the corresponding object. -[] > regex-matches-with-regex-case-insensitive-and-caps +[] > tests-regex-matches-with-regex-case-insensitive-and-caps regex "/(word)/i" .compiled @@ -140,7 +140,7 @@ "WORD" # This unit test is supposed to check the functionality of the corresponding object. -[] > regex-ignores-comments-in-string +[] > tests-regex-ignores-comments-in-string regex "/(\\d) #ignore this comment/x" .compiled @@ -148,7 +148,7 @@ "4" # This unit test is supposed to check the functionality of the corresponding object. -[] > regex-matches-with-unicode-case-and-insensitive +[] > tests-regex-matches-with-unicode-case-and-insensitive regex "/(yildirim)/ui" .compiled @@ -160,7 +160,7 @@ (regex "(.)+").compiled > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > regex-contains-valid-groups-on-each-matched-block +[] > tests-regex-contains-valid-groups-on-each-matched-block ((regex "/([a-z]+)([1-9]{1})/").compiled.match "!hello1!world2").next > first first.next > second and. > @ diff --git a/eo-runtime/src/test/eo/org/eolang/txt/sprintf-tests.eo b/eo-runtime/src/test/eo/org/eolang/txt/sprintf-tests.eo index ab5faeb4ea..645c051553 100644 --- a/eo-runtime/src/test/eo/org/eolang/txt/sprintf-tests.eo +++ b/eo-runtime/src/test/eo/org/eolang/txt/sprintf-tests.eo @@ -30,7 +30,7 @@ +unlint broken-alias-second # This unit test is supposed to check the functionality of the corresponding object. -[] > prints-simple-string +[] > tests-prints-simple-string eq. > @ "Hello, Jeffrey!" sprintf @@ -38,7 +38,7 @@ * "Jeffrey" # This unit test is supposed to check the functionality of the corresponding object. -[] > prints-complex-string +[] > tests-prints-complex-string eq. > @ "Привет 3.140000 Jeff X!" sprintf @@ -46,7 +46,7 @@ * 3.14 "Jeff" "X" # This unit test is supposed to check the functionality of the corresponding object. -[] > prints-bytes-string +[] > tests-prints-bytes-string eq. > @ "40-45-00-00-00-00-00-00" sprintf @@ -54,7 +54,7 @@ * 42.as-bytes # This unit test is supposed to check the functionality of the corresponding object. -[] > formats-all-objects +[] > tests-formats-all-objects eq. > @ "string Jeff, bytes 4A-65-66-66, float 42.300000, int 14, bool false" sprintf @@ -68,7 +68,7 @@ * "Jeff" # This unit test is supposed to check the functionality of the corresponding object. -[] > sprintf-does-not-fail-if-arguments-more-than-formats +[] > tests-sprintf-does-not-fail-if-arguments-more-than-formats eq. > @ "Hey" sprintf @@ -80,7 +80,7 @@ sprintf "%o" * > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > sprintf-prints-percents +[] > tests-sprintf-prints-percents eq. > @ "%Jeff" sprintf @@ -88,7 +88,7 @@ * "Jeff" # This unit test is supposed to check the functionality of the corresponding object. -[] > sprintf-does-not-print-i64 +[] > tests-sprintf-does-not-print-i64 not. > @ eq. sprintf @@ -97,7 +97,7 @@ "42" # This unit test is supposed to check the functionality of the corresponding object. -[] > sprintf-prints-i64-as-number +[] > tests-sprintf-prints-i64-as-number eq. > @ "42" sprintf diff --git a/eo-runtime/src/test/eo/org/eolang/txt/sscanf-tests.eo b/eo-runtime/src/test/eo/org/eolang/txt/sscanf-tests.eo index 0a30c8e86e..579f4c0927 100644 --- a/eo-runtime/src/test/eo/org/eolang/txt/sscanf-tests.eo +++ b/eo-runtime/src/test/eo/org/eolang/txt/sscanf-tests.eo @@ -33,21 +33,21 @@ +unlint unused-alias # This unit test is supposed to check the functionality of the corresponding object. -[] > sscanf-with-string +[] > tests-sscanf-with-string eq. > @ "hello" value. sscanf "%s" "hello" # This unit test is supposed to check the functionality of the corresponding object. -[] > sscanf-with-int +[] > tests-sscanf-with-int eq. > @ 33 value. sscanf "%d" "33" # This unit test is supposed to check the functionality of the corresponding object. -[] > sscanf-with-float +[] > tests-sscanf-with-float eq. > @ 0.24 value. @@ -58,7 +58,7 @@ sscanf "%l" "error" > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > sscanf-with-string-int-float +[] > tests-sscanf-with-string-int-float eq. > @ list sscanf @@ -67,35 +67,35 @@ * "hello" 33 0.24 # This unit test is supposed to check the functionality of the corresponding object. -[] > sscanf-with-string-with-ending +[] > tests-sscanf-with-string-with-ending eq. > @ "hello" value. sscanf "%s!" "hello!" # This unit test is supposed to check the functionality of the corresponding object. -[] > sscanf-with-complex-string +[] > tests-sscanf-with-complex-string eq. > @ "test" value. sscanf "some%sstring" "someteststring" # This unit test is supposed to check the functionality of the corresponding object. -[] > sscanf-with-complex-int +[] > tests-sscanf-with-complex-int eq. > @ 734987259 value. sscanf "!%d!" "!734987259!" # This unit test is supposed to check the functionality of the corresponding object. -[] > sscanf-with-complex-float +[] > tests-sscanf-with-complex-float eq. > @ 1991.01 value. sscanf "this will be=%f" "this will be=1991.01" # This unit test is supposed to check the functionality of the corresponding object. -[] > sscanf-with-sprintf +[] > tests-sscanf-with-sprintf eq. > @ list sscanf @@ -106,7 +106,7 @@ * "This" 8 # This unit test is supposed to check the functionality of the corresponding object. -[] > sscanf-complex-case +[] > tests-sscanf-complex-case eq. > @ list sscanf diff --git a/eo-runtime/src/test/eo/org/eolang/txt/text-tests.eo b/eo-runtime/src/test/eo/org/eolang/txt/text-tests.eo index bd5cb7d9b6..930422a44c 100644 --- a/eo-runtime/src/test/eo/org/eolang/txt/text-tests.eo +++ b/eo-runtime/src/test/eo/org/eolang/txt/text-tests.eo @@ -32,109 +32,109 @@ +unlint broken-alias-second # This unit test is supposed to check the functionality of the corresponding object. -[] > text-slices-the-origin-string +[] > tests-text-slices-the-origin-string eq. > @ (text "Hello, world!").slice 7 5 "world" # This unit test is supposed to check the functionality of the corresponding object. -[] > trimmed-left-empty-text +[] > tests-trimmed-left-empty-text eq. > @ (text "").trimmed-left "" # This unit test is supposed to check the functionality of the corresponding object. -[] > text-trimmed-left-one-space +[] > tests-text-trimmed-left-one-space eq. > @ (text " s").trimmed-left "s" # This unit test is supposed to check the functionality of the corresponding object. -[] > text-trimmed-left-many-spaces +[] > tests-text-trimmed-left-many-spaces eq. > @ (text " some").trimmed-left "some" # This unit test is supposed to check the functionality of the corresponding object. -[] > text-trimmed-left-only-spaces +[] > tests-text-trimmed-left-only-spaces eq. > @ (text " ").trimmed-left "" # This unit test is supposed to check the functionality of the corresponding object. -[] > trimmed-right-empty-text +[] > tests-trimmed-right-empty-text eq. > @ (text "").trimmed-right "" # This unit test is supposed to check the functionality of the corresponding object. -[] > text-trimmed-right-one-space +[] > tests-text-trimmed-right-one-space eq. > @ (text "s ").trimmed-right "s" # This unit test is supposed to check the functionality of the corresponding object. -[] > text-trimmed-right-many-spaces +[] > tests-text-trimmed-right-many-spaces eq. > @ (text "some ").trimmed-right "some" # This unit test is supposed to check the functionality of the corresponding object. -[] > text-trimmed-right-only-spaces +[] > tests-text-trimmed-right-only-spaces eq. > @ (text " ").trimmed-right "" # This unit test is supposed to check the functionality of the corresponding object. -[] > text-trimmed-one-space-left +[] > tests-text-trimmed-one-space-left eq. > @ (text " some").trimmed "some" # This unit test is supposed to check the functionality of the corresponding object. -[] > text-trimmed-one-space-right +[] > tests-text-trimmed-one-space-right eq. > @ (text "some ").trimmed "some" # This unit test is supposed to check the functionality of the corresponding object. -[] > text-trimmed-one-space-both +[] > tests-text-trimmed-one-space-both eq. > @ (text " some ").trimmed "some" # This unit test is supposed to check the functionality of the corresponding object. -[] > text-trimmed-many-spaces +[] > tests-text-trimmed-many-spaces eq. > @ (text " some ").trimmed "some" # This unit test is supposed to check the functionality of the corresponding object. -[] > text-trimmed-empty +[] > tests-text-trimmed-empty eq. > @ (text "").trimmed "" # This unit test is supposed to check the functionality of the corresponding object. -[] > text-trimmed-only-spaces +[] > tests-text-trimmed-only-spaces eq. > @ (text " ").trimmed "" # This unit test is supposed to check the functionality of the corresponding object. -[] > returns-first-char +[] > tests-returns-first-char eq. > @ "s" (text "some").at 0 # This unit test is supposed to check the functionality of the corresponding object. -[] > returns-third-char +[] > tests-returns-third-char eq. > @ "m" (text "some").at 2 # This unit test is supposed to check the functionality of the corresponding object. -[] > returns-char-at-negative-index +[] > tests-returns-char-at-negative-index eq. > @ "m" (text "some").at -2 @@ -144,7 +144,7 @@ (text "some").at 10 > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > chains-with-other-strings +[] > tests-chains-with-other-strings eq. > @ "Hello, world!" chained. @@ -155,7 +155,7 @@ "!" # This unit test is supposed to check the functionality of the corresponding object. -[] > returns-same-text-on-chaining-with-no-strings +[] > tests-returns-same-text-on-chaining-with-no-strings eq. > @ "Some" chained. @@ -163,20 +163,20 @@ * # This unit test is supposed to check the functionality of the corresponding object. -[] > joined-no-strings +[] > tests-joined-no-strings eq. > @ "" (text "-").joined * # This unit test is supposed to check the functionality of the corresponding object. -[] > joined-one-string +[] > tests-joined-one-string eq. > @ "some" (text "-").joined * "some" # This unit test is supposed to check the functionality of the corresponding object. -[] > joined-many-strings +[] > tests-joined-many-strings eq. > @ "hello-world-dear-friend" (text "-").joined @@ -187,31 +187,31 @@ (text "").repeated -1 > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > text-repeated-zero-times-is-empty +[] > tests-text-repeated-zero-times-is-empty eq. > @ "" (text "some").repeated 0 # This unit test is supposed to check the functionality of the corresponding object. -[] > text-repeated-five-times +[] > tests-text-repeated-five-times eq. > @ "heyheyheyheyhey" (text "hey").repeated 5 # This unit test is supposed to check the functionality of the corresponding object. -[] > index-of-non-existed-substring-with-more-length +[] > tests-index-of-non-existed-substring-with-more-length eq. > @ -1 (text "Hello").index-of "Somebody" # This unit test is supposed to check the functionality of the corresponding object. -[] > index-of-non-existed-substring-with-same-length +[] > tests-index-of-non-existed-substring-with-same-length eq. > @ -1 (text "Hello").index-of "world" # This unit test is supposed to check the functionality of the corresponding object. -[] > index-of-non-existed-substring-with-utf +[] > tests-index-of-non-existed-substring-with-utf eq. > @ -1 index-of. @@ -219,7 +219,7 @@ "x" # This unit test is supposed to check the functionality of the corresponding object. -[] > index-of-existed-substring-with-utf +[] > tests-index-of-existed-substring-with-utf eq. > @ 3 index-of. @@ -227,7 +227,7 @@ "в" # This unit test is supposed to check the functionality of the corresponding object. -[] > returns-valid-index-of-substring +[] > tests-returns-valid-index-of-substring eq. > @ 6 index-of. @@ -235,58 +235,58 @@ "\n" # This unit test is supposed to check the functionality of the corresponding object. -[] > returns-valid-index-of-substring-in-the-end +[] > tests-returns-valid-index-of-substring-in-the-end eq. > @ 6 (text "Hello world").index-of "world" # This unit test is supposed to check the functionality of the corresponding object. -[] > starts-with-substring +[] > tests-starts-with-substring (text "Hello, world").starts-with "Hello" > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > does-not-start-with-substring +[] > tests-does-not-start-with-substring not. > @ (text "Hello, world").starts-with "world" # This unit test is supposed to check the functionality of the corresponding object. -[] > ends-with-substring +[] > tests-ends-with-substring (text "Hello world!").ends-with "world!" > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > does-not-end-with-substring +[] > tests-does-not-end-with-substring not. > @ (text "Hello world!").ends-with "Hello" # This unit test is supposed to check the functionality of the corresponding object. -[] > text-contains-substring +[] > tests-text-contains-substring (text "Hello, world!").contains "o, wo" > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > text-does-not-contain-substring +[] > tests-text-does-not-contain-substring not. > @ (text "Hello, world!").contains "Hey" # This unit test is supposed to check the functionality of the corresponding object. -[] > finds-last-index-of-substring +[] > tests-finds-last-index-of-substring eq. > @ 5 (text "Hey, Hey, Hey").last-index-of "Hey," # This unit test is supposed to check the functionality of the corresponding object. -[] > finds-last-index-of-the-same-string +[] > tests-finds-last-index-of-the-same-string eq. > @ 0 (text "Hello").last-index-of "Hello" # This unit test is supposed to check the functionality of the corresponding object. -[] > last-index-of-non-existed-substring +[] > tests-last-index-of-non-existed-substring eq. > @ -1 (text "Hello, world").last-index-of "somebody" # This unit test is supposed to check the functionality of the corresponding object. -[] > last-index-of-non-existed-substring-with-utf +[] > tests-last-index-of-non-existed-substring-with-utf eq. > @ -1 last-index-of. @@ -294,7 +294,7 @@ "x" # This unit test is supposed to check the functionality of the corresponding object. -[] > last-index-of-existed-substring-with-utf +[] > tests-last-index-of-existed-substring-with-utf eq. > @ 3 last-index-of. @@ -302,27 +302,27 @@ "в" # This unit test is supposed to check the functionality of the corresponding object. -[] > splits-text-by-dash +[] > tests-splits-text-by-dash eq. > @ list (text "a-b-c").split "-" * "a" "b" "c" # This unit test is supposed to check the functionality of the corresponding object. -[] > splits-text-with-empty-strings +[] > tests-splits-text-with-empty-strings eq. > @ list (text "-a-b-").split "-" * "" "a" "b" "" # This unit test is supposed to check the functionality of the corresponding object. -[] > converts-text-to-upper-case +[] > tests-converts-text-to-upper-case eq. > @ "HELLO" (text "hello").up-cased # This unit test is supposed to check the functionality of the corresponding object. -[] > splits-and-returns-strings +[] > tests-splits-and-returns-strings eq. > @ length. at. @@ -333,25 +333,25 @@ 6 # This unit test is supposed to check the functionality of the corresponding object. -[] > converts-text-with-upper-letters-to-upper-case +[] > tests-converts-text-with-upper-letters-to-upper-case eq. > @ "HELLO" (text "HeLlO").up-cased # This unit test is supposed to check the functionality of the corresponding object. -[] > converts-text-to-lower-case +[] > tests-converts-text-to-lower-case eq. > @ "hello" (text "HELLO").low-cased # This unit test is supposed to check the functionality of the corresponding object. -[] > converts-text-with-low-letters-to-lower-case +[] > tests-converts-text-with-low-letters-to-lower-case eq. > @ "hello" (text "HeLlO").low-cased # This unit test is supposed to check the functionality of the corresponding object. -[] > converts-text-to-number +[] > tests-converts-text-to-number eq. > @ 5 (text "5").as-number @@ -361,71 +361,71 @@ (text "Hello").as-number > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > converts-float-text-to-number +[] > tests-converts-float-text-to-number eq. > @ 3.14 (text "3.14").as-number # This unit test is supposed to check the functionality of the corresponding object. -[] > checks-if-text-is-ascii +[] > tests-checks-if-text-is-ascii is-ascii. > @ text "H311oW" # This unit test is supposed to check the functionality of the corresponding object. -[] > checks-if-emoji-is-not-ascii +[] > tests-checks-if-emoji-is-not-ascii not. > @ is-ascii. text "🌵" # This unit test is supposed to check the functionality of the corresponding object. -[] > checks-if-string-of-numbers-is-ascii +[] > tests-checks-if-string-of-numbers-is-ascii is-ascii. > @ text "123" # This unit test is supposed to check the functionality of the corresponding object. -[] > checks-if-simple-text-is-alphanumeric +[] > tests-checks-if-simple-text-is-alphanumeric is-alphanumeric. > @ text "eEo" # This unit test is supposed to check the functionality of the corresponding object. -[] > checks-if-text-with-number-is-alphanumeric +[] > tests-checks-if-text-with-number-is-alphanumeric is-alphanumeric. > @ text "ab3d" # This unit test is supposed to check the functionality of the corresponding object. -[] > checks-if-text-with-dashes-is-not-alphanumeric +[] > tests-checks-if-text-with-dashes-is-not-alphanumeric not. > @ is-alphanumeric. text "-w-" # This unit test is supposed to check the functionality of the corresponding object. -[] > checks-if-simple-text-is-alpha +[] > tests-checks-if-simple-text-is-alpha is-alpha. > @ text "eEo" # This unit test is supposed to check the functionality of the corresponding object. -[] > checks-if-text-with-number-is-not-alpha +[] > tests-checks-if-text-with-number-is-not-alpha not. > @ is-alpha. text "ab3d" # This unit test is supposed to check the functionality of the corresponding object. -[] > checks-if-text-with-dashes-is-not-alpha +[] > tests-checks-if-text-with-dashes-is-not-alpha not. > @ is-alpha. text "-w-" # This unit test is supposed to check the functionality of the corresponding object. -[] > does-not-replaces-if-regex-not-found +[] > tests-does-not-replaces-if-regex-not-found text "Hello, world" .replaced @@ -436,7 +436,7 @@ "Hello, world" # This unit test is supposed to check the functionality of the corresponding object. -[] > replaces-digits-with-string +[] > tests-replaces-digits-with-string text "Hell0, w0rld" .replaced @@ -447,7 +447,7 @@ "Hello, world" # This unit test is supposed to check the functionality of the corresponding object. -[] > replaces-slashes-to-windows-separator +[] > tests-replaces-slashes-to-windows-separator text "C:\\Windows/foo\\bar/hello.txt" .replaced @@ -458,7 +458,7 @@ "C:\\Windows\\foo\\bar\\hello.txt" # This unit test is supposed to check the functionality of the corresponding object. -[] > replaces-windows-path-with-slash +[] > tests-replaces-windows-path-with-slash text "C:\\Windows\\Users\\AppLocal\\shrek" .replaced @@ -469,7 +469,7 @@ "C/Windows/Users/AppLocal/shrek" # This unit test is supposed to check the functionality of the corresponding object. -[] > sanitizes-windows-path-with-regex +[] > tests-sanitizes-windows-path-with-regex text "foo\\bar<:>?*\"|baz\\asdf" .replaced diff --git a/eo-runtime/src/test/eo/org/eolang/while-tests.eo b/eo-runtime/src/test/eo/org/eolang/while-tests.eo index ce3f021f6b..d09ce5ed43 100644 --- a/eo-runtime/src/test/eo/org/eolang/while-tests.eo +++ b/eo-runtime/src/test/eo/org/eolang/while-tests.eo @@ -29,7 +29,7 @@ +unlint broken-ref # This unit test is supposed to check the functionality of the corresponding object. -[] > while-dataizes-only-first-cycle +[] > tests-while-dataizes-only-first-cycle eq. > @ 0 malloc.for @@ -40,14 +40,14 @@ m.put i > [i] >> # This unit test is supposed to check the functionality of the corresponding object. -[] > simple-while-with-false-first +[] > tests-simple-while-with-false-first not. > @ while > res false > [i] true > [i] # This unit test is supposed to check the functionality of the corresponding object. -[] > simple-bool-expression-via-malloc-in-while +[] > tests-simple-bool-expression-via-malloc-in-while eq. > @ malloc.for true @@ -58,7 +58,7 @@ false # This unit test is supposed to check the functionality of the corresponding object. -[] > last-while-dataization-object +[] > tests-last-while-dataization-object eq. > @ malloc.for 0 @@ -69,14 +69,14 @@ 3 # This unit test is supposed to check the functionality of the corresponding object. -[] > last-while-dataization-object-with-false-condition +[] > tests-last-while-dataization-object-with-false-condition not. > @ while 1.gt 2 > [i] true > [i] # This unit test is supposed to check the functionality of the corresponding object. -[] > while-simple-iteration +[] > tests-while-simple-iteration eq. > @ malloc.for 0 @@ -87,7 +87,7 @@ 9 # This unit test is supposed to check the functionality of the corresponding object. -[] > iterating-tuple-with-while-using-internal-iterator +[] > tests-iterating-tuple-with-while-using-internal-iterator * 1 1 1 1 > arr arr.length.plus -1 > max malloc.for > data @@ -114,7 +114,7 @@ data.eq arr.length > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > iterating-tuple-with-while-using-external-iterator +[] > tests-iterating-tuple-with-while-using-external-iterator * 1 1 1 1 > arr arr.length.plus -1 > max malloc.for > data @@ -136,7 +136,7 @@ data.eq arr.length > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > iterating-tuple-with-while-without-body-multiple +[] > tests-iterating-tuple-with-while-without-body-multiple * 1 1 1 > arr arr.length > max malloc.for > data @@ -166,7 +166,7 @@ data.eq arr.length > @ # This unit test is supposed to check the functionality of the corresponding object. -[] > iterating-tuple-with-while-without-body-single +[] > tests-iterating-tuple-with-while-without-body-single * 1 > arr arr.length > max malloc.for > data diff --git a/eo-runtime/src/test/groovy/check-target-files.groovy b/eo-runtime/src/test/groovy/check-target-files.groovy index 0b8821322d..6d8afeab92 100644 --- a/eo-runtime/src/test/groovy/check-target-files.groovy +++ b/eo-runtime/src/test/groovy/check-target-files.groovy @@ -39,7 +39,7 @@ List expected = [ 'eo-test/unphi/org/eolang/number-tests.xmir', 'generated-sources/EOorg/EOeolang/EOdataized.java', 'generated-sources/EOorg/EOeolang/EOnet/EOsocket.java', - 'generated-test-sources/EOorg/EOeolang/EOand_with_zeroTest.java', + 'generated-test-sources/EOorg/EOeolang/EOtests_and_with_zeroTest.java', 'classes/EO-SOURCES/org/eolang/false.eo', ] diff --git a/pom.xml b/pom.xml index 92dd7e850d..25660a9905 100644 --- a/pom.xml +++ b/pom.xml @@ -255,6 +255,11 @@ SOFTWARE. 3.0.1u2 provided
+ + com.google.code.findbugs + jsr305 + 3.0.2 + org.eolang jucs