dbzhang800:1. 这是你真实测试用的源码么?
2. 你的编译环境是什么,系统、编译器、Qt版本?

windows,vs2005,qt4.6.3,然后其实是做Gtest测试项目,那个是被测代码,
Gtest测试部分的源码是这样的
TEST(AcceptDigitTest, HandleWithinLimit)
{
CMainRoutine mainRoutine;
string strInputNum;
string strExpr;
string strDisplayNum;
//测试已输入为大于-1的位数已达上限负浮点数
mainRoutine.SetDisplayNum("-0.369856245632574");
mainRoutine.SetInputData("-0.369856245632574");
mainRoutine.AcceptDigit('2');
mainRoutine.GetInputData(strInputNum, strExpr); //debug跟踪至这里进去以后赋值语句出问题了
strDisplayNum = mainRoutine.GetDisplayNum();
EXPECT_STREQ("-0.369856245632574", strInputNum.c_str());
EXPECT_STREQ("-0.369856245632574", strDisplayNum.c_str());
}
运行报错信息如下