Class SuggestedFixDataTest
java.lang.Object
org.checkerframework.framework.source.SuggestedFixDataTest
Unit tests for
SuggestedFixData, the framework-agnostic (Error-Prone-free) representation
of a machine-applicable source edit that a host can translate into its own suggested fix.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidA fix built from several replacements preserves their order.voidA zero-width replacement (a pure insertion at one offset) is allowed.voidA replacement with end before start is rejected at construction.voidA replacement with a negative start offset is rejected at construction.voidThe list returned bySuggestedFixData.getReplacements()is unmodifiable.voidThe single-replacementreplacefactory populates one replacement with its fields.
-
Constructor Details
-
SuggestedFixDataTest
public SuggestedFixDataTest()
-
-
Method Details
-
singleReplacementFactory
public void singleReplacementFactory()The single-replacementreplacefactory populates one replacement with its fields. -
multipleReplacementsPreserveOrder
public void multipleReplacementsPreserveOrder()A fix built from several replacements preserves their order. -
replacementsAreUnmodifiable
public void replacementsAreUnmodifiable()The list returned bySuggestedFixData.getReplacements()is unmodifiable. -
replacementRejectsEndBeforeStart
public void replacementRejectsEndBeforeStart()A replacement with end before start is rejected at construction. -
replacementRejectsNegativeStart
public void replacementRejectsNegativeStart()A replacement with a negative start offset is rejected at construction. -
replacementAllowsEmptyRange
public void replacementAllowsEmptyRange()A zero-width replacement (a pure insertion at one offset) is allowed.
-