1 //===- llvm/unittest/Support/ThreadLocalTest.cpp - Therad Local tests ---===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #include "llvm/Support/ThreadLocal.h"
11 #include "gtest/gtest.h"
18 class ThreadLocalTest : public ::testing::Test {
25 TEST_F(ThreadLocalTest, Basics) {
26 ThreadLocal<const S> x;
28 EXPECT_EQ(nullptr, x.get());
32 EXPECT_EQ(&s, x.get());
35 EXPECT_EQ(nullptr, x.get());