1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 10:42:39 +01:00
llvm-mirror/unittests/Object/ObjectFileTest.cpp
Pavel Labath 53a4d76970 Add operator<< for object::SectionedAddress
The main motivation for this is better failure messages in unit tests.

Split off from D70394.
2019-11-19 10:34:30 +01:00

21 lines
751 B
C++

//===- ObjectFileTest.cpp - Tests for ObjectFile.cpp ----------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#include "llvm/Object/ObjectFile.h"
#include "llvm/Support/ScopedPrinter.h"
#include "gtest/gtest.h"
using namespace llvm;
using namespace llvm::object;
TEST(SectionedAddress, StreamingOperator) {
EXPECT_EQ("SectionedAddress{0x00000047}", to_string(SectionedAddress{0x47}));
EXPECT_EQ("SectionedAddress{0x00000047, 42}",
to_string(SectionedAddress{0x47, 42}));
}