1*0a6a1f1dSLionel Sambuc //===- llvm/unittest/Support/StringPoiil.cpp - StringPool tests -----------===// 2*0a6a1f1dSLionel Sambuc // 3*0a6a1f1dSLionel Sambuc // The LLVM Compiler Infrastructure 4*0a6a1f1dSLionel Sambuc // 5*0a6a1f1dSLionel Sambuc // This file is distributed under the University of Illinois Open Source 6*0a6a1f1dSLionel Sambuc // License. See LICENSE.TXT for details. 7*0a6a1f1dSLionel Sambuc // 8*0a6a1f1dSLionel Sambuc //===----------------------------------------------------------------------===// 9*0a6a1f1dSLionel Sambuc 10*0a6a1f1dSLionel Sambuc #include "llvm/Support/StringPool.h" 11*0a6a1f1dSLionel Sambuc #include "gtest/gtest.h" 12*0a6a1f1dSLionel Sambuc 13*0a6a1f1dSLionel Sambuc using namespace llvm; 14*0a6a1f1dSLionel Sambuc 15*0a6a1f1dSLionel Sambuc namespace { 16*0a6a1f1dSLionel Sambuc TEST(PooledStringPtrTest,OperatorEquals)17*0a6a1f1dSLionel SambucTEST(PooledStringPtrTest, OperatorEquals) { 18*0a6a1f1dSLionel Sambuc StringPool pool; 19*0a6a1f1dSLionel Sambuc const PooledStringPtr a = pool.intern("a"); 20*0a6a1f1dSLionel Sambuc const PooledStringPtr b = pool.intern("b"); 21*0a6a1f1dSLionel Sambuc EXPECT_FALSE(a == b); 22*0a6a1f1dSLionel Sambuc } 23*0a6a1f1dSLionel Sambuc TEST(PooledStringPtrTest,OperatorNotEquals)24*0a6a1f1dSLionel SambucTEST(PooledStringPtrTest, OperatorNotEquals) { 25*0a6a1f1dSLionel Sambuc StringPool pool; 26*0a6a1f1dSLionel Sambuc const PooledStringPtr a = pool.intern("a"); 27*0a6a1f1dSLionel Sambuc const PooledStringPtr b = pool.intern("b"); 28*0a6a1f1dSLionel Sambuc EXPECT_TRUE(a != b); 29*0a6a1f1dSLionel Sambuc } 30*0a6a1f1dSLionel Sambuc 31*0a6a1f1dSLionel Sambuc } 32