Commit 0e664d95 authored by Johannes Mey's avatar Johannes Mey
Browse files

Update CONTRIBUTING.md

parent 5783e7e8
Pipeline #5148 passed with stage
in 2 minutes and 11 seconds
......@@ -8,22 +8,22 @@ Once done (and new tests are written to ensure, a bug is really fixed, and the f
A test usually defines a grammar, optionally some attributes and a Test class.
It then normally runs RelAST followed by JastAdd.
To create a new test, the following four ingredients are needed:
To create a new test, the following four ingredients are involved:
## Specification
Here, the grammar and attributes to be compiled are contained.
Use `src/test/jastadd/$YourTestName` as directory to put your files into.
All generated `*.ast`, `*.jrag` and `ResolverStubs.jrag` are already ignored by the main `.gitignore`.
All generated `*.ast`, `*.jadd` and `ResolverStubs.jrag` are already ignored by the main `.gitignore`.
## Generated files
## Generated Java files
Usually, all files are generated into a separate directory in `src/test/java-gen/`.
This location can be [configured](#build-configuration).
## Build configuration
Currently, test setup is configured within the `build.gradle` using a specialized Gradle task `RelastTest`.
Currently, the test setup is configured within `build.gradle` using a specialized Gradle task `RelastTest`.
An example configuration might look like:
```groovy
......@@ -71,7 +71,7 @@ Furthermore, empty lines, lines starting with `//` and the order of the error me
## Output diff
Currently, there is one test to test whether the output of RelAST is a valid input for RelAST and produces the same output again.
To achieve this, there two Gradle tasks. The first produces the usual `.ast` and `.jadd` files, whereas the second task takes the `.ast` as input.
To achieve this, there are two Gradle tasks. The first produces the usual `.ast` and `.jadd` files, whereas the second task takes the `.ast` as input.
The test then ensures, that both output grammars are identical.
# Publishing
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment