0

C++ コードの単体テストに Visual Studio 2012 の CppUnitTestFramework を使用しています。ここで、Visual Leak Detector を使用してメモリ リークをチェックしたいと考えています。だから私は入れた

#include "vld.h"

私のテストクラスファイルに。のようなものを追加します

new MyClass();

メモリリークを「シミュレート」するテストメソッドに。

すべてが正常にコンパイルおよびリンクされます。これは、VLD ディレクトリが指定されていることを意味します。しかし、テストはクラッシュします:

------ Run test started ------
The active Test Run was aborted because the execution process exited unexpectedly. To investigate further, enable local crash dumps either at the machine level or for process vstest.executionengine.x86.exe. Go to more details: http://go.microsoft.com/fwlink/?linkid=232477
========== Run test finished: 0 run (0:00:02,3841194) ==========

include ディレクティブを削除すると、テストは正常にパスします。Visual Studio テスト フレームワークと共に VLD を有効にする方法はありますか?

4

1 に答える 1