tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spmalle...@apache.org
Subject [2/3] tinkerpop git commit: TINKERPOP-786 Bumped to 0.10 of google compile-test
Date Sat, 29 Apr 2017 22:25:46 GMT
TINKERPOP-786 Bumped to 0.10 of google compile-test


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/59a6e3e3
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/59a6e3e3
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/59a6e3e3

Branch: refs/heads/TINKERPOP-786
Commit: 59a6e3e314a0ff5a52fdefea1e5ab399c475dae7
Parents: dccafd3
Author: Stephen Mallette <spmva@genoprime.com>
Authored: Sat Apr 29 06:53:15 2017 -0400
Committer: Stephen Mallette <spmva@genoprime.com>
Committed: Sat Apr 29 06:53:15 2017 -0400

----------------------------------------------------------------------
 gremlin-core/pom.xml                            |  6 ++-
 .../traversal/dsl/GremlinDslProcessorTest.java  | 41 ++++++++++----------
 2 files changed, 25 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/59a6e3e3/gremlin-core/pom.xml
----------------------------------------------------------------------
diff --git a/gremlin-core/pom.xml b/gremlin-core/pom.xml
index 989bf83..0efadfa 100644
--- a/gremlin-core/pom.xml
+++ b/gremlin-core/pom.xml
@@ -104,21 +104,23 @@ limitations under the License.
         <dependency>
             <groupId>com.google.testing.compile</groupId>
             <artifactId>compile-testing</artifactId>
-            <version>0.8</version>
+            <version>0.10</version>
             <scope>test</scope>
         </dependency>
+        <!--
         <dependency>
             <groupId>com.google.truth</groupId>
             <artifactId>truth</artifactId>
             <version>0.25</version>
             <exclusions>
-                <!-- truth comes in through compile-testing and has a self-conflict -
produces further conflict with hadoop-gremlin -->
+                truth comes in through compile-testing and has a self-conflict - produces
further conflict with hadoop-gremlin
                 <exclusion>
                     <groupId>com.google.guava</groupId>
                     <artifactId>guava</artifactId>
                 </exclusion>
             </exclusions>
         </dependency>
+-->
     </dependencies>
     <build>
         <directory>${basedir}/target</directory>

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/59a6e3e3/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/GremlinDslProcessorTest.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/GremlinDslProcessorTest.java
b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/GremlinDslProcessorTest.java
index 982ec5b..5df010d 100644
--- a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/GremlinDslProcessorTest.java
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/GremlinDslProcessorTest.java
@@ -18,13 +18,14 @@
  */
 package org.apache.tinkerpop.gremlin.process.traversal.dsl;
 
+import com.google.testing.compile.Compilation;
 import com.google.testing.compile.JavaFileObjects;
 import org.junit.Test;
 
 import javax.tools.StandardLocation;
 
-import static com.google.common.truth.Truth.ASSERT;
-import static com.google.testing.compile.JavaSourceSubjectFactory.javaSource;
+import static com.google.testing.compile.CompilationSubject.assertThat;
+import static com.google.testing.compile.Compiler.javac;
 
 /**
  * @author Stephen Mallette (http://stephen.genoprime.com)
@@ -33,35 +34,35 @@ public class GremlinDslProcessorTest {
 
     @Test
     public void shouldCompileToDefaultPackage() {
-        ASSERT.about(javaSource())
-                .that(JavaFileObjects.forResource(GremlinDsl.class.getResource("SocialTraversalDsl.java")))
-                .processedWith(new GremlinDslProcessor())
-                .compilesWithoutError();
+        Compilation compilation = javac()
+                .withProcessors(new GremlinDslProcessor())
+                .compile(JavaFileObjects.forResource(GremlinDsl.class.getResource("SocialTraversalDsl.java")));
+        assertThat(compilation).succeededWithoutWarnings();
     }
 
     @Test
     public void shouldCompileAndMovePackage() {
-        ASSERT.about(javaSource())
-                .that(JavaFileObjects.forResource(GremlinDsl.class.getResource("SocialMoveTraversalDsl.java")))
-                .processedWith(new GremlinDslProcessor())
-                .compilesWithoutError()
-                .and()
-                .generatesFileNamed(StandardLocation.SOURCE_OUTPUT, "org.apache.tinkerpop.gremlin.process.traversal.dsl.social",
"SocialMoveTraversal.java");
+        Compilation compilation = javac()
+                .withProcessors(new GremlinDslProcessor())
+                .compile(JavaFileObjects.forResource(GremlinDsl.class.getResource("SocialMoveTraversalDsl.java")));
+        assertThat(compilation).succeededWithoutWarnings();
+        assertThat(compilation)
+                .generatedFile(StandardLocation.SOURCE_OUTPUT, "org.apache.tinkerpop.gremlin.process.traversal.dsl.social",
"SocialMoveTraversal.java");
     }
 
     @Test
     public void shouldCompileTraversalAndTraversalSourceToDefaultPackage() {
-        ASSERT.about(javaSource())
-                .that(JavaFileObjects.forResource(GremlinDsl.class.getResource("SocialPackageTraversalDsl.java")))
-                .processedWith(new GremlinDslProcessor())
-                .compilesWithoutError();
+        Compilation compilation = javac()
+                .withProcessors(new GremlinDslProcessor())
+                .compile(JavaFileObjects.forResource(GremlinDsl.class.getResource("SocialPackageTraversalDsl.java")));
+        assertThat(compilation).succeededWithoutWarnings();
     }
 
     @Test
     public void shouldCompileWithNoDefaultMethods() {
-        ASSERT.about(javaSource())
-                .that(JavaFileObjects.forResource(GremlinDsl.class.getResource("SocialNoDefaultMethodsTraversalDsl.java")))
-                .processedWith(new GremlinDslProcessor())
-                .compilesWithoutError();
+        Compilation compilation = javac()
+                .withProcessors(new GremlinDslProcessor())
+                .compile(JavaFileObjects.forResource(GremlinDsl.class.getResource("SocialNoDefaultMethodsTraversalDsl.java")));
+        assertThat(compilation).succeededWithoutWarnings();
     }
 }


Mime
View raw message