Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need more EO-tests #66

Open
MikhailLipanin opened this issue Oct 14, 2022 · 1 comment
Open

Need more EO-tests #66

MikhailLipanin opened this issue Oct 14, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@MikhailLipanin
Copy link
Member

MikhailLipanin commented Oct 14, 2022

You can add your .eo tests to src/test/eo/org/eolang/dejump.
Rules for tests:

  • has only one outer abstract object, inside of which the logic of the test;
  • name of this object should be equal to the name of file with this test:
    for example, if your test has a "main" object [] > easy_test, so the .eo file should be called easy_test.eo;
  • your test should not contain any alias-es:
    for example, if you use object stdout in your code, use it as QQ.io.stdout, NOT with alias;
  • logic of your test can be absolutely different - it is no requirement to has a goto object inside, but, since
    we check goto elimination, it would be better that your test will have it :) ;
  • based on concept of transformations, there are cases of using goto, which are not allowed for this applications:
  1. When objects forward/backward encapsulated (directly or throw other objects) in any foreign objects -- objects, that
    are implemented somewhere in your code (objects, that general EO-syntax doesn't support):
goto
  [g]
    foreign_obj > @
      QQ.io.stdout
        "We don't know the logic\n"
      g.forward TRUE
  1. Cases, where we dataize objects forward/backward outside object goto:
goto
  [g]
    seq > @
      foo g
[x] > foo
  x.forward 25

As examples of tests, check .eo files at src/test/eo/org/eolang/dejump.

@MikhailLipanin MikhailLipanin pinned this issue Oct 14, 2022
@MikhailLipanin
Copy link
Member Author

@Graur FYI

Graur added a commit to Graur/dejump that referenced this issue Oct 26, 2022
Graur added a commit to Graur/dejump that referenced this issue Oct 26, 2022
Graur added a commit to Graur/dejump that referenced this issue Oct 26, 2022
Graur added a commit to Graur/dejump that referenced this issue Oct 26, 2022
Graur added a commit to Graur/dejump that referenced this issue Oct 26, 2022
Graur added a commit to Graur/dejump that referenced this issue Oct 28, 2022
Graur added a commit to Graur/dejump that referenced this issue Nov 2, 2022
Graur added a commit to Graur/dejump that referenced this issue Nov 2, 2022
Graur added a commit to Graur/dejump that referenced this issue Nov 2, 2022
Graur added a commit to Graur/dejump that referenced this issue Nov 2, 2022
Graur added a commit to Graur/dejump that referenced this issue Nov 2, 2022
@MikhailLipanin MikhailLipanin added the bug Something isn't working label Nov 4, 2022
Graur added a commit to Graur/dejump that referenced this issue Nov 18, 2022
Graur added a commit to Graur/dejump that referenced this issue Nov 18, 2022
This was referenced Nov 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant