Merge branch 'tp32' into tp33

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

Branch: refs/heads/tp33
Commit: 9bd4d7fedf943f5f09d5e5a0f77e27efbc559e2e
Parents: 2d493fb 5cf1cba
Author: Florian Hockmann <f...@florian-hockmann.de>
Authored: Tue Mar 13 23:50:48 2018 +0100
Committer: Florian Hockmann <f...@florian-hockmann.de>
Committed: Tue Mar 13 23:50:48 2018 +0100

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |   1 +
 .../upgrade/release-3.2.x-incubating.asciidoc   |  12 +++
 gremlin-dotnet/glv/P.template                   |  62 ++++++++++-
 gremlin-dotnet/glv/generate.groovy              |   2 +-
 .../Process/Traversal/GraphTraversal.cs         |  20 ++--
 .../src/Gremlin.Net/Process/Traversal/P.cs      | 106 ++++++++++++++-----
 .../Process/Traversal/TraversalPredicate.cs     |  85 ---------------
 .../src/Gremlin.Net/Process/Traversal/__.cs     |  20 ++--
 .../Structure/IO/GraphSON/GraphSONWriter.cs     |   2 +-
 .../Structure/IO/GraphSON/PSerializer.cs        |  45 ++++++++
 .../IO/GraphSON/TraversalPredicateSerializer.cs |  45 --------
 .../Gherkin/GherkinTestRunner.cs                |  18 +---
 .../Gherkin/IgnoreException.cs                  |   5 -
 .../Gherkin/TraversalEvaluation/PParameter.cs   |  97 +++++++++++++++++
 .../TraversalEvaluationTests.cs                 |   2 +-
 .../TraversalEvaluation/TraversalParser.cs      |   2 +-
 .../TraversalPredicateParameter.cs              |  93 ----------------
 .../GraphSON/BytecodeGraphSONSerializerTests.cs |   2 +-
 .../IO/GraphSON/GraphSONWriterTests.cs          |   4 +-
 19 files changed, 323 insertions(+), 300 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9bd4d7fe/CHANGELOG.asciidoc
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9bd4d7fe/docs/src/upgrade/release-3.2.x-incubating.asciidoc
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9bd4d7fe/gremlin-dotnet/glv/generate.groovy
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9bd4d7fe/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9bd4d7fe/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/__.cs
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9bd4d7fe/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSONWriter.cs
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9bd4d7fe/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9bd4d7fe/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
----------------------------------------------------------------------
diff --cc 
gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
index da455a8,fd226bf..56984d9
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
@@@ -43,13 -43,6 +43,9 @@@ namespace Gremlin.Net.IntegrationTest.G
                  case IgnoreReason.LambdaNotSupported:
                      reasonSuffix = " because lambdas are not supported in 
Gremlin.NET (TINKERPOP-1854)";
                      break;
 +                case IgnoreReason.TraversalTDeserializationNotSupported:
 +                    reasonSuffix = " as deserialization of g:T on GraphSON3 
is not supported";
 +                    break;
-                 case IgnoreReason.PNotCreatedCorrectlyByGherkinRunner:
-                     reasonSuffix =
-                         " because the Gherkin runner can't call methods in 
TraversalPredicate class (TINKERPOP-1919)";
-                     break;
                  case IgnoreReason.PWithinWrapsArgumentsInArray:
                      reasonSuffix = " because P.Within() arguments are 
incorrectly wrapped in an array (TINKERPOP-1920)";
                      break;
@@@ -63,17 -56,7 +59,16 @@@
      
      public enum IgnoreReason
      {
 +        /// <summary>
 +        /// Lambdas are not supported on Gremlin.NET yet.
 +        /// </summary>
          LambdaNotSupported,
 +
 +        /// <summary>
 +        /// Deserialization of g:T on GraphSON3 is not supported.
 +        /// </summary>
 +        TraversalTDeserializationNotSupported,
 +
-         PNotCreatedCorrectlyByGherkinRunner,
          PWithinWrapsArgumentsInArray,
          PNotDeserializationProblem
      }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9bd4d7fe/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphSON/BytecodeGraphSONSerializerTests.cs
