Merge from mainline.
[official-gcc.git] / libjava / classpath / testsuite / javax.swing.text.html.parser / AllParserTests.java
blobd4fca263f9446a7b9f79bf5b088b5b85734e3c76
1 /* AllParserTests.java -- The comprehensive HTML parser test.
2 Copyright (C) 2005 Free Software Foundation, Inc.
4 This file is part of GNU Classpath.
6 GNU Classpath is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
11 GNU Classpath is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU Classpath; see the file COPYING. If not, write to the
18 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19 02110-1301 USA.
21 Linking this library statically or dynamically with other modules is
22 making a combined work based on this library. Thus, the terms and
23 conditions of the GNU General Public License cover the whole
24 combination.
26 As a special exception, the copyright holders of this library give you
27 permission to link this library with independent modules to produce an
28 executable, regardless of the license terms of these independent
29 modules, and to copy and distribute the resulting executable under
30 terms of your choice, provided that you also meet, for each linked
31 independent module, the terms and conditions of the license of that
32 module. An independent module is a module which is not derived from
33 or based on this library. If you modify this library, you may extend
34 this exception to your version of the library, but you are not
35 obligated to do so. If you do not wish to do so, delete this
36 exception statement from your version. */
39 import test.gnu.javax.swing.text.html.HTML_Test;
40 import test.gnu.javax.swing.text.html.parser.AttributeList_test;
41 import test.gnu.javax.swing.text.html.parser.DTD_test;
42 import test.gnu.javax.swing.text.html.parser.Element_Test;
43 import test.gnu.javax.swing.text.html.parser.Entity_Test;
44 import test.gnu.javax.swing.text.html.parser.HTML_parsing;
45 import test.gnu.javax.swing.text.html.parser.HTML_randomTable;
46 import test.gnu.javax.swing.text.html.parser.ParserEntityResolverTest;
47 import test.gnu.javax.swing.text.html.parser.TagElement_Test;
48 import test.gnu.javax.swing.text.html.parser.Text;
49 import test.gnu.javax.swing.text.html.parser.Token_locations;
50 import test.gnu.javax.swing.text.html.parser.parameterDefaulter_Test;
51 import test.gnu.javax.swing.text.html.parser.supplementaryNotifications;
52 import test.gnu.javax.swing.text.html.parser.textPreProcessor_Test;
53 import test.gnu.javax.swing.text.html.parser.low.Buffer_Test;
54 import test.gnu.javax.swing.text.html.parser.low.Constants_Test;
55 import test.gnu.javax.swing.text.html.parser.low.ReaderTokenizer_Test;
57 /**
58 * This is a complete test for javax.swing.text.html.parser package.
59 * Apart javax.* classes, it also tests the implementation specific
60 * gnu.javax.* classes and in this way is more strict than
61 * Mauve tests. To avoid regression it is strongly recommended to run
62 * this test after you modify clases in javax.swing.text.html.parser or
63 * gnu.javax.swing.text.html.parser.
64 * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
66 public class AllParserTests
68 public static void main(String[] args)
70 try
72 HTML_Test a_HTML_Test = new HTML_Test();
73 a_HTML_Test.testGetAttributeKey();
74 a_HTML_Test.testGetIntegerAttributeValue();
75 a_HTML_Test.testGetTag();
76 a_HTML_Test.testCaseSensitivity();
77 a_HTML_Test.testConstructor();
79 Buffer_Test a_Buffer_Test = new Buffer_Test();
80 a_Buffer_Test.testDelete();
81 a_Buffer_Test.testAppend();
83 Constants_Test a_Constants_Test = new Constants_Test();
84 a_Constants_Test.testCases();
86 ReaderTokenizer_Test a_ReaderTokenizer_Test =
87 new ReaderTokenizer_Test();
88 a_ReaderTokenizer_Test.testReadingAndAhead();
89 a_ReaderTokenizer_Test.testComplexToken();
91 AttributeList_test a_AttributeList_test = new AttributeList_test();
92 a_AttributeList_test.testSame();
94 DTD_test a_DTD_test = new DTD_test();
95 a_DTD_test.testGetElement();
97 Element_Test a_Element_Test = new Element_Test();
98 a_Element_Test.testName2type();
99 a_Element_Test.testAttributeGetter();
101 Entity_Test a_Entity_Test = new Entity_Test();
102 a_Entity_Test.testName2type();
103 a_Entity_Test.testPublicSystemGeneralParameter();
105 HTML_parsing a_HTML_parsing = new HTML_parsing();
106 a_HTML_parsing.testHTMLParsing();
108 HTML_randomTable a_HTML_randomTable = new HTML_randomTable();
109 a_HTML_randomTable.testTableParsing();
111 parameterDefaulter_Test a_parameterDefaulter_Test =
112 new parameterDefaulter_Test();
113 a_parameterDefaulter_Test.testDefaultValues();
115 ParserEntityResolverTest a_ParserEntityResolverTest =
116 new ParserEntityResolverTest();
117 a_ParserEntityResolverTest.testResolver();
119 supplementaryNotifications a_supplementaryNotifications =
120 new supplementaryNotifications();
121 a_supplementaryNotifications.testHTMLParsing();
123 TagElement_Test a_TagElement_Test = new TagElement_Test();
124 a_TagElement_Test.testTagElement();
126 textPreProcessor_Test a_textPreProcessor_Test =
127 new textPreProcessor_Test();
128 a_textPreProcessor_Test.testStandardPreProcessing();
129 a_textPreProcessor_Test.testPreFormattedPreProcessing();
131 Text a_Text = new Text();
132 a_Text.testTextParsing();
134 Token_locations a_Token_locations = new Token_locations();
135 a_Token_locations.testHTMLParsing();
137 catch (Exception ex)
139 System.err.println("The tests have FAILED.\nPlease either correct your " +
140 "changes\nor, if you are absolutely sure, correct the tests.\n" +
141 "See the following exception for details"
143 ex.printStackTrace(System.err);
144 System.exit(1);
146 System.out.println("HTML parser tests have passed.");
147 System.exit(0);