|
From: David C. <dc...@us...> - 2005-10-02 21:07:26
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.core.tests/src/org/rubypeople/rdt/internal/core/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8729/src/org/rubypeople/rdt/internal/core/parser Added Files: TC_ImmediateWarnings.java TS_CoreParser.java Log Message: Refactored RubyBuilder into several smaller classes. Wrote UTs for a few of them. Began work on a SymbolIndex. --- NEW FILE: TC_ImmediateWarnings.java --- package org.rubypeople.rdt.internal.core.parser; import junit.framework.TestCase; import org.jruby.lexer.yacc.ISourcePosition; import org.rubypeople.eclipse.shams.resources.ShamFile; import org.rubypeople.rdt.internal.core.builder.ShamMarkerManager; public class TC_ImmediateWarnings extends TestCase { private ImmediateWarnings warnings; private ShamMarkerManager markerManager; private ShamFile file; public void setUp() { markerManager = new ShamMarkerManager(); warnings = new ImmediateWarnings(markerManager); file = new ShamFile("test.rb"); warnings.setFile(file); } public void testTextOnlyWarn() throws Exception { warnings.warn("testMessage"); markerManager.assertWarningAdded(file, "testMessage"); } public void testTextOnlyWarning() throws Exception { warnings.warn("testMessage"); markerManager.assertWarningAdded(file, "testMessage"); } public void testWarn() { ISourcePosition position = new RdtPosition(1, 2, 3); warnings.warn(position, "another Message"); markerManager.assertWarningAdded(file, "another Message", 1, 2, 3); } } --- NEW FILE: TS_CoreParser.java --- package org.rubypeople.rdt.internal.core.parser; import junit.framework.Test; import junit.framework.TestSuite; public class TS_CoreParser { public static Test suite() { TestSuite suite = new TestSuite(); suite.addTestSuite(TC_TaskParser.class); suite.addTestSuite(TC_ImmediateWarnings.class); return suite; } } |