]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - unittests/Core/ErrorTest.cpp
Vendor import of lldb release_40 branch r292009:
[FreeBSD/FreeBSD.git] / unittests / Core / ErrorTest.cpp
1 //===-- ErrorTest.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 "gtest/gtest.h"
11 #include "lldb/Core/Error.h"
12
13 using namespace lldb_private;
14
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());
19 }