1 19 20 package org.netbeans.modules.lexer.demo.javacc; 21 22 import org.netbeans.api.lexer.Language; 23 import org.netbeans.spi.lexer.util.LexerTestDescription; 24 25 31 32 public class CalcTestDescription extends LexerTestDescription { 33 34 public Language getLanguage() { 35 return CalcLanguage.get(); 36 } 37 38 public TestRound[] getTestRounds() { 39 return new TestRound[] { 40 new TestRound(10000, 0.6, 5, 0.4, 4), 41 new TestRound(10000, 0.4, 1, 0.6, 3) 42 }; 43 } 44 45 public TestChar[] getTestChars() { 46 return new TestChar[] { 47 new TestChar('*', 0.3), 48 new TestChar('+', 0.3), 49 new TestChar(' ', 0.3), 50 new TestChar('\n', 0.05), 51 new TestChar('a', 0.05) }; 53 } 54 55 public TestCharInterval[] getTestCharIntervals() { 56 return new TestCharInterval[] { 57 new TestCharInterval('0', '9', 0.2) 58 }; 59 } 60 61 public TestString[] getTestStrings() { 62 return new TestString[] { 63 new TestString("/*", 0.1), 64 new TestString("*/", 0.1) 65 }; 66 } 67 68 public int getDebugLevel() { 69 return 0; } 71 72 } 73 74 | Popular Tags |