Beispiel #1
0
        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);
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
        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);
        }