"llvm/unittests/IR/InstructionsTest.cpp" did not exist on "35a9b8baeb434c93a6e9c47bac68310fa6ebf1c5"
Newer
Older
//===- LeakDetectorTest.cpp -----------------------------------------------===//
Rafael Espindola
committed
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#include "llvm/IR/LeakDetector.h"
Rafael Espindola
committed
#include "gtest/gtest.h"
using namespace llvm;
namespace {
#ifdef GTEST_HAS_DEATH_TEST
Rafael Espindola
committed
TEST(LeakDetector, Death1) {
LeakDetector::addGarbageObject((void*) 1);
LeakDetector::addGarbageObject((void*) 2);
EXPECT_DEATH(LeakDetector::addGarbageObject((void*) 1),
".*Ts.count\\(o\\) == 0 && \"Object already in set!\"");
EXPECT_DEATH(LeakDetector::addGarbageObject((void*) 2),
"Cache != o && \"Object already in set!\"");
}
#endif