mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-28 01:07:49 +08:00
testing_highlighting.md: Add a tip for generating test data
This commit is contained in:
parent
02243ec6c7
commit
50347f566a
@ -98,3 +98,12 @@ The tag can also have the following optional attributes.
|
|||||||
```xml
|
```xml
|
||||||
<warning>warning_highlight<info>warning-and_info_highlight</warning>info_highlight</info>
|
<warning>warning_highlight<info>warning-and_info_highlight</warning>info_highlight</info>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Generating Test Data
|
||||||
|
|
||||||
|
To generate an expected highlighting result file for a test:
|
||||||
|
|
||||||
|
1. Make sure that Plugin DevKit plugin is installed and [internal mode is enabled](enabling_internal.md).
|
||||||
|
2. [Create a Scratch file](https://www.jetbrains.com/help/idea/scratches.html#create-scratch-file) for the tested language.
|
||||||
|
3. Write code causing tested highlighting.
|
||||||
|
4. Invoke the <ui-path>Tools | Internal Actions | DevKit | Toggle Expected Highlighting Markup</ui-path> action.
|
||||||
|
@ -29,6 +29,8 @@ public class Test {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> See how to [generate highlighting test data](testing_highlighting.md#generating-test-data).
|
||||||
|
|
||||||
## Define a Test Method
|
## Define a Test Method
|
||||||
Add the `testAnnotator()` method to the `SimpleCodeInsightTest` class [previously defined](completion_test.md#define-a-test).
|
Add the `testAnnotator()` method to the `SimpleCodeInsightTest` class [previously defined](completion_test.md#define-a-test).
|
||||||
Again, this method configures the test fixture by using the test files.
|
Again, this method configures the test fixture by using the test files.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user