1 //===-- TestOptions.cpp ---------------------------------------------------===//
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
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
) {
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"));
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"));