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
Opening an issue since I don't see a discussions section for Xpect.
We have more or less the following test DSL:
keyword1 name1 {
// Verify that keyword2.property10, keyword2.property20, keyword2.property30 and
// keyword2.property40 are not shown.
// XPECT proposals at 'keyword2.|' --> property1, property2, property3
// XPECT proposals at '=|' --> value1, value2
// Verify that safety lines are shown for keyword2.property1
keyword2.property1 = value1;
}
When I remove the 2nd XPECT statement, or run this test with my JUnit 5 changes (see #343), the test fails. It fails due due to the wrong offset provided by org.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 XPECTstatement:
keyword1 name1 {
// Verify that keyword2.property10, keyword2.property20, keyword2.property30 and
// keyword2.property40 are not shown.
// Verify that safety lines are shown for keyword2.property1
// XPECT proposals at 'keyword2.|' --> property1, property2, property3
// XPECT proposals at '=|' --> value1, value2
keyword2.property1 = value1;
}
I also don't know why this behavior shows up only without the 2nd XPECT statement with JUnit 4 XpectRunner, but always with my JUnit 5 alternative.
The text was updated successfully, but these errors were encountered:
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 #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.The text was updated successfully, but these errors were encountered: