1 19 20 package org.netbeans.modules.lexer.demo.handcoded.link; 21 22 import org.netbeans.api.lexer.Language; 23 import org.netbeans.spi.lexer.util.LexerTestDescription; 24 25 31 32 public class LinkTestDescription extends LexerTestDescription { 33 34 public Language getLanguage() { 35 return LinkLanguage.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.5), 48 new TestChar(':', 0.3), 49 new TestChar('.', 0.1), 50 new TestChar('#', 0.1), 51 new TestChar(' ', 0.2), 52 new TestChar('\n', 0.05) 53 }; 54 } 55 56 public TestString[] getTestStrings() { 57 return new TestString[] { 58 new TestString("http://", 0.05), 59 new TestString("ftp://", 0.05), 60 new TestString("ascheme://", 0.05), 61 new TestString("://", 0.05) 62 }; 63 } 64 65 public TestCharInterval[] getTestCharIntervals() { 66 return new TestCharInterval[] { 67 new TestCharInterval('0', '9', 0.1), 68 new TestCharInterval('a', 'z', 0.1) 69 }; 70 } 71 72 public int getDebugLevel() { 73 return 0; } 75 76 77 } 78 79 | Popular Tags |