1 //===---------- llvm/unittest/Support/Casting.cpp - Casting 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/raw_ostream.h"
11 #include "llvm/Support/Debug.h"
12 #define DEBUG_CAST_OPERATORS
13 #include "llvm/Support/Casting.h"
15 #include "gtest/gtest.h"
25 TEST(CastingTest, isa) {
26 // test various configurations of const
28 const bar *const B4 = B2;
29 EXPECT_TRUE(isa<foo>(B1));
30 EXPECT_TRUE(isa<foo>(B2));
31 EXPECT_TRUE(isa<foo>(B3));
32 EXPECT_TRUE(isa<foo>(B4));
38 } // anonymous namespace