summaryrefslogtreecommitdiffstats
path: root/lldb/unittests/Utility/ErrorTest.cpp
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2017-02-17 10:19:46 +0000
committerPavel Labath <labath@google.com>2017-02-17 10:19:46 +0000
commita272fa8fff0674a2435603d5e8e7c095d6095483 (patch)
tree850dd350767fac0ccc0bf6b7337b8ba288d583ad /lldb/unittests/Utility/ErrorTest.cpp
parente2fa53030e1457060e5b88d4168be9c5b121054c (diff)
downloadbcm5719-llvm-a272fa8fff0674a2435603d5e8e7c095d6095483.tar.gz
bcm5719-llvm-a272fa8fff0674a2435603d5e8e7c095d6095483.zip
Fix breakage caused by r295368
Also move the ErrorTest into the Utility package, to follow the class it is testing. llvm-svn: 295436
Diffstat (limited to 'lldb/unittests/Utility/ErrorTest.cpp')
-rw-r--r--lldb/unittests/Utility/ErrorTest.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/lldb/unittests/Utility/ErrorTest.cpp b/lldb/unittests/Utility/ErrorTest.cpp
new file mode 100644
index 00000000000..a114b26ebe5
--- /dev/null
+++ b/lldb/unittests/Utility/ErrorTest.cpp
@@ -0,0 +1,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