Lines Matching refs:Styles

8797 #define EXPECT_ALL_STYLES_EQUAL(Styles)                                        \  argument
8798 for (size_t i = 1; i < Styles.size(); ++i) \
8799 EXPECT_EQ(Styles[0], Styles[i]) << "Style #" << i << " of " \
8800 << Styles.size() \
8804 SmallVector<FormatStyle, 3> Styles; in TEST_F() local
8805 Styles.resize(3); in TEST_F()
8807 Styles[0] = getLLVMStyle(); in TEST_F()
8808 EXPECT_TRUE(getPredefinedStyle("LLVM", FormatStyle::LK_Cpp, &Styles[1])); in TEST_F()
8809 EXPECT_TRUE(getPredefinedStyle("lLvM", FormatStyle::LK_Cpp, &Styles[2])); in TEST_F()
8810 EXPECT_ALL_STYLES_EQUAL(Styles); in TEST_F()
8812 Styles[0] = getGoogleStyle(); in TEST_F()
8813 EXPECT_TRUE(getPredefinedStyle("Google", FormatStyle::LK_Cpp, &Styles[1])); in TEST_F()
8814 EXPECT_TRUE(getPredefinedStyle("gOOgle", FormatStyle::LK_Cpp, &Styles[2])); in TEST_F()
8815 EXPECT_ALL_STYLES_EQUAL(Styles); in TEST_F()
8817 Styles[0] = getGoogleStyle(FormatStyle::LK_JavaScript); in TEST_F()
8819 getPredefinedStyle("Google", FormatStyle::LK_JavaScript, &Styles[1])); in TEST_F()
8821 getPredefinedStyle("gOOgle", FormatStyle::LK_JavaScript, &Styles[2])); in TEST_F()
8822 EXPECT_ALL_STYLES_EQUAL(Styles); in TEST_F()
8824 Styles[0] = getChromiumStyle(FormatStyle::LK_Cpp); in TEST_F()
8825 EXPECT_TRUE(getPredefinedStyle("Chromium", FormatStyle::LK_Cpp, &Styles[1])); in TEST_F()
8826 EXPECT_TRUE(getPredefinedStyle("cHRoMiUM", FormatStyle::LK_Cpp, &Styles[2])); in TEST_F()
8827 EXPECT_ALL_STYLES_EQUAL(Styles); in TEST_F()
8829 Styles[0] = getMozillaStyle(); in TEST_F()
8830 EXPECT_TRUE(getPredefinedStyle("Mozilla", FormatStyle::LK_Cpp, &Styles[1])); in TEST_F()
8831 EXPECT_TRUE(getPredefinedStyle("moZILla", FormatStyle::LK_Cpp, &Styles[2])); in TEST_F()
8832 EXPECT_ALL_STYLES_EQUAL(Styles); in TEST_F()
8834 Styles[0] = getWebKitStyle(); in TEST_F()
8835 EXPECT_TRUE(getPredefinedStyle("WebKit", FormatStyle::LK_Cpp, &Styles[1])); in TEST_F()
8836 EXPECT_TRUE(getPredefinedStyle("wEbKit", FormatStyle::LK_Cpp, &Styles[2])); in TEST_F()
8837 EXPECT_ALL_STYLES_EQUAL(Styles); in TEST_F()
8839 Styles[0] = getGNUStyle(); in TEST_F()
8840 EXPECT_TRUE(getPredefinedStyle("GNU", FormatStyle::LK_Cpp, &Styles[1])); in TEST_F()
8841 EXPECT_TRUE(getPredefinedStyle("gnU", FormatStyle::LK_Cpp, &Styles[2])); in TEST_F()
8842 EXPECT_ALL_STYLES_EQUAL(Styles); in TEST_F()
8844 EXPECT_FALSE(getPredefinedStyle("qwerty", FormatStyle::LK_Cpp, &Styles[0])); in TEST_F()
8848 SmallVector<FormatStyle, 8> Styles; in TEST_F() local
8849 Styles.resize(2); in TEST_F()
8851 Styles[0] = getGoogleStyle(); in TEST_F()
8852 Styles[1] = getLLVMStyle(); in TEST_F()
8853 EXPECT_EQ(0, parseConfiguration("BasedOnStyle: Google", &Styles[1]).value()); in TEST_F()
8854 EXPECT_ALL_STYLES_EQUAL(Styles); in TEST_F()
8856 Styles.resize(5); in TEST_F()
8857 Styles[0] = getGoogleStyle(FormatStyle::LK_JavaScript); in TEST_F()
8858 Styles[1] = getLLVMStyle(); in TEST_F()
8859 Styles[1].Language = FormatStyle::LK_JavaScript; in TEST_F()
8860 EXPECT_EQ(0, parseConfiguration("BasedOnStyle: Google", &Styles[1]).value()); in TEST_F()
8862 Styles[2] = getLLVMStyle(); in TEST_F()
8863 Styles[2].Language = FormatStyle::LK_JavaScript; in TEST_F()
8866 &Styles[2]).value()); in TEST_F()
8868 Styles[3] = getLLVMStyle(); in TEST_F()
8869 Styles[3].Language = FormatStyle::LK_JavaScript; in TEST_F()
8872 &Styles[3]).value()); in TEST_F()
8874 Styles[4] = getLLVMStyle(); in TEST_F()
8875 Styles[4].Language = FormatStyle::LK_JavaScript; in TEST_F()
8882 &Styles[4]).value()); in TEST_F()
8883 EXPECT_ALL_STYLES_EQUAL(Styles); in TEST_F()