You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A very easy way to start contributing to Dotty and experiment with the compiler is to browse our issue tracker looking for issues that have already been fixed. The older the issue, the more likely it is already fixed 😄 .
Once such an issue is found, you need to create a regression test for it. Name your test according to the issue fixed (e.g. i3585.scala for #3585). We write tests within the tests directory:
.
└── tests
├── neg
├── pos
└── run
Negative test
A test case that shouldn't compile should be put in tests/neg. When writing a negative test, you must add a // error comment next to the line that produces a compilation error. For example:
classFoo {
noFound // error
}
Positive test
If a test case is expected to compile, simply add it to tests/pos.
Run test
A test that must be run, should be put in tests/run. Such a test must have an object named Test with a main method. For example:
A very easy way to start contributing to Dotty and experiment with the compiler is to browse our issue tracker looking for issues that have already been fixed. The older the issue, the more likely it is already fixed 😄 .
Once such an issue is found, you need to create a regression test for it. Name your test according to the issue fixed (e.g.
i3585.scala
for #3585). We write tests within thetests
directory:Negative test
A test case that shouldn't compile should be put in
tests/neg
. When writing a negative test, you must add a// error
comment next to the line that produces a compilation error. For example:Positive test
If a test case is expected to compile, simply add it to
tests/pos
.Run test
A test that must be run, should be put in
tests/run
. Such a test must have anobject
namedTest
with amain
method. For example:You can find information on how to run a test in the documentation.
You can now submit a PR! Make sure your commit message references the issue fixed (e.g.
Fix #3586: Add regression test
).The text was updated successfully, but these errors were encountered: