FlorianHockmann commented on code in PR #1827:
URL: https://github.com/apache/tinkerpop/pull/1827#discussion_r994594215
##########
gremlin-dotnet/test/Gremlin.Net.UnitTest/Process/Traversal/BytecodeTests.cs:
##########
@@ -172,5 +172,16 @@ public void
ShouldUseBindingsInsideHashSetInSourceArgument()
var arg = bytecode.SourceInstructions[0].Arguments[0] as
ISet<object>;
Assert.Equal(new Binding("setVariable", "setValue"),
arg.ToList()[1]);
}
+
+ [Fact]
+ public void ShouldIncludeStepAndSourceInstructionsForToString()
+ {
+ var bytecode = new Bytecode();
+ bytecode.AddSource("source", 1, 2);
+ bytecode.AddStep("step1", 9, 8);
+ bytecode.AddStep("step2", 0);
+
+ Assert.Equal("[[source(1, 2)], [step1(9, 8), step2(0)]]",
bytecode.ToString());
Review Comment:
Good suggestion! I actually didn't think about logging of `null` arguments
which shouldn't be represented completely empty in the string representation so
I changed `Instruction.ToString()` to properly handle `null` arguments.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]