summaryrefslogtreecommitdiffstats
path: root/lldb/unittests/Core/ErrorTest.cpp
blob: a114b26ebe548c4a88f17c246c00714809eef304 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//===-- ErrorTest.cpp -------------------------------------------*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

#include "lldb/Utility/Error.h"
#include "gtest/gtest.h"

using namespace lldb_private;

TEST(ErrorTest, Formatv) {
  EXPECT_EQ("", llvm::formatv("{0}", Error()).str());
  EXPECT_EQ("Hello Error", llvm::formatv("{0}", Error("Hello Error")).str());
  EXPECT_EQ("Hello", llvm::formatv("{0:5}", Error("Hello Error")).str());
}
OpenPOWER on IntegriCloud