Skip to content

Commit

Permalink
#39 works with sin
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Oct 11, 2024
1 parent 7dec52f commit fe99c87
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/it/simple/src/main/java/org/eolang/hone/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
*/
public class App {
public static void main(String[] args) {
double angle = 42.0;
double angle = 33.0;
double sin = Math.sin(angle);
System.out.printf("sin(%f) = %f\n", angle, sin);
}
Expand Down
3 changes: 2 additions & 1 deletion src/it/simple/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@

String log = new File(basedir, 'build.log').text;
assert log.contains("BUILD SUCCESS")
assert log.contains("sin(42.000000) = -0.916522")

true
true
2 changes: 0 additions & 2 deletions src/main/resources/org/eolang/hone/docker/entry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ mvn "${opts[@]}" \
"-Deo.phiInputDir=${TARGET}/generated-sources/jeo-disassemble" \
"-Deo.phiOutputDir=${TARGET}/generated-sources/phi"

#cp -R "${TARGET}/generated-sources/phi" "${TARGET}/generated-sources/phi-optimized"

SELF=$(dirname "$0")
from=${TARGET}/generated-sources/phi
to=${TARGET}/generated-sources/phi-optimized
Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/org/eolang/hone/docker/simple.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
title: "simple"
rules:
- name: simple
description: 'just a simple one, to test'
description: 'change 33 double to 42 double'
pattern: |
⟦ !τ ↦ !b, !B ⟧.!τ
Φ.org.eolang.bytes ( Δ ⤍ 40-40-80-00-00-00-00-00 )
result: |
!b
Φ.org.eolang.bytes ( Δ ⤍ 40-45-00-00-00-00-00-00 )
when: [ ]
tests: [ ]
4 changes: 2 additions & 2 deletions src/test/java/org/eolang/hone/BuildMojoTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ void skipsOptimizationOnFlag(@TempDir final Path dir) throws Exception {
.goals("build")
.configuration()
.set("skip", true);
f.exec("test", "--debug");
f.exec("test");
MatcherAssert.assertThat(
"the Docker image building step must be skipped",
f.log(),
Expand All @@ -74,7 +74,7 @@ void buildsDockerImage(@TempDir final Path dir) throws Exception {
.goals("build")
.configuration()
.set("image", "hone:local");
f.exec("generate-resources", "--debug");
f.exec("generate-resources");
MatcherAssert.assertThat(
"the build must be successful",
f.log(),
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/org/eolang/hone/OptimizeMojoTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ void skipsOptimizationOnFlag(@TempDir final Path dir) throws Exception {
.goals("optimize")
.configuration()
.set("skip", true);
f.exec("test", "--debug");
f.exec("test");
MatcherAssert.assertThat(
"the optimization step must be skipped",
f.log(),
Expand Down Expand Up @@ -81,7 +81,7 @@ void optimizesSimpleApp(@TempDir final Path dir) throws Exception {
.goals("build", "optimize", "rmi")
.configuration()
.set("image", "hone:local");
f.exec("test", "--debug");
f.exec("test");
MatcherAssert.assertThat(
"the build must be successful",
f.log(),
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/log4j.properties
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ 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.farea=DEBUG
log4j.logger.com.yegor256.farea=INFO
log4j.logger.com.yegor256.Jaxec=INFO
log4j.logger.com.jcabi.log.VerboseProcess=INFO

0 comments on commit fe99c87

Please sign in to comment.