Update CONTRIBUTING.md CONTRIBUTING.md now states how to split a test if its expected outcome differs depending on the configuration.
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a124cbb..6b39662 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md
@@ -95,7 +95,7 @@ * Then follows the virtual files section till the end of the test file. * You can use `// FILE: <file name>` to create files that will be available at runtime of the test. * E.g. `// FILE: a.kt` will result in a file named `a.kt` at runtime. -* Add new test to [`KSPUnitTestSuite`](kotlin-analysis-api/src/test/kotlin/com/google/devtools/ksp/test/KSPUnitTestSuite.kt) in `kotlin-analysis-api` (or declare it `abstract` in `KSPUnitTestSuite` and override in [`AAConfiguredUnitTestSuite`](kotlin-analysis-api/src/test/kotlin/com/google/devtools/ksp/test/AAConfiguredUnitTestSuite.kt) and [`PsiConfiguredUnitTestSuite`](kotlin-analysis-api/src/test/kotlin/com/google/devtools/ksp/test/PsiConfiguredUnitTestSuite.kt) if behavior differs between resolution strategies). +* Add new test to [`KSPUnitTestSuite`](kotlin-analysis-api/src/test/kotlin/com/google/devtools/ksp/test/KSPUnitTestSuite.kt) in `kotlin-analysis-api` (or declare it `abstract` in `KSPUnitTestSuite` and override in [`AAConfiguredUnitTestSuite`](kotlin-analysis-api/src/test/kotlin/com/google/devtools/ksp/test/AAConfiguredUnitTestSuite.kt) and [`PsiConfiguredUnitTestSuite`](kotlin-analysis-api/src/test/kotlin/com/google/devtools/ksp/test/PsiConfiguredUnitTestSuite.kt) — in the base classes if expectations differ between resolution strategies, or in the leaf suites if expectations differ across [`ApiFeatures`](api/src/main/kotlin/com/google/devtools/ksp/ApiFeatures.kt) configurations). * Prefer calling the helper functions in `KSPUnitTestSuite` (passing a path relative to `kotlin-analysis-api/testData`) instead of `runTest`, `runFailingTest`, or `runThrowingTest`: * `runKSPTest(path: String)` — runs a positive test. * `runFailingKSPTest(path: String)` — runs a failing test.