An AlteredTest represents an altered version of what was a valid LF file.
More...
Inherits Closeable.
|
| void | close () throws IOException |
| | Restore the file associated with this test to its original state.
|
| ImmutableList< Integer > | getBadLines () |
| | Return the lines where this differs from the test from which it was derived.
|
| Path | getSrcFile () |
| | Return the location where the content of this lives.
|
| void | insert (String line, Random random) |
| | Attempt to insert a new line of target language code into this test.
|
| void | replace (Function< String, String > replacer, Random random) |
| | Attempt to replace a line of this test with a different line of target language code.
|
| String | toString () |
| void | write () throws IOException |
| | Write the altered version of the test to the file system.
|
An AlteredTest represents an altered version of what was a valid LF file.
◆ close()
| void org.lflang.tests.lsp.ErrorInserter.AlteredTest.close |
( |
| ) |
throws IOException |
Restore the file associated with this test to its original state.
◆ getBadLines()
| ImmutableList< Integer > org.lflang.tests.lsp.ErrorInserter.AlteredTest.getBadLines |
( |
| ) |
|
Return the lines where this differs from the test from which it was derived.
◆ getSrcFile()
| Path org.lflang.tests.lsp.ErrorInserter.AlteredTest.getSrcFile |
( |
| ) |
|
Return the location where the content of this lives.
◆ insert()
| void org.lflang.tests.lsp.ErrorInserter.AlteredTest.insert |
( |
String | line, |
|
|
Random | random ) |
Attempt to insert a new line of target language code into this test.
- Parameters
-
| line | The line to be inserted. |
| random | Random number generator. |
◆ replace()
| void org.lflang.tests.lsp.ErrorInserter.AlteredTest.replace |
( |
Function< String, String > | replacer, |
|
|
Random | random ) |
Attempt to replace a line of this test with a different line of target language code.
- Parameters
-
| replacer | A function that replaces lines of code with possibly different lines. |
| random | Random number generator. |
◆ toString()
| String org.lflang.tests.lsp.ErrorInserter.AlteredTest.toString |
( |
| ) |
|
◆ write()
| void org.lflang.tests.lsp.ErrorInserter.AlteredTest.write |
( |
| ) |
throws IOException |
Write the altered version of the test to the file system.
- Exceptions
-
| IOException | If an I/O error occurred. |
The documentation for this class was generated from the following file:
- /Users/runner/work/lingua-franca/lingua-franca/core/src/integrationTest/java/org/lflang/tests/lsp/ErrorInserter.java