diff --git a/.codenarc b/.codenarc
new file mode 100644
index 0000000000..8045a011be
--- /dev/null
+++ b/.codenarc
@@ -0,0 +1,452 @@
+ruleset {
+ // rulesets/basic.xml
+ AssertWithinFinallyBlock
+ AssignmentInConditional
+ BigDecimalInstantiation
+ BitwiseOperatorInConditional
+ BooleanGetBoolean
+ BrokenNullCheck
+ BrokenOddnessCheck
+ ClassForName
+ ComparisonOfTwoConstants
+ ComparisonWithSelf
+ ConstantAssertExpression
+ ConstantIfExpression
+ ConstantTernaryExpression
+ DeadCode
+ DoubleNegative
+ DuplicateCaseStatement
+ DuplicateMapKey
+ DuplicateSetValue
+ EmptyCatchBlock
+ EmptyClass
+ EmptyElseBlock
+ EmptyFinallyBlock
+ EmptyForStatement
+ EmptyIfStatement
+ EmptyInstanceInitializer
+ EmptyMethod
+ EmptyStaticInitializer
+ EmptySwitchStatement
+ EmptySynchronizedStatement
+ EmptyTryBlock
+ EmptyWhileStatement
+ EqualsAndHashCode
+ EqualsOverloaded
+ ExplicitGarbageCollection
+ ForLoopShouldBeWhileLoop
+ HardCodedWindowsFileSeparator
+ HardCodedWindowsRootDirectory
+ IntegerGetInteger
+ MultipleUnaryOperators
+ ParameterAssignmentInFilterClosure
+ RandomDoubleCoercedToZero
+ RemoveAllOnSelf
+ ReturnFromFinallyBlock
+ ThrowExceptionFromFinallyBlock
+
+ // rulesets/braces.xml
+ ElseBlockBraces
+ ForStatementBraces
+ IfStatementBraces
+ WhileStatementBraces
+
+ // rulesets/comments.xml
+ ClassJavadoc
+ JavadocConsecutiveEmptyLines
+ JavadocEmptyAuthorTag
+ JavadocEmptyExceptionTag
+ JavadocEmptyFirstLine
+ JavadocEmptyLastLine
+ JavadocEmptyParamTag
+ JavadocEmptyReturnTag
+ JavadocEmptySeeTag
+ JavadocEmptySinceTag
+ JavadocEmptyThrowsTag
+ JavadocEmptyVersionTag
+ JavadocMissingExceptionDescription
+ JavadocMissingParamDescription
+ JavadocMissingThrowsDescription
+ SpaceAfterCommentDelimiter
+ SpaceBeforeCommentDelimiter
+
+ // rulesets/concurrency.xml
+ BusyWait
+ DoubleCheckedLocking
+ InconsistentPropertyLocking
+ InconsistentPropertySynchronization
+ NestedSynchronization
+ NoScriptBindings
+ StaticCalendarField
+ StaticConnection
+ StaticDateFormatField
+ StaticMatcherField
+ StaticSimpleDateFormatField
+ SynchronizedMethod
+ SynchronizedOnBoxedPrimitive
+ SynchronizedOnGetClass
+ SynchronizedOnReentrantLock
+ SynchronizedOnString
+ SynchronizedOnThis
+ SynchronizedReadObjectMethod
+ SystemRunFinalizersOnExit
+ ThisReferenceEscapesConstructor
+ ThreadGroup
+ ThreadLocalNotStaticFinal
+ ThreadYield
+ UseOfNotifyMethod
+ VolatileArrayField
+ VolatileLongOrDoubleField
+ WaitOutsideOfWhileLoop
+
+ // rulesets/convention.xml
+ ConfusingTernary
+ CouldBeElvis
+ CouldBeSwitchStatement
+ FieldTypeRequired
+ HashtableIsObsolete
+ IfStatementCouldBeTernary
+ ImplicitClosureParameter
+ ImplicitReturnStatement
+ InvertedCondition
+ InvertedIfElse
+ LongLiteralWithLowerCaseL
+ MethodParameterTypeRequired
+ MethodReturnTypeRequired
+ NoDef
+ NoDouble
+ NoFloat
+ NoJavaUtilDate
+ NoTabCharacter
+ ParameterReassignment
+ PublicMethodsBeforeNonPublicMethods
+ StaticFieldsBeforeInstanceFields
+ StaticMethodsBeforeInstanceMethods
+ TernaryCouldBeElvis
+ TrailingComma
+ VariableTypeRequired
+ VectorIsObsolete
+
+ // rulesets/design.xml
+ AbstractClassWithPublicConstructor
+ AbstractClassWithoutAbstractMethod
+ AssignmentToStaticFieldFromInstanceMethod
+ BooleanMethodReturnsNull
+ BuilderMethodWithSideEffects
+ CloneableWithoutClone
+ CloseWithoutCloseable
+ CompareToWithoutComparable
+ ConstantsOnlyInterface
+ EmptyMethodInAbstractClass
+ FinalClassWithProtectedMember
+ ImplementationAsType
+ Instanceof
+ LocaleSetDefault
+ NestedForLoop
+ OptionalCollectionReturnType
+ OptionalField
+ OptionalMethodParameter
+ PrivateFieldCouldBeFinal
+ PublicInstanceField
+ ReturnsNullInsteadOfEmptyArray
+ ReturnsNullInsteadOfEmptyCollection
+ SimpleDateFormatMissingLocale
+ StatelessSingleton
+ ToStringReturnsNull
+
+ // rulesets/dry.xml
+ DuplicateListLiteral
+ DuplicateMapLiteral
+ DuplicateNumberLiteral
+ DuplicateStringLiteral
+
+ // rulesets/enhanced.xml
+ CloneWithoutCloneable
+ JUnitAssertEqualsConstantActualValue
+ MissingOverrideAnnotation
+ UnsafeImplementationAsMap
+
+ // rulesets/exceptions.xml
+ CatchArrayIndexOutOfBoundsException
+ CatchError
+ CatchException
+ CatchIllegalMonitorStateException
+ CatchIndexOutOfBoundsException
+ CatchNullPointerException
+ CatchRuntimeException
+ CatchThrowable
+ ConfusingClassNamedException
+ ExceptionExtendsError
+ ExceptionExtendsThrowable
+ ExceptionNotThrown
+ MissingNewInThrowStatement
+ ReturnNullFromCatchBlock
+ SwallowThreadDeath
+ ThrowError
+ ThrowException
+ ThrowNullPointerException
+ ThrowRuntimeException
+ ThrowThrowable
+
+ // rulesets/formatting.xml
+ BlankLineBeforePackage
+ BlockEndsWithBlankLine
+ BlockStartsWithBlankLine
+ BracesForClass
+ BracesForForLoop
+ BracesForIfElse
+ BracesForMethod
+ BracesForTryCatchFinally
+ ClassEndsWithBlankLine
+ ClassStartsWithBlankLine
+ ClosureStatementOnOpeningLineOfMultipleLineClosure
+ ConsecutiveBlankLines
+ FileEndsWithoutNewline
+ Indentation
+ LineLength
+ MissingBlankLineAfterImports
+ MissingBlankLineAfterPackage
+ MissingBlankLineBeforeAnnotatedField
+ SpaceAfterCatch
+ SpaceAfterClosingBrace
+ SpaceAfterComma
+ SpaceAfterFor
+ SpaceAfterIf
+ SpaceAfterMethodCallName
+ SpaceAfterMethodDeclarationName
+ SpaceAfterNotOperator
+ SpaceAfterOpeningBrace
+ SpaceAfterSemicolon
+ SpaceAfterSwitch
+ SpaceAfterWhile
+ SpaceAroundClosureArrow
+ SpaceAroundMapEntryColon
+ SpaceAroundOperator
+ SpaceBeforeClosingBrace
+ SpaceBeforeOpeningBrace
+ SpaceInsideParentheses
+ TrailingWhitespace
+
+ // rulesets/generic.xml
+ IllegalClassMember
+ IllegalClassReference
+ IllegalPackageReference
+ IllegalRegex
+ IllegalString
+ IllegalSubclass
+ RequiredRegex
+ RequiredString
+ StatelessClass
+
+ // rulesets/grails.xml
+ GrailsDomainGormMethods
+ GrailsDomainHasEquals
+ GrailsDomainHasToString
+ GrailsDomainReservedSqlKeywordName
+ GrailsDomainStringPropertyMaxSize
+ GrailsDomainWithServiceReference
+ GrailsDuplicateConstraint
+ GrailsDuplicateMapping
+ GrailsMassAssignment
+ GrailsPublicControllerMethod
+ GrailsServletContextReference
+ GrailsStatelessService
+
+ // rulesets/groovyism.xml
+ AssignCollectionSort
+ AssignCollectionUnique
+ ClosureAsLastMethodParameter
+ CollectAllIsDeprecated
+ ConfusingMultipleReturns
+ ExplicitArrayListInstantiation
+ ExplicitCallToAndMethod
+ ExplicitCallToCompareToMethod
+ ExplicitCallToDivMethod
+ ExplicitCallToEqualsMethod
+ ExplicitCallToGetAtMethod
+ ExplicitCallToLeftShiftMethod
+ ExplicitCallToMinusMethod
+ ExplicitCallToModMethod
+ ExplicitCallToMultiplyMethod
+ ExplicitCallToOrMethod
+ ExplicitCallToPlusMethod
+ ExplicitCallToPowerMethod
+ ExplicitCallToPutAtMethod
+ ExplicitCallToRightShiftMethod
+ ExplicitCallToXorMethod
+ ExplicitHashMapInstantiation
+ ExplicitHashSetInstantiation
+ ExplicitLinkedHashMapInstantiation
+ ExplicitLinkedListInstantiation
+ ExplicitStackInstantiation
+ ExplicitTreeSetInstantiation
+ GStringAsMapKey
+ GStringExpressionWithinString
+ GetterMethodCouldBeProperty
+ GroovyLangImmutable
+ UseCollectMany
+ UseCollectNested
+
+ // rulesets/imports.xml
+ DuplicateImport
+ ImportFromSamePackage
+ ImportFromSunPackages
+ MisorderedStaticImports
+ NoWildcardImports
+ UnnecessaryGroovyImport
+ UnusedImport
+
+ // rulesets/jdbc.xml
+ DirectConnectionManagement
+ JdbcConnectionReference
+ JdbcResultSetReference
+ JdbcStatementReference
+
+ // rulesets/jenkins.xml
+ ClassNotSerializable
+ ClosureInGString
+ CpsCallFromNonCpsMethod
+ ExpressionInCpsMethodNotSerializable
+ ForbiddenCallInCpsMethod
+ ObjectOverrideOnlyNonCpsMethods
+ ParameterOrReturnTypeNotSerializable
+
+ // rulesets/junit.xml
+ ChainedTest
+ CoupledTestCase
+ JUnitAssertAlwaysFails
+ JUnitAssertAlwaysSucceeds
+ JUnitFailWithoutMessage
+ JUnitLostTest
+ JUnitPublicField
+ JUnitPublicNonTestMethod
+ JUnitPublicProperty
+ JUnitSetUpCallsSuper
+ JUnitStyleAssertions
+ JUnitTearDownCallsSuper
+ JUnitTestMethodWithoutAssert
+ JUnitUnnecessarySetUp
+ JUnitUnnecessaryTearDown
+ JUnitUnnecessaryThrowsException
+ SpockIgnoreRestUsed
+ SpockMissingAssert
+ UnnecessaryFail
+ UseAssertEqualsInsteadOfAssertTrue
+ UseAssertFalseInsteadOfNegation
+ UseAssertNullInsteadOfAssertEquals
+ UseAssertSameInsteadOfAssertTrue
+ UseAssertTrueInsteadOfAssertEquals
+ UseAssertTrueInsteadOfNegation
+
+ // rulesets/logging.xml
+ LoggerForDifferentClass
+ LoggerWithWrongModifiers
+ LoggingSwallowsStacktrace
+ MultipleLoggers
+ PrintStackTrace
+ SystemErrPrint
+ SystemOutPrint
+
+ // rulesets/naming.xml
+ AbstractClassName
+ ClassName
+ ClassNameSameAsFilename
+ ClassNameSameAsSuperclass
+ ConfusingMethodName
+ FactoryMethodName
+ FieldName
+ InterfaceName
+ InterfaceNameSameAsSuperInterface
+ MethodName
+ ObjectOverrideMisspelledMethodName
+ PackageName
+ PackageNameMatchesFilePath
+ ParameterName
+ PropertyName
+ VariableName
+
+ // rulesets/security.xml
+ FileCreateTempFile
+ InsecureRandom
+ NonFinalPublicField
+ NonFinalSubclassOfSensitiveInterface
+ ObjectFinalize
+ PublicFinalizeMethod
+ SystemExit
+ UnsafeArrayDeclaration
+
+ // rulesets/serialization.xml
+ EnumCustomSerializationIgnored
+ NonSerializableFieldInSerializableClass
+ SerialPersistentFields
+ SerialVersionUID
+ SerializableClassMustDefineSerialVersionUID
+
+ // rulesets/size.xml
+ AbcMetric // Requires the GMetrics jar
+ ClassSize
+ CrapMetric // Requires the GMetrics jar and a Cobertura coverage file
+ CyclomaticComplexity // Requires the GMetrics jar
+ MethodCount
+ MethodSize
+ NestedBlockDepth
+ ParameterCount
+
+ // rulesets/unnecessary.xml
+ AddEmptyString
+ ConsecutiveLiteralAppends
+ ConsecutiveStringConcatenation
+ UnnecessaryBigDecimalInstantiation
+ UnnecessaryBigIntegerInstantiation
+ UnnecessaryBooleanExpression
+ UnnecessaryBooleanInstantiation
+ UnnecessaryCallForLastElement
+ UnnecessaryCallToSubstring
+ UnnecessaryCast
+ UnnecessaryCatchBlock
+ UnnecessaryCollectCall
+ UnnecessaryCollectionCall
+ UnnecessaryConstructor
+ UnnecessaryDefInFieldDeclaration
+ UnnecessaryDefInMethodDeclaration
+ UnnecessaryDefInVariableDeclaration
+ UnnecessaryDotClass
+ UnnecessaryDoubleInstantiation
+ UnnecessaryElseStatement
+ UnnecessaryFinalOnPrivateMethod
+ UnnecessaryFloatInstantiation
+ UnnecessaryGString
+ UnnecessaryGetter
+ UnnecessaryIfStatement
+ UnnecessaryInstanceOfCheck
+ UnnecessaryInstantiationToGetClass
+ UnnecessaryIntegerInstantiation
+ UnnecessaryLongInstantiation
+ UnnecessaryModOne
+ UnnecessaryNullCheck
+ UnnecessaryNullCheckBeforeInstanceOf
+ UnnecessaryObjectReferences
+ UnnecessaryOverridingMethod
+ UnnecessaryPackageReference
+ UnnecessaryParenthesesForMethodCallWithClosure
+ UnnecessaryPublicModifier
+ UnnecessaryReturnKeyword
+ UnnecessarySafeNavigationOperator
+ UnnecessarySelfAssignment
+ UnnecessarySemicolon
+ UnnecessarySetter
+ UnnecessaryStringInstantiation
+ UnnecessaryTernaryExpression
+ UnnecessaryToString
+ UnnecessaryTransientModifier
+
+ // rulesets/unused.xml
+ UnusedArray
+ UnusedMethodParameter
+ UnusedObject
+ UnusedPrivateField
+ UnusedPrivateMethod
+ UnusedPrivateMethodParameter
+ UnusedVariable
+
+}
diff --git a/.github/workflows/codenarc.yml b/.github/workflows/codenarc.yml
index 1b436eeaf1..60e9626e7b 100644
--- a/.github/workflows/codenarc.yml
+++ b/.github/workflows/codenarc.yml
@@ -47,4 +47,4 @@ jobs:
-maxPriority2Violations=50 \
-maxPriority3Violations=200 \
-failOnError=true \
- -rulesetfiles=rulesets/basic.xml,rulesets/braces.xml,rulesets/comments.xml,rulesets/concurrency.xml,rulesets/convention.xml,rulesets/design.xml,rulesets/dry.xml,rulesets/enhanced.xml,rulesets/exceptions.xml,rulesets/formatting.xml,rulesets/generic.xml,rulesets/groovyism.xml,rulesets/imports.xml,rulesets/logging.xml,rulesets/naming.xml,rulesets/size.xml,rulesets/unnecessary.xml,rulesets/unused.xml
+ -rulesetfiles=file:.codenarc
diff --git a/eo-parser/src/main/antlr4/org/eolang/parser/Phi.g4 b/eo-parser/src/main/antlr4/org/eolang/parser/Phi.g4
index e44380e457..89fb0692f6 100644
--- a/eo-parser/src/main/antlr4/org/eolang/parser/Phi.g4
+++ b/eo-parser/src/main/antlr4/org/eolang/parser/Phi.g4
@@ -83,7 +83,7 @@ lambdaBinding
;
FUNCTION
- : [A-Z][A-Za-z_φ]*
+ : [A-Z][A-Z0-9a-z_φ]*
;
application
diff --git a/eo-parser/src/test/resources/org/eolang/parser/phi-syntax/all-the-basics.phi b/eo-parser/src/test/resources/org/eolang/parser/phi-syntax/all-the-basics.phi
index 6afdaad4e1..e185692adb 100644
--- a/eo-parser/src/test/resources/org/eolang/parser/phi-syntax/all-the-basics.phi
+++ b/eo-parser/src/test/resources/org/eolang/parser/phi-syntax/all-the-basics.phi
@@ -12,7 +12,7 @@
hi-大家 ↦ ⟦ ⟧,
α0 ↦ Φ () () (),
α65536 ↦ Φ.r,
- k ↦ ⟦ λ ⤍ FunctionName, α0 ↦ ⟦ λ ⤍ FunctionName, Δ ⤍ 42- ⟧ ⟧,
+ k ↦ ⟦ λ ⤍ Function_Name_i64, α0 ↦ ⟦ λ ⤍ FunctionName, Δ ⤍ 42- ⟧ ⟧,
terminator-application ↦ ⊥ (t ↦ ξ.t),
terminator-dispatch ↦ ⊥.t,
string ↦ "Hello",
diff --git a/eo-runtime/pom.xml b/eo-runtime/pom.xml
index ed104d2497..4ceac5f8dd 100644
--- a/eo-runtime/pom.xml
+++ b/eo-runtime/pom.xml
@@ -211,10 +211,11 @@ SOFTWARE.
eo-maven-plugin
${project.version}
- ${project.basedir}/target/eo-foreign.csv
+ ${project.build.directory}/eo-foreign.csv
csv
false
true
+ ${project.build.directory}/eo/unphi
@@ -226,6 +227,7 @@ SOFTWARE.
lint
transpile
xmir-to-phi
+ phi-to-xmir
copy
unplace
unspile
@@ -249,19 +251,22 @@ SOFTWARE.
assemble
lint
xmir-to-phi
+ phi-to-xmir
transpile
binarize
test
${project.basedir}/src/test/eo
- ${project.basedir}/target/eo-test
+ ${project.build.directory}/eo-test
+ ${project.build.directory}/eo-test/2-optimize
+ ${project.build.directory}/eo-test/phi
+ ${project.build.directory}/eo-test/phi
+ ${project.build.directory}/eo-test/unphi
false
true
false
-
- ${project.basedir}/target/generated-test-sources
-
+ ${project.build.directory}/generated-test-sources
false
true
diff --git a/eo-runtime/src/test/groovy/check-all-java-classes-compiled.groovy b/eo-runtime/src/test/groovy/check-all-java-classes-compiled.groovy
index f8661aa232..ce31836349 100644
--- a/eo-runtime/src/test/groovy/check-all-java-classes-compiled.groovy
+++ b/eo-runtime/src/test/groovy/check-all-java-classes-compiled.groovy
@@ -26,41 +26,33 @@ import java.nio.file.Files
import java.nio.file.Path
import java.util.stream.Collectors
-println 'Verify that all java classes were compiled successfully'
-
Path binaries = basedir.toPath()
- .resolve("target")
- .resolve("classes")
- .resolve("org")
- .resolve("eolang");
+ .resolve("target")
+ .resolve("classes")
+ .resolve("org")
+ .resolve("eolang");
Path classes = basedir.toPath()
- .resolve("src")
- .resolve("main")
- .resolve("java")
- .resolve("org")
- .resolve("eolang")
+ .resolve("src")
+ .resolve("main")
+ .resolve("java")
+ .resolve("org")
+ .resolve("eolang")
Set expected = Files.walk(classes)
- .filter(it -> {
- it.toString().endsWith(".java")
- })
- .map(Path::getFileName)
- .map(Path::toString)
- .map(it -> {
- return it.replace(".java", ".class")
- }).collect(Collectors.toSet())
+ .filter(it -> {
+ it.toString().endsWith(".java")
+ })
+ .map(Path::getFileName)
+ .map(Path::toString)
+ .map(it -> {
+ return it.replace(".java", ".class")
+ }).collect(Collectors.toSet())
Set actual = Files.walk(binaries)
- .filter(it -> {
- it.toString().endsWith(".class")
- })
- .map(Path::getFileName)
- .map(Path::toString)
- .collect(Collectors.toSet())
+ .filter(it -> {
+ it.toString().endsWith(".class")
+ })
+ .map(Path::getFileName)
+ .map(Path::toString)
+ .collect(Collectors.toSet())
if (!actual.containsAll(expected)) {
- throw new IllegalStateException(
- String.format(
- "Not all classes are compiled\nExpected %s\nActual %s",
- expected,
- actual
- )
- )
+ fail("Not all classes are compiled\nExpected ${expected}\nActual ${actual}")
}
diff --git a/eo-runtime/src/test/groovy/check-folders-numbering.groovy b/eo-runtime/src/test/groovy/check-folders-numbering.groovy
index 8adaa73d50..d6b94d5dd2 100644
--- a/eo-runtime/src/test/groovy/check-folders-numbering.groovy
+++ b/eo-runtime/src/test/groovy/check-folders-numbering.groovy
@@ -24,30 +24,31 @@
import java.util.stream.Collectors
-target = basedir.toPath().resolve("target").resolve("eo")
+target = basedir.toPath().resolve('target/eo')
List directories = target.toFile().listFiles(new FileFilter() {
- @Override
- boolean accept(final File pathname) {
- return pathname.isDirectory()
- }
+ @Override
+ boolean accept(final File pathname) {
+ return pathname.isDirectory()
+ }
})
-List allowed = [
- '1-parse',
- '2-optimize',
- '3-shake',
- '4-pull',
- '5-resolve',
- '6-lint',
- '7-pre',
- '8-transpile',
- 'phi'
+var allowed = [
+ '1-parse',
+ '2-optimize',
+ '3-shake',
+ '4-pull',
+ '5-resolve',
+ '6-lint',
+ '7-pre',
+ '8-transpile',
+ 'phi',
+ 'unphi'
]
List allowedDirs = allowed.stream()
- .map { target.resolve(it).toFile() }
- .collect(Collectors.toList())
+ .map { target.resolve(it).toFile() }
+ .collect(Collectors.toList())
+
for (dir in directories) {
- if (!allowedDirs.contains(dir)) {
- fail(String.format("The directory '%s' is not expected to be here. Allowed directories %s", dir.name, allowed));
- }
+ if (!allowedDirs.contains(dir)) {
+ fail("The directory '${dir.name}' is not expected to be here");
+ }
}
-true
diff --git a/eo-runtime/src/test/groovy/check-runtime-deps.groovy b/eo-runtime/src/test/groovy/check-runtime-deps.groovy
index 2a17891e7b..7582bea862 100644
--- a/eo-runtime/src/test/groovy/check-runtime-deps.groovy
+++ b/eo-runtime/src/test/groovy/check-runtime-deps.groovy
@@ -29,19 +29,11 @@
*/
import groovy.xml.XmlSlurper
-def pom = new File("pom.xml").text
+def pom = new File('pom.xml').text
def project = new XmlSlurper().parseText(pom)
-println 'Verify that there are no any dependencies in eo-runtime except those that are needed for tests'
-
project.dependencies.dependency.each {
- if (it.scope.text() != 'test' && it.scope.text() != 'provided')
- fail(
- String.format(
- 'Dependency %s.%s must be in "test" or "provided" scope',
- it.groupId.text(), it.artifactId.text()
- )
- )
+ if (it.scope.text() != 'test' && it.scope.text() != 'provided') {
+ fail("Dependency ${it.groupId.text()}.${it.artifactId.text()} must be in either 'test' or 'provided' scope")
+ }
}
-
-true
diff --git a/eo-runtime/src/test/groovy/check-target-files.groovy b/eo-runtime/src/test/groovy/check-target-files.groovy
new file mode 100644
index 0000000000..afc3d290d2
--- /dev/null
+++ b/eo-runtime/src/test/groovy/check-target-files.groovy
@@ -0,0 +1,54 @@
+/**
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2016-2024 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.
+ */
+
+import java.nio.file.Paths
+
+var expected = [
+ 'eo-foreign.csv',
+ 'eo/1-parse/org/eolang/bytes.xmir',
+ 'eo/1-parse/org/eolang/fs/dir.xmir',
+ 'eo/2-optimize/org/eolang/error.xmir',
+ 'eo/2-optimize/org/eolang/sys/os.xmir',
+ 'eo/6-lint/org/eolang/go.xmir',
+ 'eo/8-transpile/org/eolang/malloc.xmir',
+ 'eo/phi/org/eolang/number.phi',
+ 'eo/unphi/org/eolang/number.xmir',
+ 'eo-test/1-parse/org/eolang/bool-tests.xmir',
+ 'eo-test/2-optimize/org/eolang/go-tests.xmir',
+ 'eo-test/6-lint/org/eolang/dataized-tests.xmir',
+ 'eo-test/8-transpile/org/eolang/runtime-tests.xmir',
+ 'eo-test/phi/org/eolang/number-tests.phi',
+ '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',
+ 'classes/EO-SOURCES/org/eolang/false.eo',
+]
+
+for (path in expected) {
+ var f = Paths.get('eo-runtime/target').resolve(path).toFile()
+ if (!f.exists()) {
+ fail("The file '${f}' is not present")
+ }
+}
diff --git a/eo-runtime/src/test/groovy/verify.groovy b/eo-runtime/src/test/groovy/verify.groovy
index de9044a168..057510c3c3 100644
--- a/eo-runtime/src/test/groovy/verify.groovy
+++ b/eo-runtime/src/test/groovy/verify.groovy
@@ -29,14 +29,13 @@ import java.nio.file.Path
* To add new validation create new script in this folder and add it
* to the list below.
*/
-Path folder = basedir.toPath().resolve("src").resolve("test").resolve("groovy")
-tests = [
- 'check-folders-numbering.groovy',
- 'check-all-java-classes-compiled.groovy',
- 'check-runtime-deps.groovy'
+Path folder = basedir.toPath().resolve('src/test/groovy')
+var tests = [
+ 'check-folders-numbering.groovy',
+ 'check-all-java-classes-compiled.groovy',
+ 'check-runtime-deps.groovy',
+ 'check-target-files.groovy',
]
for (it in tests) {
- def res = evaluate folder.resolve(it).toFile()
- println String.format('Verified with %s - OK. Result: %s', it, res)
+ evaluate folder.resolve(it).toFile()
}
-true
\ No newline at end of file