tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ok...@apache.org
Subject tinkerpop git commit: added a test case for 6.67e−11 notation. passed.
Date Wed, 04 Oct 2017 19:41:55 GMT
Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1632 2288b9620 -> 14a254320


added a test case for 6.67e−11 notation. passed.


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

Branch: refs/heads/TINKERPOP-1632
Commit: 14a254320bbe242cc83015369cbd24cd3aa14165
Parents: 2288b96
Author: Marko A. Rodriguez <okrammarko@gmail.com>
Authored: Wed Oct 4 13:41:51 2017 -0600
Committer: Marko A. Rodriguez <okrammarko@gmail.com>
Committed: Wed Oct 4 13:41:51 2017 -0600

----------------------------------------------------------------------
 .../gremlin/process/traversal/step/map/MathStepTest.java          | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/14a25432/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MathStepTest.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MathStepTest.java
b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MathStepTest.java
index 85464e9..eea624f 100644
--- a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MathStepTest.java
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MathStepTest.java
@@ -26,6 +26,7 @@ import org.junit.Test;
 
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.List;
 
 import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.both;
@@ -49,8 +50,10 @@ public class MathStepTest extends StepTest {
 
     @Test
     public void shouldParseVariablesCorrectly() {
+        assertEquals(Collections.emptyList(), new ArrayList<>(MathStep.getVariables("1
+ 2")));
         assertEquals(Arrays.asList("a", "b"), new ArrayList<>(MathStep.getVariables("a
+ b / 2")));
         assertEquals(Arrays.asList("a", "b"), new ArrayList<>(MathStep.getVariables("a
+ b / sin 2")));
+        assertEquals(Arrays.asList("a", "b"), new ArrayList<>(MathStep.getVariables("a
+ b / sin (2 + 6.67e−11)")));
         assertEquals(Arrays.asList("a", "b", "_", "x", "z"), new ArrayList<>(MathStep.getVariables("(a
+ b / _) + log2 (x^3)^z")));
         assertEquals(Arrays.asList("a", "b", "_", "x", "z"), new ArrayList<>(MathStep.getVariables("(a
+ b / _) + log2 (x^3)^z + b + a")));
         assertEquals(Arrays.asList("a_ASDF", "b", "_", "x", "z", "a"), new ArrayList<>(MathStep.getVariables("(a_ASDF
+ b / _) + log2 (x^3)^z + b + a")));


Mime
View raw message