public void DebuggerProxy_Recursive() { string str; object obj = new RecursiveProxy.Node(0); str = CSharpObjectFormatter.Instance.FormatObject(obj, s_memberList); AssertMembers(str, "Node", "x: 0", "y: Node { x=1, y=Node { x=2, y=Node { x=3, y=Node { x=4, y=Node { x=5, y=null } } } } }" ); obj = new InvalidRecursiveProxy.Node(); str = CSharpObjectFormatter.Instance.FormatObject(obj, s_memberList); // TODO: better overflow handling Assert.Equal("!<Stack overflow while evaluating object>", str); }
public void DebuggerProxy_Recursive() { string str; object obj = new RecursiveProxy.Node(0); str = s_formatter.FormatObject(obj, SeparateLinesOptions); AssertMembers(str, "RecursiveProxy.Node", "x: 0", "y: RecursiveProxy.Node { x=1, y=RecursiveProxy.Node { x=2, y=RecursiveProxy.Node { x=3, y=RecursiveProxy.Node { x=4, y=RecursiveProxy.Node { x=5, y=null } } } } }" ); obj = new InvalidRecursiveProxy.Node(); str = s_formatter.FormatObject(obj, SeparateLinesOptions); // TODO: better overflow handling Assert.Equal(ScriptingResources.StackOverflowWhileEvaluating, str); }