~ubuntu-branches/ubuntu/maverick/clamav/maverick-backports

« back to all changes in this revision

Viewing changes to libclamav/c++/llvm/unittests/Support/LeakDetectorTest.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Stephen Gran, Stephen Gran, Michael Tautschnig
  • Date: 2010-04-26 21:41:18 UTC
  • mfrom: (2.1.6 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100426214118-i6lo606wnh7ywfj6
Tags: 0.96+dfsg-4
[ Stephen Gran ]
* Fixed typo in clamav-milter's postinst

[ Michael Tautschnig ]
* Fixed typo in clamav-freshclam's postinst (closes: #579271)
* Debconf translation updates
  - Portuguese (closes: #579068)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//===- llvm/unittest/LeakDetector/LeakDetector.cpp - LeakDetector tests ---===//
 
2
//
 
3
//                     The LLVM Compiler Infrastructure
 
4
//
 
5
// This file is distributed under the University of Illinois Open Source
 
6
// License. See LICENSE.TXT for details.
 
7
//
 
8
//===----------------------------------------------------------------------===//
 
9
 
 
10
#include "gtest/gtest.h"
 
11
#include "llvm/Support/LeakDetector.h"
 
12
 
 
13
using namespace llvm;
 
14
 
 
15
namespace {
 
16
 
 
17
#ifdef GTEST_HAS_DEATH_TEST
 
18
#ifndef NDEBUG
 
19
TEST(LeakDetector, Death1) {
 
20
  LeakDetector::addGarbageObject((void*) 1);
 
21
  LeakDetector::addGarbageObject((void*) 2);
 
22
 
 
23
  EXPECT_DEATH(LeakDetector::addGarbageObject((void*) 1),
 
24
               ".*Ts.count\\(o\\) == 0 && \"Object already in set!\"");
 
25
  EXPECT_DEATH(LeakDetector::addGarbageObject((void*) 2),
 
26
               "Cache != o && \"Object already in set!\"");
 
27
}
 
28
#endif
 
29
#endif
 
30
 
 
31
}