• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===- llvm/unittest/Support/StringPoiil.cpp - StringPool 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 "llvm/Support/StringPool.h"
11 #include "gtest/gtest.h"
12 
13 using namespace llvm;
14 
15 namespace {
16 
TEST(PooledStringPtrTest,OperatorEquals)17 TEST(PooledStringPtrTest, OperatorEquals) {
18   StringPool pool;
19   const PooledStringPtr a = pool.intern("a");
20   const PooledStringPtr b = pool.intern("b");
21   EXPECT_FALSE(a == b);
22 }
23 
TEST(PooledStringPtrTest,OperatorNotEquals)24 TEST(PooledStringPtrTest, OperatorNotEquals) {
25   StringPool pool;
26   const PooledStringPtr a = pool.intern("a");
27   const PooledStringPtr b = pool.intern("b");
28   EXPECT_TRUE(a != b);
29 }
30 
31 }
32