blob: ac39fec059e50429956f4a9390b50200bb8b2b90 [file] [log] [blame]
David Majnemer393d8012014-12-15 01:04:49 +00001//===- llvm/unittest/Support/StringPoiil.cpp - StringPool tests -----------===//
Nikola Smiljanic89e561a2014-06-19 00:26:49 +00002//
David Majnemer393d8012014-12-15 01:04:49 +00003// The LLVM Compiler Infrastructure
Nikola Smiljanic89e561a2014-06-19 00:26:49 +00004//
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
13using namespace llvm;
14
15namespace {
16
17TEST(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
24TEST(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}