blob: d7e89f802bebbf12c33494a5eaee18995371b448 [file] [log] [blame]
Gabor Greifee57dae2010-07-20 16:32:20 +00001//===---------- llvm/unittest/Support/Casting.cpp - Casting tests --------===//
2//
3// The LLVM Compiler Infrastructure
4//
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/raw_ostream.h"
11#include "llvm/Support/Debug.h"
12#define DEBUG_CAST_OPERATORS
13#include "llvm/Support/Casting.h"
14
15#include "gtest/gtest.h"
16#include <cstdlib>
17
18using namespace llvm;
19
20namespace {
21
22extern bar &B1;
23extern const bar *B2;
24
25TEST(CastingTest, Basics) {
26 EXPECT_TRUE(isa<foo>(B1));
27}
28
29bar B;
30bar &B1 = B;
31const bar *B2 = &B;
32} // anonymous namespace