[llvm] [cmake] Add possibility to use ChooseMSVCCRT.cmake when include LLVM library
[llvm-core.git] / unittests / Support / StringPool.cpp
blob0a540e95acfd5a60f102cd657999c5cb7b3629c6
1 //===- llvm/unittest/Support/StringPoiil.cpp - StringPool tests -----------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #include "llvm/Support/StringPool.h"
10 #include "gtest/gtest.h"
12 using namespace llvm;
14 namespace {
16 TEST(PooledStringPtrTest, OperatorEquals) {
17 StringPool pool;
18 const PooledStringPtr a = pool.intern("a");
19 const PooledStringPtr b = pool.intern("b");
20 EXPECT_FALSE(a == b);
23 TEST(PooledStringPtrTest, OperatorNotEquals) {
24 StringPool pool;
25 const PooledStringPtr a = pool.intern("a");
26 const PooledStringPtr b = pool.intern("b");
27 EXPECT_TRUE(a != b);