[AArch64] Fix SDNode type mismatches between *.td files and ISel (#116523)
[llvm-project.git] / lldb / unittests / Interpreter / TestOptions.cpp
blob93474e3c5713c3e841a63d0e084f56dbc42d7d93
1 //===-- TestOptions.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/Interpreter/Options.h"
10 #include "gtest/gtest.h"
12 #include "llvm/Testing/Support/Error.h"
14 using namespace lldb_private;
16 TEST(OptionsTest, CreateOptionParsingError) {
17 ASSERT_THAT_ERROR(
18 CreateOptionParsingError("yippee", 'f', "fun",
19 "unable to convert 'yippee' to boolean"),
20 llvm::FailedWithMessage("Invalid value ('yippee') for -f (fun): unable "
21 "to convert 'yippee' to boolean"));
23 ASSERT_THAT_ERROR(
24 CreateOptionParsingError("52", 'b', "bean-count"),
25 llvm::FailedWithMessage("Invalid value ('52') for -b (bean-count)"));
27 ASSERT_THAT_ERROR(CreateOptionParsingError("c", 'm'),
28 llvm::FailedWithMessage("Invalid value ('c') for -m"));