CS234319 / safot

5 stars 65 forks source link

Test mini-lisp in Java script with files with code samples #437

Open yossigil opened 3 years ago

yossigil commented 3 years ago

We need a loop with this Pseudo Code in Python/ Bash/javascript, whatever.

For file f in Inputs/*.lisp:
  If file has function name, read the file, feed it to lisp.
  Otherwise,  the file represents an S-Expression do the same, read the file feed it to lisp.
  Verify that everything is OK.

For now, we have no real checking that everything is OK, but it would be added. Checking means:

  1. If it is an S expression, there should be another file, with the expected output.
  2. More generally, if the file contains several S expressions, then the expected output file should contain all results.
  3. If the file is a function definition, then there should be files with test cases for these S-expressions.

The nice thing about the framework is that you do not have to compile anything to add more tests. This will save much time and effort. The down side is that time and effort should be invested to implement this.

OfirMarkowitz1 commented 3 years ago

I don't understand why compiling after adding tests takes time and effort. It's just executing "make test", and the compilation is extremely quick.

On Wed, 28 Jul 2021 at 18:54, Yossi Gil @.***> wrote:

Assigned #437 https://github.com/yossigil/safot/issues/437 to @OfirMarkowitz1 https://github.com/OfirMarkowitz1.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/yossigil/safot/issues/437#event-5081100022, or unsubscribe https://github.com/notifications/unsubscribe-auth/APCETIABEEIPYLWST2HJHDLT2ARZRANCNFSM5BEUXGWA .

yossigil commented 3 years ago

I mean that testing is independent of development. You can automatically supply the tests, not copy past them; you can even include them in the environment

OfirMarkowitz1 commented 3 years ago

Ok, now I understand.

On Sun, 1 Aug 2021 at 14:15, Yossi Gil @.***> wrote:

I mean that testing is independent of development. You can automatically supply the tests, not copy past them; you can even include them in the environment

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/yossigil/safot/issues/437#issuecomment-890499738, or unsubscribe https://github.com/notifications/unsubscribe-auth/APCETIDHAZK5UVMSJVRMB6DT2UUDXANCNFSM5BEUXGWA .

yossigil commented 3 years ago

I means that you can include some of the tests as preloads from the GUI, for example, you can decide the GUI opens all files of a given folder as demo buttons in the IDE you build

OfirMarkowitz1 commented 3 years ago

Question: is it okay to that the html file will include jquery source code? It will weigh around 1-1.5 MB. It will save me the work to make a different IDE with a form. Anyway, jquery terminal will have all the GUI features (parentheses matching, autocompletion, highlighting etc..) as we discussed. Then, I could add the demos to the jquery terminal page.

yossigil commented 3 years ago

I think this is great; 3MB is no big deal. Many pictures are about this size.

OfirMarkowitz1 commented 3 years ago

Great!

yossigil commented 3 years ago

as to the full issue, can you please check the testing framework that @DorYeheskel wrote. It should not be difficult to adjust it to JS

OfirMarkowitz1 commented 3 years ago

@DorYeheskel Hi Dor, can you please point me to the file which does this?

yossigil commented 3 years ago

Search for code in Python...

OfirMarkowitz1 commented 3 years ago

Ok

yossigil commented 3 years ago

how is it going?

OfirMarkowitz1 commented 3 years ago

Regarding the feature issues, I finished the stack dump implementation. Now working on pushing my recent changes to git so you can review them. Afterwards what's left is this issue and the monitoring. I can start with this issue. Also there are two issues of bugs, the GUI test issues, and the error unification issue, on which I commented in this issue's correspondence. Every open issue regarding the JS implementation appears in the Browser mini-lisp project.

yossigil commented 3 years ago

ok, waiting to see it all.