package edu.umd.cs.piccolox.swt;

import junit.framework.TestCase;

public class PSWTTextTest extends TestCase {
    private PSWTText testNode;

    public void setUp() {
        testNode = new PSWTText();
    }

    
    public void testTextPersistsTrainingAndInternalNewlines() {
        testNode.setText("Hello\nWorld\n\n");
        assertEquals("Hello\nWorld\n\n", testNode.getText());
    }


}

package edu.umd.cs.piccolox.swt;

import junit.framework.TestCase;

public class PSWTTextTest extends TestCase {
    private PSWTText testNode;

    public void setUp() {
        testNode = new PSWTText();
    }

    public void testTextPersistsTrainingAndInternalNewlines() {
        // TODO: Make this work in headless mode if possible.
        // testNode.setText("Hello\nWorld\n\n");
        // assertEquals("Hello\nWorld\n\n", testNode.getText());
    }

}

Test added doesn't work in headless. Will need to figure something out. Otherwise SWT module will remain untestable.