1 //===-- FormatManagerTests.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/DataFormatters/FormatManager.h"
11 #include "gtest/gtest.h"
14 using namespace lldb_private
;
16 TEST(FormatManagerTests
, CompatibleLangs
) {
17 std::vector
<LanguageType
> candidates
= {eLanguageTypeC_plus_plus
,
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
),
26 EXPECT_EQ(FormatManager::GetCandidateLanguages(eLanguageTypeC_plus_plus_03
),
28 EXPECT_EQ(FormatManager::GetCandidateLanguages(eLanguageTypeC_plus_plus_11
),
30 EXPECT_EQ(FormatManager::GetCandidateLanguages(eLanguageTypeC_plus_plus_14
),
33 candidates
= {eLanguageTypeObjC
};
34 EXPECT_EQ(FormatManager::GetCandidateLanguages(eLanguageTypeObjC
),