mirror of
https://github.com/processing/processing4.git
synced 2026-02-01 04:41:11 +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.
23 lines
728 B
Java
23 lines
728 B
Java
package processing.mode.java.preproc;
|
|
|
|
import org.junit.Assert;
|
|
import org.junit.Test;
|
|
import processing.mode.java.preproc.PreprocessIssueMessageSimplifier;
|
|
|
|
public class MessageSimplifierUtilTest {
|
|
|
|
@Test
|
|
public void getOffendingAreaMatch() {
|
|
String input = "no viable alternative at input 'ellipse(\n\nellipse();'";
|
|
String output = PreprocessIssueMessageSimplifier.getOffendingArea(input);
|
|
Assert.assertEquals("ellipse();", output);
|
|
}
|
|
|
|
@Test
|
|
public void getOffendingAreaNoMatch() {
|
|
String input = "ambig at input 'ellipse(\n\nellipse();'";
|
|
String output = PreprocessIssueMessageSimplifier.getOffendingArea(input);
|
|
Assert.assertEquals("ambig at input 'ellipse(\n\nellipse();'", output);
|
|
}
|
|
|
|
} |