public class TimingTests extends TestCase {
/**
* code to verify the timeline creation
*/
public void testTimeline() throws Exception {
Parser parser=new Parser();
parser.setDebug(false);
parser.setOptimize(true);
List<String> paths=new ArrayList<String>();
File file=new File("javasrc/de/maramuse/soundcomp/test/testfiles/tempotest");
Preprocessor.setDebug(false);
ParserVal p=parser.parse(file, paths);
if(p==null){
SCParser.ParserVal val=parser.getLastSymbol();
if(val==null){
fail("no result and no error text");
return;
}
String filename=val.getFilename();
if(filename==null)
filename="direct input";
parser.dumpStack();
fail(String.format("%s after reading %s(%s), %s, %d",
parser.getError(),
parser.getSymbol(val.getType()), val.getText(),
val.getFilename(),
val.getLine()));
}
if(!(p instanceof SoundCompText))
fail("Parsing didn't create a SoundCompText object");