1 /*--------------------------------------------------------------------------
\r
2 * Copyright 2009 Taro L. Saito
\r
4 * Licensed under the Apache License, Version 2.0 (the "License");
\r
5 * you may not use this file except in compliance with the License.
\r
6 * You may obtain a copy of the License at
\r
8 * http://www.apache.org/licenses/LICENSE-2.0
\r
10 * Unless required by applicable law or agreed to in writing, software
\r
11 * distributed under the License is distributed on an "AS IS" BASIS,
\r
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
13 * See the License for the specific language governing permissions and
\r
14 * limitations under the License.
\r
15 *--------------------------------------------------------------------------*/
\r
16 //--------------------------------------
\r
19 // SilkPullParserTest.java
\r
20 // Since: Jan 28, 2009 1:02:44 PM
\r
22 // $URL: http://www.xerial.org/svn/project/XerialJ/trunk/xerial-core/src/test/java/org/xerial/silk/SilkLinePullParserTest.java $
\r
24 //--------------------------------------
\r
25 package org.xerial.silk;
\r
27 import java.io.IOException;
\r
29 import org.junit.After;
\r
30 import org.junit.Before;
\r
31 import org.junit.Test;
\r
32 import org.xerial.core.XerialException;
\r
33 import org.xerial.util.FileResource;
\r
34 import org.xerial.util.log.Logger;
\r
36 public class SilkLinePullParserTest
\r
38 private static Logger _logger = Logger.getLogger(SilkLinePullParserTest.class);
\r
41 public void setUp() throws Exception
\r
45 public void tearDown() throws Exception
\r
48 public void pull(String silkFile) throws IOException, XerialException
\r
50 SilkLinePullParser p = new SilkLinePullParser(FileResource.open(SilkLinePullParserTest.class, silkFile));
\r
54 SilkEvent e = p.next();
\r
60 public void testSmall() throws Exception
\r
66 public void testFunc() throws Exception
\r
72 public void testGeneSequence() throws Exception
\r
74 pull("sequence.silk");
\r
78 public void testOutValue() throws Exception
\r
80 pull("impl/outvalue.silk");
\r
84 public void testBarChart() throws Exception
\r
86 pull("barchart.silk");
\r
90 public void testMicroFormat() throws Exception
\r
92 pull("microformat.silk");
\r
96 public void testHeredoc() throws Exception
\r
98 pull("heredoc.silk");
\r
102 public void testScaffold() throws Exception
\r
104 pull("scaffold5001.silk");
\r
108 public void testSuzakuConfig() throws Exception
\r
110 pull("suzaku-config.silk");
\r
114 public void testExample() throws Exception
\r
116 pull("example.silk");
\r
120 public void testMicroformat() throws Exception
\r
122 pull("microformat.silk");
\r
126 public void testTab() throws Exception
\r
132 public void testJSON() throws Exception
\r
138 public void testType() throws Exception
\r
144 public void testLoad() throws Exception
\r
146 pull("plugin/load-binary.silk");
\r
150 public void testBED() throws Exception
\r
152 pull("sample.bed.silk");
\r