EmptyTest.java revision 3062:15bdc18525ff
1270631Sjfv/*
2270631Sjfv * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
3270631Sjfv * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4270631Sjfv *
5270631Sjfv * This code is free software; you can redistribute it and/or modify it
6270631Sjfv * under the terms of the GNU General Public License version 2 only, as
7270631Sjfv * published by the Free Software Foundation.
8270631Sjfv *
9270631Sjfv * This code is distributed in the hope that it will be useful, but WITHOUT
10270631Sjfv * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11270631Sjfv * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12270631Sjfv * version 2 for more details (a copy is included in the LICENSE file that
13270631Sjfv * accompanied this code).
14270631Sjfv *
15270631Sjfv * You should have received a copy of the GNU General Public License version
16270631Sjfv * 2 along with this work; if not, write to the Free Software Foundation,
17270631Sjfv * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18270631Sjfv *
19270631Sjfv * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20270631Sjfv * or visit www.oracle.com if you need additional information or have any
21270631Sjfv * questions.
22270631Sjfv */
23270631Sjfv
24270631Sjfv/*
25270631Sjfv * @test
26270631Sjfv * @summary null test
27270631Sjfv * @build KullaTesting TestingInputStream
28270631Sjfv * @run testng EmptyTest
29270631Sjfv */
30270631Sjfv
31270631Sjfvimport org.testng.annotations.Test;
32270631Sjfv
33270631Sjfv@Test
34270631Sjfvpublic class EmptyTest extends KullaTesting {
35270631Sjfv
36270631Sjfv    public void testEmpty() {
37270631Sjfv        assertEvalEmpty("");
38270631Sjfv    }
39270631Sjfv
40270631Sjfv    public void testSpace() {
41270631Sjfv        assertEvalEmpty("    ");
42270631Sjfv    }
43270631Sjfv
44270631Sjfv    public void testSemicolon() {
45270631Sjfv        assertEval(";", "");
46270631Sjfv    }
47270631Sjfv
48270631Sjfv    public void testSlashStarComment() {
49270631Sjfv        assertEvalEmpty("/*test*/");
50270631Sjfv    }
51270631Sjfv
52270631Sjfv    public void testSlashStarCommentSemicolon() {
53270631Sjfv        assertEval("/*test*/;", "");
54270631Sjfv    }
55270631Sjfv
56270631Sjfv    public void testSlashComment() {
57270631Sjfv        assertEvalEmpty("// test");
58270631Sjfv    }
59270631Sjfv}
60270631Sjfv