Skip to content

Commit

Permalink
Added integer and character tests in JavaDocumentationTests
Browse files Browse the repository at this point in the history
Signed-off-by: Subhash Arabhi <subhashsubbu636@gmail.com>
  • Loading branch information
subhash-arabhi committed Aug 12, 2024
1 parent 064f91f commit d668074
Showing 1 changed file with 30 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,36 @@ public void testConstructorAnnotationTypeParams3() throws Exception {
"11",
"[java.lang.String]");
}

public void testConstructorIntegerArgument() throws Exception {
performTest("public class Test {\n" +
"/**\n"+
"This is constructor level Javadoc\n"+
"**/\n"+
"Test(int i){}\n"+
" public static void main(String[] args) {\n"+
" Test t = new Test(|10000);\n" +
" }\n" +
"}\n",
"",
"11",
null);
}

public void testConstructorCharacterArgument() throws Exception {
performTest("public class Test {\n" +
"/**\n"+
"This is constructor level Javadoc\n"+
"**/\n"+
"Test(char c){}\n"+
" public static void main(String[] args) {\n"+
" Test t = new Test(|'x');\n" +
" }\n" +
"}\n",
"",
"11",
null);
}

protected void performTest(String source, String textToInsert, String sourceLevel, String expected) throws Exception {
this.sourceLevel.set(sourceLevel);
Expand Down

0 comments on commit d668074

Please sign in to comment.