C++test在對(duì)Tornado 2.2-VxWorks-5.5 simulator 下針對(duì)C++代碼單元測(cè)試
使用C++test在Tornado 2.2-VxWorks-5.5 simulator 下針對(duì)CPP代碼做單元測(cè)試時(shí),出現(xiàn)不能獲取測(cè)試結(jié)果的問(wèn)題,反復(fù)偵測(cè)問(wèn)題的緣由,查看幫助文檔,終于在幫助文檔中找到如下一些說(shuō)明:
“The default build of VxWorks-5.5 simulator (%WIND_BASE%targetconfigsimpcvxWorks.exe; Tornado-2.2) doesn't contain enough C++ features to satisfy C++test's C++ instrumentation needs in its default mode. Thus, to test C++ code, you either need to build your own VxSim image with scaled-up C++ support (we recommend using all C++ features except complex numbers; at minimum) or you need to add the -DCPPTEST_SPECIAL_STD_EXCEPTIONS_HANDLING_ENABLED=0 definition to the project compilation flags. This issue does not affect VxWorks-5.4 (Tornado-2.0).”
幫助文檔中說(shuō)得很清楚,VxWorks5.5默認(rèn)的simulator缺少C++特性支持,所以解決方案就是重新構(gòu)建一個(gè)支持C++特性的image,重新執(zhí)行即可。