Ark icon indicating copy to clipboard operation
Ark copied to clipboard

Add more tests

Open SuperFola opened this issue 3 years ago • 3 comments

We never have enough tests (may they be in ArkScript or C++).

We need to have more tests, to ensure every language construct continue to work properly, and that our C++/ArkScript integration is working properly.

SuperFola avatar May 29 '21 11:05 SuperFola

I am interested in working on this issue. Can you just guide me how should I start?

gautamV19 avatar Sep 27 '22 09:09 gautamV19

Sure!

  1. You will probably want to see if you can build the project correctly before starting, we have a guide at https://arkscript-lang.dev/tutorials/building.html#from-source
  2. Then you will probably want to get familiar with the language and/or the API (https://arkscript-lang.dev/impl/ and https://arkscript-lang.dev/tutorials/language.html)
  3. All the tests are in tests/, we have different directories for:
    1. the tests written in ArkScript itself,
    2. in C++ to test the integration of ArkScript (running code in the VM, instanciated in c++, getting values from C++, adding functions in C++ to the VM, etc)
    3. The AST, which can be obtained as plain JSON (this ensure that the lexer, parser, macro processor and optimizer are doing their job correctly)
  4. When you think you are ready, make sure to read the contributor guide (https://github.com/ArkScript-lang/Ark/blob/dev/CONTRIBUTING.md), which lists coding guidelines and contains a schema of the project's architecture

The goal of this issue is somewhat linked to #328: we lack test coverage, currently on the builtins (in ArkScript itself), on the C++ integration and on error behaviours as stated in #328 (checking that we are actually detecting errors for a given code, either in the lexer, parser, macro processor, compiler or VM).

If you have questions along the way, feel free to ask.

SuperFola avatar Sep 27 '22 16:09 SuperFola