diff options
author | Pavel Labath <labath@google.com> | 2017-02-17 10:19:46 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2017-02-17 10:19:46 +0000 |
commit | a272fa8fff0674a2435603d5e8e7c095d6095483 (patch) | |
tree | 850dd350767fac0ccc0bf6b7337b8ba288d583ad /lldb/unittests/Utility/ErrorTest.cpp | |
parent | e2fa53030e1457060e5b88d4168be9c5b121054c (diff) | |
download | bcm5719-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.cpp | 19 |
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()); +} |