mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-10-30 16:17:05 +00:00 
			
		
		
		
	git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70572 91177308-0d34-0410-b5e6-96231b3b80d8
		
			
				
	
	
		
			31 lines
		
	
	
		
			752 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			31 lines
		
	
	
		
			752 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| //===- llvm/unittest/ADT/DenseSetTest.cpp - DenseSet unit tests --*- C++ -*-===//
 | |
| //
 | |
| //                     The LLVM Compiler Infrastructure
 | |
| //
 | |
| // This file is distributed under the University of Illinois Open Source
 | |
| // License. See LICENSE.TXT for details.
 | |
| //
 | |
| //===----------------------------------------------------------------------===//
 | |
| 
 | |
| #include "gtest/gtest.h"
 | |
| #include <llvm/ADT/DenseSet.h>
 | |
| 
 | |
| using namespace llvm;
 | |
| 
 | |
| namespace {
 | |
| 
 | |
| // Test fixture
 | |
| class DenseSetTest : public testing::Test {
 | |
| };
 | |
| 
 | |
| // Test hashing with a set of only two entries.
 | |
| TEST_F(DenseSetTest, DoubleEntrySetTest) {
 | |
|   llvm::DenseSet<unsigned> set(2);
 | |
|   set.insert(0);
 | |
|   set.insert(1);
 | |
|   // Original failure was an infinite loop in this call:
 | |
|   EXPECT_EQ(0, set.count(2));
 | |
| }
 | |
| 
 | |
| }
 |