Closed trancexpress closed 3 months ago
I have not looked at this code for years so I fear you need to debug what the offsetprovider internally does
Ps content assist tests are an advantest internal feature afaik. But I assume others show the same behavior
do you also see the problem with a multiline comment
do you also see the problem with a multiline comment
You mean like this?
/*
*
*/
Yes, I still see it.
Alright, I think I was missing this, at the replacement for XpectRunner
:
@XpectImport(TestTitleProvider.class)
Probably this is what defines the title of the XPECT
test, which is then probably used for some error message or something like that...
Opening an issue since I don't see a discussions section for Xpect.
We have more or less the following test DSL:
When I remove the 2nd
XPECT
statement, or run this test with my JUnit 5 changes (see https://github.com/eclipse/Xpect/pull/343), the test fails. It fails due due to the wrong offset provided byorg.eclipse.xpect.parameter.OffsetProvider.getMatchedOffset()
.The region in the fail case is within the comment "// Verify that safety lines are shown for keyword2.property1". The region in the pass case is the actually relevant test DSL "keyword2.property1 = value1;".
What is the defined behavior here? Is there some way to mark Xpect comments as Xpect comments and not as potential DSL comments? To "fix" the test fail, I've moved the "confusing" comment to be above the
XPECT
statement:I also don't know why this behavior shows up only without the 2nd
XPECT
statement with JUnit 4XpectRunner
, but always with my JUnit 5 alternative.