示例#1
0
        public void GetInfoFunctionLine()
        {
            uint lineNum   = 17;
            var  lineEntry = Substitute.For <SbLineEntry>();

            lineEntry.GetLine().Returns(lineNum);
            mockDebuggerStackFrame.GetLineEntry().Returns(lineEntry);

            var fields = FrameInfoFlags.FIF_FUNCNAME |
                         FrameInfoFlags.FIF_FUNCNAME_LINES;
            var info = stackFrame.GetInfo(fields);

            Assert.AreEqual(FrameInfoFlags.FIF_FUNCNAME,
                            info.ValidFields & FrameInfoFlags.FIF_FUNCNAME);
            Assert.AreEqual(NAME + " Line " + lineNum, info.FuncName);
        }
示例#2
0
 public SbLineEntry GetLineEntry() => _sbFrame.GetLineEntry();