aboutsummaryrefslogtreecommitdiff
path: root/javaparser-testing/src/test/java/com/github/javaparser/ast/body/ConstructorDeclarationTest.java
blob: 633c8f50d52f81027ae1f4a43317c9c47e619250 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package com.github.javaparser.ast.body;

import org.junit.Test;

import static org.junit.Assert.assertEquals;

public class ConstructorDeclarationTest {
    @Test
    public void acceptsSuper() {
        ConstructorDeclaration cons = new ConstructorDeclaration("Cons");
        cons.createBody().addStatement("super();");

        assertEquals("public Cons() {\n" +
                "    super();\n" +
                "}", cons.toString());
    }
}