mirror of
https://github.com/processing/processing4.git
synced 2026-03-16 01:17:39 +01:00
Removed the preproc.issue package by relocating supporting classes for PreprocessIssueMessageSimplifier and PdeIssueEmitter as inner classes. This assists with https://github.com/processing/processing4/issues/10.
33 lines
935 B
Java
33 lines
935 B
Java
package processing.mode.java.preproc;
|
|
|
|
import org.junit.Assert;
|
|
import org.junit.Before;
|
|
import org.junit.Test;
|
|
import processing.mode.java.preproc.PdeIssueEmitter;
|
|
import processing.mode.java.preproc.PreprocessIssueMessageSimplifier;
|
|
|
|
import java.util.Optional;
|
|
|
|
|
|
public class KnownMissingMessageSimplifierStrategyTest {
|
|
|
|
private PreprocessIssueMessageSimplifier.PreprocIssueMessageSimplifierStrategy strategy;
|
|
|
|
@Before
|
|
public void setup() {
|
|
strategy = PreprocessIssueMessageSimplifier.get().createKnownMissingSimplifierStrategy();
|
|
}
|
|
|
|
@Test
|
|
public void testPresent() {
|
|
Optional<PdeIssueEmitter.IssueMessageSimplification> msg = strategy.simplify("missing ';' at 'addCircle'");
|
|
Assert.assertTrue(msg.isPresent());
|
|
}
|
|
|
|
@Test
|
|
public void testNotPresent() {
|
|
Optional<PdeIssueEmitter.IssueMessageSimplification> msg = strategy.simplify("String x = \" \\\" \"");
|
|
Assert.assertTrue(msg.isEmpty());
|
|
}
|
|
|
|
} |