1 //===- llvm/unittest/ADT/DenseSetTest.cpp - DenseSet unit tests --*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #include "gtest/gtest.h"
11 #include <llvm/ADT/DenseSet.h>
18 class DenseSetTest
: public testing::Test
{
21 // Test hashing with a set of only two entries.
22 TEST_F(DenseSetTest
, DoubleEntrySetTest
) {
23 llvm::DenseSet
<unsigned> set(2);
26 // Original failure was an infinite loop in this call:
27 EXPECT_EQ(0, set
.count(2));