Skip to content

Commit

Permalink
test(refactor): move Validation.java to testclasses in prettyprinter (#…
Browse files Browse the repository at this point in the history
…2181)

* refactor: move Validation.java to testclasses

* Fix tests
  • Loading branch information
zielint0 authored and surli committed Jul 10, 2018
1 parent 6f6f09f commit cba8ebe
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/test/java/spoon/test/prettyprinter/LinesTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public void setup() throws Exception {
spoon.createCompiler(
factory,
SpoonResourceHelper
.resources("./src/test/java/spoon/test/prettyprinter/Validation.java"))
.resources("./src/test/java/spoon/test/prettyprinter/testclasses/Validation.java"))
.build();
factory.getEnvironment().setPreserveLineNumbers(true);
factory.getEnvironment().setAutoImports(false);
Expand All @@ -54,7 +54,7 @@ public void testPrettyPrinterWithLines() throws Exception {
assertEquals(0, factory.getEnvironment().getErrorCount());

// contract: in line preserve mode, toString is not prefixed or suffixed by newlines
String meth = factory.Type().get("spoon.test.prettyprinter.Validation").getMethodsByName("isIdentifier").get(0).toString();
String meth = factory.Type().get("spoon.test.prettyprinter.testclasses.Validation").getMethodsByName("isIdentifier").get(0).toString();
// the added linebreaks due to line preservation are removed
assertFalse(Pattern.compile("^\\s", Pattern.DOTALL).asPredicate().test(meth.toString()));

Expand Down
2 changes: 1 addition & 1 deletion src/test/java/spoon/test/prettyprinter/PrinterTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public void testPrettyPrinter() throws Exception {
SpoonResourceHelper
.resources(
"./src/test/java/spoon/test/annotation/testclasses/PersistenceProperty.java",
"./src/test/java/spoon/test/prettyprinter/Validation.java"))
"./src/test/java/spoon/test/prettyprinter/testclasses/Validation.java"))
.build();
for (CtType<?> t : factory.Type().getAll()) {
t.toString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package spoon.test.prettyprinter;
package spoon.test.prettyprinter.testclasses;

import java.security.AccessController;
import java.security.PrivilegedAction;
Expand Down

0 comments on commit cba8ebe

Please sign in to comment.