diff --git a/test/Core.Tests/Serialization/Graphson3BinaryMessageSerializationTest.MaxDepth.verified.txt b/test/Core.Tests/Serialization/Graphson3BinaryMessageSerializationTest.MaxDepth.verified.txt new file mode 100644 index 000000000..885cd5556 --- /dev/null +++ b/test/Core.Tests/Serialization/Graphson3BinaryMessageSerializationTest.MaxDepth.verified.txt @@ -0,0 +1 @@ +!application/vnd.gremlin-v3.0+json{"requestId":"00000000-0000-0000-0000-000000000000","op":"bytecode","processor":"traversal","args":{"gremlin":{"@type":"g:Bytecode","@value":{"step":[["inject",{"@type":"g:Int32","@value":0}],["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["map",{"@type":"g:Bytecode","@value":{"step":[["constant",{"@type":"g:Int32","@value":1}]]}}]]}}]]}}]]}}]]}}]]}}]]}}]]}}]]}}]]}}]]}}]]}}]]}}]]}}]]}},"aliases":{"g":"g"}}} \ No newline at end of file diff --git a/test/Core.Tests/Serialization/Graphson3BinaryMessageSerializationTest.cs b/test/Core.Tests/Serialization/Graphson3BinaryMessageSerializationTest.cs index 6bb9d0104..5a9be7a30 100644 --- a/test/Core.Tests/Serialization/Graphson3BinaryMessageSerializationTest.cs +++ b/test/Core.Tests/Serialization/Graphson3BinaryMessageSerializationTest.cs @@ -11,5 +11,22 @@ public Graphson3BinaryMessageSerializationTest(GremlinqFixture fixture) : base( new BinaryMessageSerializingVerifier()) { } + + + [Fact] + public Task MaxDepth() + { + return _g + .Inject(0) + .Map(GetLambda(13)) + .Verify(); + } + + private Func, IGremlinQuery> GetLambda(int i) + { + return i == 0 + ? __ => __.Constant(1) + : __ => __.Map(GetLambda(i - 1)); + } } }