VS 2015 Native C ++单元测试不起作用 [英] VS 2015 Native C++ Unit Testing does not work
问题描述
我有一个原生的c ++ 64位Windows应用程序,我正在尝试添加单元测试。
I have a native c++ 64 bit windows application which I'm trying to add unit tests to.
我已添加 $(VCInstallDir)UnitTest \ include ;到包含目录和 $(VCInstallDir)UnitTest \lib;到图书馆目录。
I've added $(VCInstallDir)UnitTest\include; to the Include Directories and $(VCInstallDir)UnitTest\lib; to Library Directories.
另外,我添加了一个cpp文件,其中包含下面列出的代码。
Additionally, I've added a cpp file with the code listed below.
项目编译得很好,我看到了"单元测试"在测试资源管理器中。我已经设置了测试 - >测试设置 - >默认处理器体系结构为x64。
The project compiles fine, and I see the "unittest" in the Test Explorer. I've set the Test->Test Settings-> Default Processor Architecture to x64.
如果我尝试运行测试,则会显示一个错误框,显示"vstest.executionengine.exe已停止工作"
If I try to run the test, I get an error box displaying "vstest.executionengine.exe has stopped working"
输出窗口显示:
------运行测试开始------
$
堆栈跟踪不可用。这可能是因为缺少PDB文件而
由于执行过程意外退出,因此中止了活动的测试运行。测试执行过程在运行测试时崩溃。要进一步调查,请在Visual Studio中打开file:/// C:/Users/bpeikes/AppData/Local/CrashDumps/vstest.executionengine.exe.20224.dmp
文件,然后选择"在混合模式下调试"。
==========运行测试结束:0运行(0:00:28.04)==========
------ Run test started ------
Stack trace is not available. This may be because of missing PDB file(s)
The active Test Run was aborted because the execution process exited unexpectedly. The test execution process crashed while running the tests. To investigate further, open file:///C:/Users/bpeikes/AppData/Local/CrashDumps/vstest.executionengine.exe.20224.dmp
file in Visual Studio and choose "Debug in mixed mode".
========== Run test finished: 0 run (0:00:28.04) ==========
以下是转储摘要:
转储摘要
---------- -
转储文件: vstest.executionengine.exe.20224.dmp:C:\ Users \ bpeikes \ AppData \本地\CrashDumps\vstest.executionengine.exe.20224.dmp
上次写入时间: 4/26/2017 4:29:41 PM
流程名称: vstest.executionengine.exe:C:\ PATROGRAM FILES(X86)\ MICROSOFT VISUAL STUDIO 14.0\Common7\IDE\COMMONEXTENSIONS\MICROSOFT\TESTWINDOW\vstest.executionengine.exe
流程架构: x64
例外代码: 0xC0000005
异常信息: 线程试图读取或写入其没有适当访问权限的虚拟地址。
堆信息: 不存在>
系统信息
------------------
OS版本: 6.1.7601
CLR版本: 4.6.1055.0
$
模块
-------
模块名称 模块路径
模块版本
------ ----- -----------
--------------
$
vstest.executionengine.exe C:\ PROGAM文件(X86)\ MICROSOFT VISUAL STUDIO 14.0 \ Common7 \IDE \COMMONEXTEN SIONS\MICROSOFT\TESTWINDOW\vstest.executionengine.exe
14.0.23107.0
ntdll.dll C:\ Windows \ System32 \ antdll.dll
6.1.7601.18247
mscoree.dll C:\ Windows \ System32 \ mscoree.dll
4.0.40305.0
kernel32.dll C:\ Windows \ System32 \ kernel32.dll
6.1.7601.18015
KERNELBASE.dll C:\ Windows \ System32 \ KERNELBASE.dll
6.1.7601.18015
advapi32.dll C:\ Windows \ System32 \ adminapi32.dll
6.1 .7601.18247
msvcrt.dll C:\ Windows \ system32 \msvcrt.dll
7.0.7601.17744
sechost.dll C:\ Windows \ System32 \sechost.dll
6.1.7600.16385
rpcrt4.dll C:\ Windows \ System32 \rpcrt4.dll
6.1.7601.17514
mscoreei.dll C:\ Windows \ Microsoftoft.NET \\ \\ Framework64\v4.0.30319\mscoreei.dll
4.6.1055.0
shlwapi.dll C:\ Windows \ System32 \ shlwapi.dll
6.1.7601.17514
gdi32.dll C:\ Windows \ System32 \ gdi32.dll
6.1.7601.17514
user32.dll C:\Windows\System32\user32.dll
6.1.7601.17514
lpk.dll C:\ Windows \ System32 \ lpk.dll
6.1 .7600.16385
usp10.dll C:\ Windows \ System32 \ usp10.dll
1.626.7601.18009
imm32.dll C:\ Windows \ System32 \imm32.dll
6.1.7600.16385
msctf.dll C:\ Windows \ System32 \ msctf.dll
6.1.7600.16385
版本.dll C:\ Windows \ system32 \ version.dll
6.1.7600.16385
clr.dll C:\ Windows \ Microsoftoft.NET \\ Framework64 \v4.0.30319\clr.dll
4.6.1055.0
MSVCR120_CLR0400.dll C:\ Windows \ system32 \ MSVCR120_CLR0400.dll
12.0.52512.0
mscorlib.ni.dll C:\ Windows \assembly\NativeImages_v4.0.30319_64 \ mscorlib \fa8eef6f6cb67c660d71e15c5cad71b5 \\\ corcorlib。 ni.dll
4.6.1055.0
ole32.dll C:\Windows\System32\ole32.dll
6.1.7601.17514
CRYPTBASE.dll C:\ Windows \ System32 \ CRYPTBASE.dll
6.1 .7600.16385
api-ms-win-core-xstate-l2-1-0.dll C:\ Windows \ System32\api-MS-双赢核心XSTATE-l2-1-0.dll
10.0.10240.16390
clrjit.dll C:\ Windows \ microsoft.NET \ Framework64 \v4.0.30319 \ clrjit.dll
4.6.1055.0
oleaut32.dll C:\ Windows \ system32 \oleaut32.dll
6.1.7601.17676
System.ni.dll C:\ Windows \assembly\NativeImages_v4。 0.30319_64\System\5f665a4076cb8d9479ca406e7827fb9f\System.ni.dll
4.6.1055.0
System.Core。 ni.dll C:\ Windows \assembly\NativeImages_v4.0.30319_64\System.Core\5034a88e58f966dd7d69fe9b9875832c\System.Core.ni.dll
4.6.1055.0
System.ServiceModel.ni.dll 跨度>ç :\ Windows \assembly\NativeImages_v4.0.30319_64\System.ServiceModel \ac14548e7a731da59e036d17ba8e3c06 \System.ServiceModel.ni.dll
4.6.1055.0
System.Configuration.ni.dll C:\ Windows \assembly\NativeImages_v4.0.30319_64 \ System.Configuration\46ec60579b59cedcc8c39cabca6d1153\System.Configuration.ni.dll
4.6.1055.0
System.Xml。 ni.dll C:\ Windows \assembly\NativeImages_v4.0.30319_64\System.Xml\c9576235d85a3db71a0bee45aa4155ba\System.Xml.ni.dll
4.6.1055.0
nlssorting.dll C:\ Windows \ microsoft.NET \ Framework64 \v4.0.30319 \ nlssorting.dll
4.6.1055.0
psapi.dll C:\ Windows \ System32 \ psapi.dll
6.1.7600.16385
System.Runtime.Serialization.ni.dll C:\ Windows \assembly \NativeImages_v4.0.30319_64 \ System.Runteb92aa12#\ ec3ea73175791bd1e5d2031d2831e641 \\ \\ System.Runtime.Serialization.ni.dll
4.6.1055.0
SMDiagnostics.ni.dll C:\ Windows \assembly\NativeImages_v4.0.30319_64\SMDiagnostics\c329a07fa3cb821400eb59734c1a04d8\SMDiagnostics.ni.dll
4.6.1055.0
System.ServiceModel.Internals.ni.dll C:\ Windows \assembly\NativeImages_v4.0.30319_64\System.Servd1dec626#\7a5b7af88001106023a3e276d8fbe359 \ System.ServiceModel.Internals.ni.dll
4.6 .1055.0
c ryptsp.dll C:\ Windows \ system32 \cryptsp.dll
6.1.7600.16385
rsaenh.dll C:\ Windows \ System32 \rsaenh.dll
6.1.7600.16385
pcwum.dll C:\ Windows \ System32 \pcwum.dll
6.1.7600.16385
System.IdentityModel.ni.dll C:\ Windows \assembly\NativeImages_v4.0.30319_64 \ System.IdentityModel \ecc5d85adbc8e7509150a68794f10491 \ System.IdentityModel.ni.dll
4.6.1055.0
secur32.dll C:\ Windows \ System32\secur32.dll
6.1.7601.17725
sspicli.dll C:\ Windows \\ System32\sspicli.dll
6.1.7601.17725
credssp.dll C:\ Windows \ System32 \ credssp.dll
6.1.7601.17514
msv1_0.dll C:\ Windows \ System32 \msv1_0.dll
6.1.7601.17514
cryptdll.dll C:\ Windows \ System32 \cryptdll.dll
6.1.7600.16385
System.Web.ni.dll C :\ Windows \assembly\NativeImages_v4.0.30319_64\System.Web\ee13e78d37a5275c8b058abf59639dd2\System.Web.ni.dll
4.6.1055.0
System.Transactions.ni.dll C:\ Windows \assembly\NativeImages_v4.0.30319_64 \ System.Transactions\b44 bdaedc4f62da5d0ba099aee8acc52\System.Transactions.ni.dll
4.6.1055.0
System.Transactions.dll C:\ Windows \ Microsoft.Net\assembly\GAC_64\System.Transactions\v4.0_4.0.0.0__b77a5c561934e089\System.Transactions.dll < span style ="white-space:pre">
4.6.1055.0
Microsoft.VisualStudio.QualityTools.Resource.ni.dll
C:\ Windows \assembly\NativeImages_v4.0.30319_64\Microsoft.Vde0c9297#\f3f78352c04866144049a44da6be7c4f \ Microsoft.VisualStudio.QualityTools.Resource.ni.dll
14.0.23107.0
Microsoft.VisualStudio.QualityTools.Tips.UnitTest.AssemblyResolver.ni.dll
C:\ Windows \assembly\NativeImages_v4.0.30319_64\Microsoft.V4ce40b6b#\ bf26425cb4585c827fbda9ef5989f1e5\Microsoft.V isualStudio.QualityTools.Tips.UnitTest.AssemblyResolver.ni.dll
14.0.23107.0
Microsoft.VisualStudio.QualityTools。 UnitTestFramework.ni.dll
C:\ Windows \assembly\NativeImages_v4.0.30319_64\Microsoft.Vea6d7231#\\\345c3af874df74953bfa952383edb79f \ Microsoft.VisualStudio.QualityTools.UnitTestFramework.ni.dll
14.0.23107.0
System.Data.ni.dll < span style ="white-space:pre"> C:\ Windows \assembly\NativeImages_v4.0.30319_64\System.Data\8d52adb77d289d4bca797c81969b3476\System.Data.ni.dll
4.6.1055.0
$
System.Data.dll C: \ Windows \ Microsoft.Net\assembly\GAC_64 \ System.Data \v4.0_4.0.0.0__b77a5c561934e089 \ System.Data.dll
4.6.1055.0
w s2_32.dll C:\ Windows \ System32 \ws2_32.dll
6.1.7601.17514
nsi.dll C:\ Windows \ System32 \ nsi.dll
6.1.7600.16385
crypt32.dll C:\ Windows \ System32 \crypt32.dll
6.1.7601.17856
msasn1.dll C:\ Windows \ System32 \ msasn1.dll
6.1.7601.17514
System.ComponentModel.Composition.ni.dll C:\ Windows \assembly \NativeImages_v4.0.30319_64 \ System.Compba577418#\214e418d0d73d4b4e54e72667fa7e57a \ System.ComponentModel.Composition.ni.dll
4.6.1055.0
urlmon.dll C:\ Windows \ system32 \urlmon.dll
11.0.9600.16428
api-ms-win- downlevel-ole32-l1-1-0.dll C:\ Windows \ System32 \ api-ms-win-downlevel-ole32-l1-1 -0.dll
6.2.9200.16492
api-ms-win-downlevel-shlwapi-l1-1-0 .dll C:\ Windows \ system32 \ api-ms-win-downlevel-shlwapi-l1-1-0.dll
6.2.9200.16492
api-ms-win-downlevel-advapi32-l1-1-0.dll C:\ Windows \ System32 \ api-ms-win-downlevel-advapi32-l1-1-0.dll
6.2.9200.16492
api-ms-win-downlevel-user32-l1-1-0.dll C:\ Windows \ system32 \ api-ms-win-downlevel-user32-l1-1-0.dll
6.2.9200.16492
api-ms-win-dow nlevel-version-l1-1-0.dll C:\ Windows \ System32 \ api-ms-win-downlevel-version-l1-1 -0.dll
6.2.9200.16492
api-ms-win-downlevel-normaliz-l1-1-0 .dll C:\ Windows \ system32 \ api-ms-win-downlevel-normaliz-l1-1-0.dll
6.2.9200.16492
normaliz.dll C:\ Windows \ System32 \\\
ormaliz.dll
6.1.7600.16385
iertutil.dll C:\ Windows \ System32 \iertutil.dll
11.0.9600.16428
wininet.dll C:\ Windows \ system32 \ wininet.dll
11.0.9600.16428
shell32.dll C:\ Windows \ System32 \\shell32.dll
6.1.7601.18103
api-ms-win-downlevel-advapi32-l2-1-0 .dll C:\ Windows \ system32 \ api-ms-win-downlevel-advapi32-l2-1-0.dll
6.2.9200.16492
System.Threading.Tasks.Dataflow.ni.dll C:\Windows\assembly\NativeImages_v4.0.30319_64\System.Thre3435c1dc#\75ad2092169009a352a8aa45f86fafad\System.Threading.Tasks.Dataflow.ni.dll
4.5.24.0
RpcRtRemote.dll C:\ Windows \ System32 \ RpcRtRemote .dll
6.1.7601.17514
clbcatq.dll C:\ Windows \ System32 \ clbcatq.dll
2001.12.8530.16385
sxs.dll < span style ="white-space:pre"> C:\\ \\ windows \ System32 \ xss.dll
6.1.7601.17514
ieproxy.dll C:\Program Files \Internet Explorer \ myproxy.dll
11.0.9600.16428
api-ms-win-downlevel-shlwapi-l2-1-0.dll C:\ Windows \ System32 \ api -ms-win-downlevel-shlwapi-l2-1-0.dll
6.2.9200.16492
System.EnterpriseServices .ni.dll C:\ Windows \assembly\NativeImages_v4.0.30319_64\System.Ente96d83b35#\ 012b0f61307b5380e1f2affec6e4052e0 \ System.EnterpriseServices.ni .dll
4.6.1055.0
System.EnterpriseServices.Wrapper.dll C:\ Windows \assembly\NativeImages_v4.0.30319_64\System.Ente96d83b35#\ 012b0f61307b5380e1f2affec6e4052e0 \ System.EnterpriseServices.Wrapper.dll
4.6.1055.0
System.EnterpriseServices.Wrapper.dll C:\ Windows \ Microsoft.Net\assembly\GAC_64 \ System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.Wrapper .dll
4.6.1055.0
uxtheme.dll C:\ Windows \ System32 \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ TestTools.CppUnitTestFramework.X64.dll
C:\PROGRAM FILES(X86)\ MICROSOFT VISUAL STUDIO 14.0 \ Common7 \IDE \ COMMONEXTENSIONS\MICROSOFT\TESTWINDOW\Extensions\CppUnitFramework\Microsoft.VisualStudio.TestTools.CppUnitTestFramework.X64.dll
14.0.25420.1
VCRUNTIME1 40.dll C:\ Windows \ System32 \ VCRUNTIME140.dll
14.0.24215.1
api-ms-win-crt-runtime-l1-1-0.dll C:\ Windows \ System32 \ api-ms-win-crt-runtime-l1-1-0.dll
10.0.10240.16390
ucrtbase.dll C:\ Windows \ system32 \ucrtbase.dll
10.0.10240.16390
api-ms-win-core-timezone-l1-1-0.dll C:\ Windows \ system32 \ api-ms-win-core-timezone-l1-1-0.dll
10.0.10240.16390
api-ms-win-core-file-l2-1-0.dll C:\ Windows \ System32 \\ \\ api-ms-win-core-file-l2-1-0.dll
10.0.10240.16390
api -MS-双赢的核心定位 - l1-2-0.dll C:\ Windows \ System32 \ api-ms-win-core-localization-l1-2-0.dll
10.0.10240.16390
api-ms-win-core-synch-l1-2-0.dll C:\ Windows \ system32 \ api-ms-win-core-synch-l1-2-0.dll
10.0.10240.16390
api-ms-win-core-processthreads-l1-1-1.dll C:\ Windows \ System32 \ api-ms-win-core-processthreads-l1-1-1.dll
10.0.10240.16390
api-ms-win-core-file-l1-2-0.dll C:\ Windows \ System32 \ api-ms -win-core-file-l1-2-0.dll
10.0.10240.16390
api-ms-win -crt-string-l1-1-0.dll C:\ Windows \ System32 \ api-ms-win-crt-string-l1- 1-0.dll
10.0.10 240.16390
api-ms-win-crt-heap-l1-1-0.dll C:\ Windows \ System32 \ api-ms-win-crt-heap-l1-1-0.dll
10.0.10240.16390
api-ms-win-crt-stdio-l1-1-0.dll C:\ Windows \ System32 \ api-ms-win-crt -stdio-l1-1-0.dll
10.0.10240.16390
api-ms-win-crt-convert -l1-1-0.dll C:\ Windows \ System32 \ api-ms-win-crt-convert-l1-1-0。 dll
10.0.10240.16390
msvcp140.dll C:\ Windows \ System32 \msvcp140.dll
14.0.24215.1
api-ms-win -crt-locale-l1-1-0.dll C:\ Windows \ System32 \ api-ms-win-crt-locale-l1- 1-0.dll
10.0.10240.16390
api-ms-win-crt-math-l1-1-0.dll C:\ Windows \ System32 \ _api ms-win-crt-math-l1-1-0.dll
10.0.10240.16390
api-ms- win-crt-multibyte-l1-1-0.dll C:\ Windows \ System32 \ api-ms-win-crt-multibyte-l1 -1-0.dll
10.0.10240.16390
api-ms-win-crt-time-l1-1 -0.dll C:\ Windows \ system32 \ api-ms-win-crt-time-l1-1-0.dll
10.0.10240.16390
api-ms-win-crt-filesystem-l1-1-0.dll C:\ Windows \ System32 \ api-ms-win-crt-filesystem-l1-1-0.dll
10.0.10240.16390
api-ms-win-crt-environment-l1-1-0.dll C:\ Windows \ System32 \ api-ms-win-crt-environment-l1-1-0.dll
10.0.10240.16390
api-ms-win-crt-utility-l1-1-0.dll C:\ Windows \ System32 \ api-ms-win-crt-utility-l1-1-0.dll
10.0.10240.16390
Microsoft.VisualStudio.TestTools.CppUnitTestFramework.Resources.dll
C :\ PROGRAM FILES(X86)\ MICROSOFT VISUAL STUDIO 14.0 \ Common7 \IDE \COMMONEXTENSIONS \ MICROSOFT \TESTWINDOW \ Extensions \CppUnitFramework\Microsoft.VisualStudio.TestTools.CppUnitTestFramework.Resources.dll
14.0.25420.1
Microsoft.VisualStudio.TestTools.CppUnitTestFramework.Executor.x64.dll
C:\PROGRAM FILES(X86)\ MICROSOFT VISUAL STUDIO 14.0 \ Common7 \IDE \COMMONEXTENSIONS \ MICROSOFT \TESTWINDOW \ Extensions \CppUnitFramework \ Microsoft.VisualS tudio.TestTools.CppUnitTestFramework.Executor.x64.dll
14.0.25420.1
dbghelp.dll C:\ Windows \ System32 \ dbghelp.dll
6.1.7601.17514
Microsoft.VisualStudio.TestTools.CppUnitTestFramework.Executor.Resources.dll
C:\PROGRAM FILES(X86)\ MICROSOFT VISUAL STUDIO 14.0 \ Common7 \IDE \COMMONEXTENSIONS \ MICROSOFT \TESTWINDOW \ Extensions \CppUnitFramework \ Microsoft.VisualStudio.TestTools.CppUnitTestFramework.Executor.Resources.dll
14.0.25420.1
Viewer2.exe C:\Projects \Surveillance\trunk \prototype\viewer2 \Debug \ x64 \ Viewer2.exe
4.0.0.31
netapi32。 dll C:\\ Windows \ System32 \ netapi32.dll
6.1.7601.17887
netutils.dll C:\ Windows \ System32 \ netutils.dll
6.1.7601.17514
srvcli.dll C:\ Windows \ System32 \ srvcli.dll
6.1.7601.17514
wkscli.dll C:\ Windows \ System32 \ wkscli.dll
6.1.7601.17514
logoncli.dll C: \ Windows \ system32 \logoncli.dll
6.1.7601.17514
ntdsapi.dll C:\ Windows \ System32 \ tdsapi.dll
6.1.7600.16385
mswsock.dll C:\ Windows \ System 32 \mswsock.dll
6.1.7601.18254
WSHTCPIP.DLL C:\ Windows \ System32 \WSHTCPIP.DLL
6.1.7600.16385
wship6.dll C:\ Windows \ System32 \ wship6.dll
6.1.7600.16385
dnsapi.dll C:\ Windows \ System32 \ nnsapi.dll
6.1.7601.17570
mdnsNSP.dll C:\Program Files \ Bonjour \mdnsNSP.dll
3.1.0.1
IPHLPAPI.DLL C:\ Windows \ System32 \IPHLPAPI.DLL
6.1.7601.17514
winnsi.dll C:\ Windows \ System32 \ winnsi.dll
6.1.7600.16385
rasadhlp.dll C: \ Windows \ System32 \ rasadhlp.dll
6.1.7600.16385
FWPUCLNT.DLL C:\ Windows \ System32 \FWPUCLNT.DLL
6.1.7600.16385
kerberos.dll C:\ Windows \ System32 \kerberos.dll
6.1.7601.17926
bcrypt.dll C:\ Windows \ System32 \ icecrypt.dll
6.1.7600.16385
bcryptprimitives.dll C:\ Windows \ System32 \bcryptprimitives.dll
6.1.7601.17514
Dump Summary
------------
Dump File: vstest.executionengine.exe.20224.dmp : C:\Users\bpeikes\AppData\Local\CrashDumps\vstest.executionengine.exe.20224.dmp
Last Write Time: 4/26/2017 4:29:41 PM
Process Name: vstest.executionengine.exe : C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 14.0\Common7\IDE\COMMONEXTENSIONS\MICROSOFT\TESTWINDOW\vstest.executionengine.exe
Process Architecture: x64
Exception Code: 0xC0000005
Exception Information: The thread tried to read from or write to a virtual address for which it does not have the appropriate access.
Heap Information: Not Present
System Information
------------------
OS Version: 6.1.7601
CLR Version(s): 4.6.1055.0
Modules
-------
Module Name Module Path
Module Version
----------- -----------
--------------
vstest.executionengine.exe C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 14.0\Common7\IDE\COMMONEXTENSIONS\MICROSOFT\TESTWINDOW\vstest.executionengine.exe
14.0.23107.0
ntdll.dll C:\Windows\System32\ntdll.dll
6.1.7601.18247
mscoree.dll C:\Windows\System32\mscoree.dll
4.0.40305.0
kernel32.dll C:\Windows\System32\kernel32.dll
6.1.7601.18015
KERNELBASE.dll C:\Windows\System32\KERNELBASE.dll
6.1.7601.18015
advapi32.dll C:\Windows\System32\advapi32.dll
6.1.7601.18247
msvcrt.dll C:\Windows\System32\msvcrt.dll
7.0.7601.17744
sechost.dll C:\Windows\System32\sechost.dll
6.1.7600.16385
rpcrt4.dll C:\Windows\System32\rpcrt4.dll
6.1.7601.17514
mscoreei.dll C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscoreei.dll
4.6.1055.0
shlwapi.dll C:\Windows\System32\shlwapi.dll
6.1.7601.17514
gdi32.dll C:\Windows\System32\gdi32.dll
6.1.7601.17514
user32.dll C:\Windows\System32\user32.dll
6.1.7601.17514
lpk.dll C:\Windows\System32\lpk.dll
6.1.7600.16385
usp10.dll C:\Windows\System32\usp10.dll
1.626.7601.18009
imm32.dll C:\Windows\System32\imm32.dll
6.1.7600.16385
msctf.dll C:\Windows\System32\msctf.dll
6.1.7600.16385
version.dll C:\Windows\System32\version.dll
6.1.7600.16385
clr.dll C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
4.6.1055.0
MSVCR120_CLR0400.dll C:\Windows\System32\MSVCR120_CLR0400.dll
12.0.52512.0
mscorlib.ni.dll C:\Windows\assembly\NativeImages_v4.0.30319_64\mscorlib\fa8eef6f6cb67c660d71e15c5cad71b5\mscorlib.ni.dll
4.6.1055.0
ole32.dll C:\Windows\System32\ole32.dll
6.1.7601.17514
CRYPTBASE.dll C:\Windows\System32\CRYPTBASE.dll
6.1.7600.16385
api-ms-win-core-xstate-l2-1-0.dll C:\Windows\System32\api-ms-win-core-xstate-l2-1-0.dll
10.0.10240.16390
clrjit.dll C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clrjit.dll
4.6.1055.0
oleaut32.dll C:\Windows\System32\oleaut32.dll
6.1.7601.17676
System.ni.dll C:\Windows\assembly\NativeImages_v4.0.30319_64\System\5f665a4076cb8d9479ca406e7827fb9f\System.ni.dll
4.6.1055.0
System.Core.ni.dll C:\Windows\assembly\NativeImages_v4.0.30319_64\System.Core\5034a88e58f966dd7d69fe9b9875832c\System.Core.ni.dll
4.6.1055.0
System.ServiceModel.ni.dll C:\Windows\assembly\NativeImages_v4.0.30319_64\System.ServiceModel\ac14548e7a731da59e036d17ba8e3c06\System.ServiceModel.ni.dll
4.6.1055.0
System.Configuration.ni.dll C:\Windows\assembly\NativeImages_v4.0.30319_64\System.Configuration\46ec60579b59cedcc8c39cabca6d1153\System.Configuration.ni.dll
4.6.1055.0
System.Xml.ni.dll C:\Windows\assembly\NativeImages_v4.0.30319_64\System.Xml\c9576235d85a3db71a0bee45aa4155ba\System.Xml.ni.dll
4.6.1055.0
nlssorting.dll C:\Windows\Microsoft.NET\Framework64\v4.0.30319\nlssorting.dll
4.6.1055.0
psapi.dll C:\Windows\System32\psapi.dll
6.1.7600.16385
System.Runtime.Serialization.ni.dll C:\Windows\assembly\NativeImages_v4.0.30319_64\System.Runteb92aa12#\ec3ea73175791bd1e5d2031d2831e641\System.Runtime.Serialization.ni.dll
4.6.1055.0
SMDiagnostics.ni.dll C:\Windows\assembly\NativeImages_v4.0.30319_64\SMDiagnostics\c329a07fa3cb821400eb59734c1a04d8\SMDiagnostics.ni.dll
4.6.1055.0
System.ServiceModel.Internals.ni.dll C:\Windows\assembly\NativeImages_v4.0.30319_64\System.Servd1dec626#\7a5b7af88001106023a3e276d8fbe359\System.ServiceModel.Internals.ni.dll
4.6.1055.0
cryptsp.dll C:\Windows\System32\cryptsp.dll
6.1.7600.16385
rsaenh.dll C:\Windows\System32\rsaenh.dll
6.1.7600.16385
pcwum.dll C:\Windows\System32\pcwum.dll
6.1.7600.16385
System.IdentityModel.ni.dll C:\Windows\assembly\NativeImages_v4.0.30319_64\System.IdentityModel\ecc5d85adbc8e7509150a68794f10491\System.IdentityModel.ni.dll
4.6.1055.0
secur32.dll C:\Windows\System32\secur32.dll
6.1.7601.17725
sspicli.dll C:\Windows\System32\sspicli.dll
6.1.7601.17725
credssp.dll C:\Windows\System32\credssp.dll
6.1.7601.17514
msv1_0.dll C:\Windows\System32\msv1_0.dll
6.1.7601.17514
cryptdll.dll C:\Windows\System32\cryptdll.dll
6.1.7600.16385
System.Web.ni.dll C:\Windows\assembly\NativeImages_v4.0.30319_64\System.Web\ee13e78d37a5275c8b058abf59639dd2\System.Web.ni.dll
4.6.1055.0
System.Transactions.ni.dll C:\Windows\assembly\NativeImages_v4.0.30319_64\System.Transactions\b44bdaedc4f62da5d0ba099aee8acc52\System.Transactions.ni.dll
4.6.1055.0
System.Transactions.dll C:\Windows\Microsoft.Net\assembly\GAC_64\System.Transactions\v4.0_4.0.0.0__b77a5c561934e089\System.Transactions.dll
4.6.1055.0
Microsoft.VisualStudio.QualityTools.Resource.ni.dll
C:\Windows\assembly\NativeImages_v4.0.30319_64\Microsoft.Vde0c9297#\f3f78352c04866144049a44da6be7c4f\Microsoft.VisualStudio.QualityTools.Resource.ni.dll
14.0.23107.0
Microsoft.VisualStudio.QualityTools.Tips.UnitTest.AssemblyResolver.ni.dll
C:\Windows\assembly\NativeImages_v4.0.30319_64\Microsoft.V4ce40b6b#\bf26425cb4585c827fbda9ef5989f1e5\Microsoft.VisualStudio.QualityTools.Tips.UnitTest.AssemblyResolver.ni.dll
14.0.23107.0
Microsoft.VisualStudio.QualityTools.UnitTestFramework.ni.dll
C:\Windows\assembly\NativeImages_v4.0.30319_64\Microsoft.Vea6d7231#\345c3af874df74953bfa952383edb79f\Microsoft.VisualStudio.QualityTools.UnitTestFramework.ni.dll
14.0.23107.0
System.Data.ni.dll C:\Windows\assembly\NativeImages_v4.0.30319_64\System.Data\8d52adb77d289d4bca797c81969b3476\System.Data.ni.dll
4.6.1055.0
System.Data.dll C:\Windows\Microsoft.Net\assembly\GAC_64\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll
4.6.1055.0
ws2_32.dll C:\Windows\System32\ws2_32.dll
6.1.7601.17514
nsi.dll C:\Windows\System32\nsi.dll
6.1.7600.16385
crypt32.dll C:\Windows\System32\crypt32.dll
6.1.7601.17856
msasn1.dll C:\Windows\System32\msasn1.dll
6.1.7601.17514
System.ComponentModel.Composition.ni.dll C:\Windows\assembly\NativeImages_v4.0.30319_64\System.Compba577418#\214e418d0d73d4b4e54e72667fa7e57a\System.ComponentModel.Composition.ni.dll
4.6.1055.0
urlmon.dll C:\Windows\System32\urlmon.dll
11.0.9600.16428
api-ms-win-downlevel-ole32-l1-1-0.dll C:\Windows\System32\api-ms-win-downlevel-ole32-l1-1-0.dll
6.2.9200.16492
api-ms-win-downlevel-shlwapi-l1-1-0.dll C:\Windows\System32\api-ms-win-downlevel-shlwapi-l1-1-0.dll
6.2.9200.16492
api-ms-win-downlevel-advapi32-l1-1-0.dll C:\Windows\System32\api-ms-win-downlevel-advapi32-l1-1-0.dll
6.2.9200.16492
api-ms-win-downlevel-user32-l1-1-0.dll C:\Windows\System32\api-ms-win-downlevel-user32-l1-1-0.dll
6.2.9200.16492
api-ms-win-downlevel-version-l1-1-0.dll C:\Windows\System32\api-ms-win-downlevel-version-l1-1-0.dll
6.2.9200.16492
api-ms-win-downlevel-normaliz-l1-1-0.dll C:\Windows\System32\api-ms-win-downlevel-normaliz-l1-1-0.dll
6.2.9200.16492
normaliz.dll C:\Windows\System32\normaliz.dll
6.1.7600.16385
iertutil.dll C:\Windows\System32\iertutil.dll
11.0.9600.16428
wininet.dll C:\Windows\System32\wininet.dll
11.0.9600.16428
shell32.dll C:\Windows\System32\shell32.dll
6.1.7601.18103
api-ms-win-downlevel-advapi32-l2-1-0.dll C:\Windows\System32\api-ms-win-downlevel-advapi32-l2-1-0.dll
6.2.9200.16492
System.Threading.Tasks.Dataflow.ni.dll C:\Windows\assembly\NativeImages_v4.0.30319_64\System.Thre3435c1dc#\75ad2092169009a352a8aa45f86fafad\System.Threading.Tasks.Dataflow.ni.dll
4.5.24.0
RpcRtRemote.dll C:\Windows\System32\RpcRtRemote.dll
6.1.7601.17514
clbcatq.dll C:\Windows\System32\clbcatq.dll
2001.12.8530.16385
sxs.dll C:\Windows\System32\sxs.dll
6.1.7601.17514
ieproxy.dll C:\Program Files\Internet Explorer\ieproxy.dll
11.0.9600.16428
api-ms-win-downlevel-shlwapi-l2-1-0.dll C:\Windows\System32\api-ms-win-downlevel-shlwapi-l2-1-0.dll
6.2.9200.16492
System.EnterpriseServices.ni.dll C:\Windows\assembly\NativeImages_v4.0.30319_64\System.Ente96d83b35#\12b0f61307b5380e1f2affec6e4052e0\System.EnterpriseServices.ni.dll
4.6.1055.0
System.EnterpriseServices.Wrapper.dll C:\Windows\assembly\NativeImages_v4.0.30319_64\System.Ente96d83b35#\12b0f61307b5380e1f2affec6e4052e0\System.EnterpriseServices.Wrapper.dll
4.6.1055.0
System.EnterpriseServices.Wrapper.dll C:\Windows\Microsoft.Net\assembly\GAC_64\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.Wrapper.dll
4.6.1055.0
uxtheme.dll C:\Windows\System32\uxtheme.dll
6.1.7600.16385
Microsoft.VisualStudio.TestTools.CppUnitTestFramework.X64.dll
C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 14.0\Common7\IDE\COMMONEXTENSIONS\MICROSOFT\TESTWINDOW\Extensions\CppUnitFramework\Microsoft.VisualStudio.TestTools.CppUnitTestFramework.X64.dll
14.0.25420.1
VCRUNTIME140.dll C:\Windows\System32\VCRUNTIME140.dll
14.0.24215.1
api-ms-win-crt-runtime-l1-1-0.dll C:\Windows\System32\api-ms-win-crt-runtime-l1-1-0.dll
10.0.10240.16390
ucrtbase.dll C:\Windows\System32\ucrtbase.dll
10.0.10240.16390
api-ms-win-core-timezone-l1-1-0.dll C:\Windows\System32\api-ms-win-core-timezone-l1-1-0.dll
10.0.10240.16390
api-ms-win-core-file-l2-1-0.dll C:\Windows\System32\api-ms-win-core-file-l2-1-0.dll
10.0.10240.16390
api-ms-win-core-localization-l1-2-0.dll C:\Windows\System32\api-ms-win-core-localization-l1-2-0.dll
10.0.10240.16390
api-ms-win-core-synch-l1-2-0.dll C:\Windows\System32\api-ms-win-core-synch-l1-2-0.dll
10.0.10240.16390
api-ms-win-core-processthreads-l1-1-1.dll C:\Windows\System32\api-ms-win-core-processthreads-l1-1-1.dll
10.0.10240.16390
api-ms-win-core-file-l1-2-0.dll C:\Windows\System32\api-ms-win-core-file-l1-2-0.dll
10.0.10240.16390
api-ms-win-crt-string-l1-1-0.dll C:\Windows\System32\api-ms-win-crt-string-l1-1-0.dll
10.0.10240.16390
api-ms-win-crt-heap-l1-1-0.dll C:\Windows\System32\api-ms-win-crt-heap-l1-1-0.dll
10.0.10240.16390
api-ms-win-crt-stdio-l1-1-0.dll C:\Windows\System32\api-ms-win-crt-stdio-l1-1-0.dll
10.0.10240.16390
api-ms-win-crt-convert-l1-1-0.dll C:\Windows\System32\api-ms-win-crt-convert-l1-1-0.dll
10.0.10240.16390
msvcp140.dll C:\Windows\System32\msvcp140.dll
14.0.24215.1
api-ms-win-crt-locale-l1-1-0.dll C:\Windows\System32\api-ms-win-crt-locale-l1-1-0.dll
10.0.10240.16390
api-ms-win-crt-math-l1-1-0.dll C:\Windows\System32\api-ms-win-crt-math-l1-1-0.dll
10.0.10240.16390
api-ms-win-crt-multibyte-l1-1-0.dll C:\Windows\System32\api-ms-win-crt-multibyte-l1-1-0.dll
10.0.10240.16390
api-ms-win-crt-time-l1-1-0.dll C:\Windows\System32\api-ms-win-crt-time-l1-1-0.dll
10.0.10240.16390
api-ms-win-crt-filesystem-l1-1-0.dll C:\Windows\System32\api-ms-win-crt-filesystem-l1-1-0.dll
10.0.10240.16390
api-ms-win-crt-environment-l1-1-0.dll C:\Windows\System32\api-ms-win-crt-environment-l1-1-0.dll
10.0.10240.16390
api-ms-win-crt-utility-l1-1-0.dll C:\Windows\System32\api-ms-win-crt-utility-l1-1-0.dll
10.0.10240.16390
Microsoft.VisualStudio.TestTools.CppUnitTestFramework.Resources.dll
C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 14.0\Common7\IDE\COMMONEXTENSIONS\MICROSOFT\TESTWINDOW\Extensions\CppUnitFramework\Microsoft.VisualStudio.TestTools.CppUnitTestFramework.Resources.dll
14.0.25420.1
Microsoft.VisualStudio.TestTools.CppUnitTestFramework.Executor.x64.dll
C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 14.0\Common7\IDE\COMMONEXTENSIONS\MICROSOFT\TESTWINDOW\Extensions\CppUnitFramework\Microsoft.VisualStudio.TestTools.CppUnitTestFramework.Executor.x64.dll
14.0.25420.1
dbghelp.dll C:\Windows\System32\dbghelp.dll
6.1.7601.17514
Microsoft.VisualStudio.TestTools.CppUnitTestFramework.Executor.Resources.dll
C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 14.0\Common7\IDE\COMMONEXTENSIONS\MICROSOFT\TESTWINDOW\Extensions\CppUnitFramework\Microsoft.VisualStudio.TestTools.CppUnitTestFramework.Executor.Resources.dll
14.0.25420.1
Viewer2.exe C:\Projects\Surveillance\trunk\prototype\viewer2\Debug\x64\Viewer2.exe
4.0.0.31
netapi32.dll C:\Windows\System32\netapi32.dll
6.1.7601.17887
netutils.dll C:\Windows\System32\netutils.dll
6.1.7601.17514
srvcli.dll C:\Windows\System32\srvcli.dll
6.1.7601.17514
wkscli.dll C:\Windows\System32\wkscli.dll
6.1.7601.17514
logoncli.dll C:\Windows\System32\logoncli.dll
6.1.7601.17514
ntdsapi.dll C:\Windows\System32\ntdsapi.dll
6.1.7600.16385
mswsock.dll C:\Windows\System32\mswsock.dll
6.1.7601.18254
WSHTCPIP.DLL C:\Windows\System32\WSHTCPIP.DLL
6.1.7600.16385
wship6.dll C:\Windows\System32\wship6.dll
6.1.7600.16385
dnsapi.dll C:\Windows\System32\dnsapi.dll
6.1.7601.17570
mdnsNSP.dll C:\Program Files\Bonjour\mdnsNSP.dll
3.1.0.1
IPHLPAPI.DLL C:\Windows\System32\IPHLPAPI.DLL
6.1.7601.17514
winnsi.dll C:\Windows\System32\winnsi.dll
6.1.7600.16385
rasadhlp.dll C:\Windows\System32\rasadhlp.dll
6.1.7600.16385
FWPUCLNT.DLL C:\Windows\System32\FWPUCLNT.DLL
6.1.7600.16385
kerberos.dll C:\Windows\System32\kerberos.dll
6.1.7601.17926
bcrypt.dll C:\Windows\System32\bcrypt.dll
6.1.7600.16385
bcryptprimitives.dll C:\Windows\System32\bcryptprimitives.dll
6.1.7601.17514
--- ---生成问题的测试代码----------
------TEST CODE WHICH GENERATES ISSUE----------
#include" stdafx.h"
#include" CppUnitTest.h"
使用命名空间Microsoft :: VisualStudio :: CppUnitTestFramework;
namespace mycompany
{
TEST_CLASS(CUnitTests)
{
public:
TEST_METHOD(unittest)
{
// CAccountInstrumentDailyStat stat;
// stat.StartOfDayPosition = 0;
// stat.TradingStats.BuySide.TotalShares = 0;
// stat.TradingStats.BuySide.TotalValue = 0;
// stat.TradingStats.SellSide.TotalShares = 0;
// stat.CalculatePnl(PriceType(100.0),PriceType(110.0),PNLType(1.0));
断言:: AreEqual(1,1);
}
};
}
#include "stdafx.h"
#include "CppUnitTest.h"
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
namespace mycompany
{
TEST_CLASS(CUnitTests)
{
public:
TEST_METHOD(unittest)
{
//CAccountInstrumentDailyStat stat;
//stat.StartOfDayPosition = 0;
//stat.TradingStats.BuySide.TotalShares = 0;
//stat.TradingStats.BuySide.TotalValue = 0;
//stat.TradingStats.SellSide.TotalShares = 0;
//stat.TradingStats.SellSide.TotalValue = 0;
//stat.CalculatePnl(PriceType(100.0), PriceType(110.0), PNLType(1.0));
Assert::AreEqual(1, 1);
}
};
}
推荐答案
嗨朋友,
感谢您的发帖。
Thanks about your posting.
>> 我有一个原生的c ++ 64位Windows应用程序,我正在尝试添加单元测试。
Please helped to point out which template project you've built below, then I could repro it in my end:
Please helped to point out which template project you've built below, then I could repro it in my end:
I just tested your test code sample, it run fine in x86 mode, but fail in x64.
I just tested your test code sample, it run fine in x86 mode, but fail in x64.
Another thing, you mentioned you could compile the app, but could it run in debug mode well first before?
Another thing, you mentioned you could compile the app, but could it run in debug mode well first before?
Best regards,
Best regards,
Fletch
这篇关于VS 2015 Native C ++单元测试不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!