1 //===-- ErrorTest.cpp -------------------------------------------*- C++ -*-===//
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 "gtest/gtest.h"
11 #include "lldb/Core/Error.h"
13 using namespace lldb_private;
15 TEST(ErrorTest, Formatv) {
16 EXPECT_EQ("", llvm::formatv("{0}", Error()).str());
17 EXPECT_EQ("Hello Error", llvm::formatv("{0}", Error("Hello Error")).str());
18 EXPECT_EQ("Hello", llvm::formatv("{0:5}", Error("Hello Error")).str());