1 //===- llvm/unittest/MC/MCAtomTest.cpp - Instructions unit 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/MC/MCAnalysis/MCAtom.h"
11 #include "llvm/MC/MCAnalysis/MCModule.h"
12 #include "gtest/gtest.h"
17 TEST(MCAtomTest, MCDataSize) {
19 MCDataAtom *Atom = M.createDataAtom(0, 0);
20 EXPECT_EQ(uint64_t(0), Atom->getEndAddr());
22 EXPECT_EQ(uint64_t(0), Atom->getEndAddr());
24 EXPECT_EQ(uint64_t(1), Atom->getEndAddr());
26 EXPECT_EQ(uint64_t(2), Atom->getEndAddr());
27 EXPECT_EQ(size_t(3), Atom->getData().size());
30 } // end anonymous namespace
31 } // end namespace llvm