Skip to content

Commit

Permalink
Moved tests to a separate module
Browse files Browse the repository at this point in the history
This will allow the testing of the shaded package to be more accurate
  • Loading branch information
gastaldi committed Mar 16, 2016
1 parent 4688ad5 commit 3e0cd7b
Show file tree
Hide file tree
Showing 83 changed files with 21 additions and 1 deletion.
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
<module>impl</module>
<module>bom</module>
<module>dist</module>
<module>tests</module>
</modules>
<dependencyManagement>
<dependencies>
Expand Down
17 changes: 17 additions & 0 deletions tests/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.jboss.forge.roaster</groupId>
<artifactId>roaster-parent</artifactId>
<version>2.18.4-SNAPSHOT</version>
</parent>
<artifactId>roaster-tests</artifactId>
<name>Forge Roaster - Tests</name>
<dependencies>
<dependency>
<groupId>org.jboss.forge.roaster</groupId>
<artifactId>roaster-jdt</artifactId>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ public void testJavaDocFullTextShouldFormatParamWithSpace() throws Exception
" return actual;\n" +
" }}");
MethodSource<JavaClassSource> method = src.getMethods().get(0);
System.out.println(method.getJavaDoc().getFullText());// looks not ok
Assert.assertEquals(
"Creates a new instance of CLASS\n@param actual the actual value.\n@return the modified text",
method.getJavaDoc().getFullText());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ public void testFormatWithJavaDocOptions() throws Exception
prefs.put("org.eclipse.jdt.core.formatter.comment.line_length", "25");
prefs.put("org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries", "false");

// TODO: Should we explicitly do that before calling the format method?
prefs = Formatter.applyShadedPackageName(prefs);

String result2 = Formatter.format(prefs, source);

StringBuilder sb2 = new StringBuilder();
Expand Down

0 comments on commit 3e0cd7b

Please sign in to comment.