Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lldb / unittests / Utility / StateTest.cpp
blobd91a23123b0fedb01a6e8666098f27a201573336
1 //===-- StateTest.cpp -----------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #include "lldb/Utility/State.h"
10 #include "llvm/Support/FormatVariadic.h"
11 #include "gtest/gtest.h"
13 using namespace lldb;
14 using namespace lldb_private;
16 TEST(StateTest, Formatv) {
17 EXPECT_EQ("invalid", llvm::formatv("{0}", eStateInvalid).str());
18 EXPECT_EQ("unloaded", llvm::formatv("{0}", eStateUnloaded).str());
19 EXPECT_EQ("connected", llvm::formatv("{0}", eStateConnected).str());
20 EXPECT_EQ("attaching", llvm::formatv("{0}", eStateAttaching).str());
21 EXPECT_EQ("launching", llvm::formatv("{0}", eStateLaunching).str());
22 EXPECT_EQ("stopped", llvm::formatv("{0}", eStateStopped).str());
23 EXPECT_EQ("running", llvm::formatv("{0}", eStateRunning).str());
24 EXPECT_EQ("stepping", llvm::formatv("{0}", eStateStepping).str());
25 EXPECT_EQ("crashed", llvm::formatv("{0}", eStateCrashed).str());
26 EXPECT_EQ("detached", llvm::formatv("{0}", eStateDetached).str());
27 EXPECT_EQ("exited", llvm::formatv("{0}", eStateExited).str());
28 EXPECT_EQ("suspended", llvm::formatv("{0}", eStateSuspended).str());