[PowerPC] Collect some CallLowering arguments into a struct. [NFC]
[llvm-project.git] / lldb / unittests / DataFormatter / FormatManagerTests.cpp
blobacfafdbd293cd708384aae0ecc25ccd3debda2f2
1 //===-- FormatManagerTests.cpp ----------------------------------*- C++ -*-===//
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/DataFormatters/FormatManager.h"
11 #include "gtest/gtest.h"
13 using namespace lldb;
14 using namespace lldb_private;
16 TEST(FormatManagerTests, CompatibleLangs) {
17 std::vector<LanguageType> candidates = {eLanguageTypeC_plus_plus,
18 eLanguageTypeObjC};
19 EXPECT_EQ(FormatManager::GetCandidateLanguages(eLanguageTypeC), candidates);
20 EXPECT_EQ(FormatManager::GetCandidateLanguages(eLanguageTypeC89), candidates);
21 EXPECT_EQ(FormatManager::GetCandidateLanguages(eLanguageTypeC99), candidates);
22 EXPECT_EQ(FormatManager::GetCandidateLanguages(eLanguageTypeC11), candidates);
24 EXPECT_EQ(FormatManager::GetCandidateLanguages(eLanguageTypeC_plus_plus),
25 candidates);
26 EXPECT_EQ(FormatManager::GetCandidateLanguages(eLanguageTypeC_plus_plus_03),
27 candidates);
28 EXPECT_EQ(FormatManager::GetCandidateLanguages(eLanguageTypeC_plus_plus_11),
29 candidates);
30 EXPECT_EQ(FormatManager::GetCandidateLanguages(eLanguageTypeC_plus_plus_14),
31 candidates);
33 candidates = {eLanguageTypeObjC};
34 EXPECT_EQ(FormatManager::GetCandidateLanguages(eLanguageTypeObjC),
35 candidates);