1 //===-- RegisterValueTest.cpp -----------------------------------*- C++ -*-===// 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 "lldb/Utility/RegisterValue.h" 11 #include "gtest/gtest.h" 12 13 using namespace lldb_private; 14 15 TEST(RegisterValueTest, GetSet8) { 16 RegisterValue R8(uint8_t(47)); 17 EXPECT_EQ(47u, R8.GetAsUInt8()); 18 R8 = uint8_t(42); 19 EXPECT_EQ(42u, R8.GetAsUInt8()); 20 EXPECT_EQ(42u, R8.GetAsUInt16()); 21 EXPECT_EQ(42u, R8.GetAsUInt32()); 22 EXPECT_EQ(42u, R8.GetAsUInt64()); 23 } 24