FileDocCategorySizeDatePackage
SoundexTest.javaAPI DocExample1098Tue Feb 27 13:53:04 GMT 2001None

SoundexTest

public class SoundexTest extends TestCase
Soundex Test program. Knuth's original examples, and mine.

Fields Summary
protected Soundex
sx
The object being tested
Constructors Summary
public SoundexTest(String name)
JUnit test classes require this constructor

		super(name);
	
Methods Summary
public voidtestDarwin1()

		assertEquals("D650", Soundex.soundex("Darwin"));
	
public voidtestDarwin2()

		assertEquals("D653", Soundex.soundex("Darwent"));
	
public voidtestDarwin3()

		assertEquals("D650", Soundex.soundex("Derwin"));
	
public voidtestKnuth0()

		assertEquals("E460", Soundex.soundex("Euler, Ellery"));
	
public voidtestKnuth1()

		assertEquals("G200", Soundex.soundex("Gauss, Ghosh"));
	
public voidtestKnuth2()

		assertEquals("H416", Soundex.soundex("Hilbert, Heilbronn"));
	
public voidtestKnuth3()

		assertEquals("K530", Soundex.soundex("Knuth, Kant"));
	
public voidtestKnuth4()

		assertEquals("L300", Soundex.soundex("Lloyd, Ladd"));
	
public voidtestKnuth5()

		assertEquals("L222",
			Soundex.soundex("Lukasiewicz, Lissajous"));