FileDocCategorySizeDatePackage
EnTabTest.javaAPI DocExample1216Sun Feb 22 14:58:34 GMT 2004None

EnTabTest

public class EnTabTest extends TestCase
author
ian To change the template for this generated type comment go to Window - Preferences - Java - Code Generation - Code and Comments

Fields Summary
EnTab
t4
EnTab
t8
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)

		junit.textui.TestRunner.run(EnTabTest.class);
	
protected voidsetUp()

		super.setUp();
		t4 = new EnTab(4);
		t8 = new EnTab();
		// For com.darwinsys.util.Debug: uncomment only 
		// "when you find yourself in times of trouble..."
		//System.setProperty("debug.tab", "true");
		//System.setProperty("debug.pad", "true");
		//System.setProperty("debug.space", "true");
	
public voidtestGetTabSpacingDelegation()

		assertEquals(4, t4.getTabSpacing());
		assertEquals(8, t8.getTabSpacing());
	
public voidtestIdempotency()

		assertEquals("", t4.entabLine(""));
		assertEquals("", t8.entabLine(""));
		assertEquals(" ", t4.entabLine(" "));
		assertEquals("abcde", t4.entabLine("abcde"));
	
public voidtestLeadingTabs()

		System.out.println(t4.entabLine("    A"));
		assertEquals("\tA", t4.entabLine("    A"));