----------------------------------------------------------------------
diff --cc 
gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphSON/BytecodeGraphSONSerializerTests.cs
index ab7be13,568b970..9b39391
--- 
a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphSON/BytecodeGraphSONSerializerTests.cs
+++ 
b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphSON/BytecodeGraphSONSerializerTests.cs
@@@ -125,15 -111,15 +125,15 @@@ namespace Gremlin.Net.UnitTest.Structur
              Assert.Equal(expectedGraphSon, graphSON);
          }
  
 -        [Fact]
 -        public void ShouldSerializeBytecodeWithSourcesStep()
 +        [Theory, MemberData(nameof(Versions))]
 +        public void ShouldSerializeBytecodeWithSourcesStep(int version)
          {
              var bytecode = new Bytecode();
 -            bytecode.AddSource("withSideEffect", "a", new List<string> 
{"josh", "peter"});
 +            bytecode.AddSource("withSideEffect", "a", "josh");
              bytecode.AddStep("V", 1);
              bytecode.AddStep("values", "name");
-             bytecode.AddStep("where", new TraversalPredicate("within", "a"));
+             bytecode.AddStep("where", new P("within", "a"));
 -            var graphsonWriter = CreateGraphSONWriter();
 +            var graphsonWriter = CreateGraphSONWriter(version);
  
              var graphSON = graphsonWriter.WriteObject(bytecode);
  

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9bd4d7fe/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphSON/GraphSONWriterTests.cs
----------------------------------------------------------------------
diff --cc 
gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphSON/GraphSONWriterTests.cs
index beb514e,3e2d307..0898c1c
--- 
a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphSON/GraphSONWriterTests.cs
+++ 
b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphSON/GraphSONWriterTests.cs
@@@ -239,50 -218,11 +239,50 @@@ namespace Gremlin.Net.UnitTest.Structur
              Assert.Equal(expectedGraphSON, serializedGraphSON);
          }
  
 -        [Fact]
 -        public void ShouldSerializePredicateWithTwoValues()
 +        [Theory, MemberData(nameof(VersionsSupportingCollections))]
 +        public void ShouldSerializeGList(int version)
 +        {
 +            var writer = CreateGraphSONWriter(version);
 +            var list = new List<object> {5, 6};
 +
 +            var serializedGraphSON = writer.WriteObject(list);
 +
 +            var expectedGraphSON = 
"{\"@type\":\"g:List\",\"@value\":[{\"@type\":\"g:Int32\",\"@value\":5}," +
 +                                   "{\"@type\":\"g:Int32\",\"@value\":6}]}";
 +            Assert.Equal(expectedGraphSON, serializedGraphSON);
 +        }
 +
 +        [Theory, MemberData(nameof(VersionsSupportingCollections))]
 +        public void ShouldSerializeGSet(int version)
 +        {
 +            var writer = CreateGraphSONWriter(version);
 +            ISet<object> set = new HashSet<object> {600L, 700L};
 +
 +            var serializedGraphSON = writer.WriteObject(set);
 +
 +            var expectedGraphSON = 
"{\"@type\":\"g:Set\",\"@value\":[{\"@type\":\"g:Int64\",\"@value\":600}," +
 +                                   "{\"@type\":\"g:Int64\",\"@value\":700}]}";
 +            Assert.Equal(expectedGraphSON, serializedGraphSON);
 +        }
 +
 +        [Theory, MemberData(nameof(VersionsSupportingCollections))]
 +        public void ShouldSerializeGMap(int version)
 +        {
 +            var writer = CreateGraphSONWriter(version);
 +            IDictionary<object, object> map = new Dictionary<object, object> 
{ { 1L, "a"}, { 200L, "b"}};
 +
 +            var serializedGraphSON = writer.WriteObject(map);
 +
 +            var expectedGraphSON = 
"{\"@type\":\"g:Map\",\"@value\":[{\"@type\":\"g:Int64\",\"@value\":1},\"a\"," +
 +                                   
"{\"@type\":\"g:Int64\",\"@value\":200},\"b\"]}";
 +            Assert.Equal(expectedGraphSON, serializedGraphSON);
 +        }
 +
 +        [Theory, MemberData(nameof(Versions))]
 +        public void ShouldSerializePredicateWithTwoValues(int version)
          {
 -            var writer = CreateStandardGraphSONWriter();
 +            var writer = CreateGraphSONWriter(version);
-             var predicate = new TraversalPredicate("within", new List<int> 
{1, 2});
+             var predicate = new P("within", new List<int> {1, 2});
  
              var serializedPredicate = writer.WriteObject(predicate);
  
@@@ -291,11 -231,11 +291,11 @@@
              Assert.Equal(expectedGraphSON, serializedPredicate);
          }
  
 -        [Fact]
 -        public void ShouldSerializePredicateWithSingleValue()
 +        [Theory, MemberData(nameof(Versions))]
 +        public void ShouldSerializePredicateWithSingleValue(int version)
          {
 -            var writer = CreateStandardGraphSONWriter();
 +            var writer = CreateGraphSONWriter(version);
-             var predicate = new TraversalPredicate("lt", 5);
+             var predicate = new P("lt", 5);
  
              var serializedPredicate = writer.WriteObject(predicate);
  

Reply via email to