blob: 9b141601b204b698117d7f63e25afad0db05a488 [file] [log] [blame]
Duncan P. N. Exon Smithb036f1c2015-02-03 21:08:33 +00001//===- unittest/Support/DwarfTest.cpp - Dwarf support 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/Dwarf.h"
11#include "gtest/gtest.h"
12
13using namespace llvm;
14using namespace llvm::dwarf;
15
16namespace {
17
18TEST(DwarfTest, TagStringOnInvalid) {
19 // This is invalid, so it shouldn't be stringified.
20 EXPECT_EQ(nullptr, TagString(DW_TAG_invalid));
21
22 // These aren't really tags: they describe ranges within tags. They
23 // shouldn't be stringified either.
24 EXPECT_EQ(nullptr, TagString(DW_TAG_lo_user));
25 EXPECT_EQ(nullptr, TagString(DW_TAG_hi_user));
26 EXPECT_EQ(nullptr, TagString(DW_TAG_user_base));
27}
28
29} // end namespace