diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-05-31 13:20:41 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-01 09:14:25 +0200 |
commit | 23b08449736ba825a9c582ba18b7a5fdba178e47 (patch) | |
tree | 8513c824f1964f84f957a41658f6d173a008c469 /svl/qa | |
parent | 8e63d451b2aeb646ece98c4e219f92957f4482bd (diff) |
loplugin: look for CPPUNIT_ASSERT_EQUALS with params swapped
idea originally from either tml or moggi, can't remember which
Change-Id: Id78d75035036d3aa1666e33469c6eeb38f9e624d
Reviewed-on: https://gerrit.libreoffice.org/55126
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svl/qa')
-rw-r--r-- | svl/qa/unit/svl.cxx | 106 |
1 files changed, 53 insertions, 53 deletions
diff --git a/svl/qa/unit/svl.cxx b/svl/qa/unit/svl.cxx index 679340afd67a..ff344ff65834 100644 --- a/svl/qa/unit/svl.cxx +++ b/svl/qa/unit/svl.cxx @@ -1521,58 +1521,58 @@ void Test::testNfEnglishKeywordsIntegrity() CPPUNIT_ASSERT_EQUAL( sKeywords[i], rEnglishKeywords[i] ); } // Check the order of sEnglishKeyword - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_E], OUString("E") ); - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_AMPM], OUString("AM/PM") ); - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_AP], OUString("A/P") ); - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_MI], OUString("M") ); - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_MMI], OUString("MM") ); - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_M], OUString("M") ); - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_MM], OUString("MM") ); - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_MMM], OUString("MMM") ); - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_MMMM], OUString("MMMM") ); - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_H], OUString("H") ); - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_HH], OUString("HH") ); - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_S], OUString("S") ); - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_SS], OUString("SS") ); - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_Q], OUString("Q") ); - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_QQ], OUString("QQ") ); - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_D], OUString("D") ); - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_DD], OUString("DD") ); - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_DDD], OUString("DDD") ); - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_DDDD], OUString("DDDD") ); - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_YY], OUString("YY") ); - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_YYYY], OUString("YYYY") ); - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_NN], OUString("NN") ); - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_NNNN], OUString("NNNN") ); - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_CCC], OUString("CCC") ); - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_GENERAL], OUString("GENERAL") ); - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_NNN], OUString("NNN") ); - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_WW], OUString("WW") ); - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_MMMMM], OUString("MMMMM") ); - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_TRUE], OUString("TRUE") ); - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_FALSE], OUString("FALSE") ); - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_BOOLEAN], OUString("BOOLEAN") ); - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_COLOR], OUString("COLOR") ); - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_BLACK], OUString("BLACK") ); - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_BLUE], OUString("BLUE") ); - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_GREEN], OUString("GREEN") ); - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_CYAN], OUString("CYAN") ); - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_RED], OUString("RED") ); - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_MAGENTA], OUString("MAGENTA") ); - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_BROWN], OUString("BROWN") ); - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_GREY], OUString("GREY") ); - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_YELLOW], OUString("YELLOW") ); - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_WHITE], OUString("WHITE") ); - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_AAA], OUString("AAA") ); - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_AAAA], OUString("AAAA") ); - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_EC], OUString("E") ); - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_EEC], OUString("EE") ); - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_G], OUString("G") ); - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_GG], OUString("GG") ); - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_GGG], OUString("GGG") ); - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_R], OUString("R") ); - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_RR], OUString("RR") ); - CPPUNIT_ASSERT_EQUAL( rEnglishKeywords[NF_KEY_THAI_T], OUString("t") ); + CPPUNIT_ASSERT_EQUAL( OUString("E"), rEnglishKeywords[NF_KEY_E] ); + CPPUNIT_ASSERT_EQUAL( OUString("AM/PM"), rEnglishKeywords[NF_KEY_AMPM] ); + CPPUNIT_ASSERT_EQUAL( OUString("A/P"), rEnglishKeywords[NF_KEY_AP] ); + CPPUNIT_ASSERT_EQUAL( OUString("M"), rEnglishKeywords[NF_KEY_MI] ); + CPPUNIT_ASSERT_EQUAL( OUString("MM"), rEnglishKeywords[NF_KEY_MMI] ); + CPPUNIT_ASSERT_EQUAL( OUString("M"), rEnglishKeywords[NF_KEY_M] ); + CPPUNIT_ASSERT_EQUAL( OUString("MM"), rEnglishKeywords[NF_KEY_MM] ); + CPPUNIT_ASSERT_EQUAL( OUString("MMM"), rEnglishKeywords[NF_KEY_MMM] ); + CPPUNIT_ASSERT_EQUAL( OUString("MMMM"), rEnglishKeywords[NF_KEY_MMMM] ); + CPPUNIT_ASSERT_EQUAL( OUString("H"), rEnglishKeywords[NF_KEY_H] ); + CPPUNIT_ASSERT_EQUAL( OUString("HH"), rEnglishKeywords[NF_KEY_HH] ); + CPPUNIT_ASSERT_EQUAL( OUString("S"), rEnglishKeywords[NF_KEY_S] ); + CPPUNIT_ASSERT_EQUAL( OUString("SS"), rEnglishKeywords[NF_KEY_SS] ); + CPPUNIT_ASSERT_EQUAL( OUString("Q"), rEnglishKeywords[NF_KEY_Q] ); + CPPUNIT_ASSERT_EQUAL( OUString("QQ"), rEnglishKeywords[NF_KEY_QQ] ); + CPPUNIT_ASSERT_EQUAL( OUString("D"), rEnglishKeywords[NF_KEY_D] ); + CPPUNIT_ASSERT_EQUAL( OUString("DD"), rEnglishKeywords[NF_KEY_DD] ); + CPPUNIT_ASSERT_EQUAL( OUString("DDD"), rEnglishKeywords[NF_KEY_DDD] ); + CPPUNIT_ASSERT_EQUAL( OUString("DDDD"), rEnglishKeywords[NF_KEY_DDDD] ); + CPPUNIT_ASSERT_EQUAL( OUString("YY"), rEnglishKeywords[NF_KEY_YY] ); + CPPUNIT_ASSERT_EQUAL( OUString("YYYY"), rEnglishKeywords[NF_KEY_YYYY] ); + CPPUNIT_ASSERT_EQUAL( OUString("NN"), rEnglishKeywords[NF_KEY_NN] ); + CPPUNIT_ASSERT_EQUAL( OUString("NNNN"), rEnglishKeywords[NF_KEY_NNNN] ); + CPPUNIT_ASSERT_EQUAL( OUString("CCC"), rEnglishKeywords[NF_KEY_CCC] ); + CPPUNIT_ASSERT_EQUAL( OUString("GENERAL"), rEnglishKeywords[NF_KEY_GENERAL] ); + CPPUNIT_ASSERT_EQUAL( OUString("NNN"), rEnglishKeywords[NF_KEY_NNN] ); + CPPUNIT_ASSERT_EQUAL( OUString("WW"), rEnglishKeywords[NF_KEY_WW] ); + CPPUNIT_ASSERT_EQUAL( OUString("MMMMM"), rEnglishKeywords[NF_KEY_MMMMM] ); + CPPUNIT_ASSERT_EQUAL( OUString("TRUE"), rEnglishKeywords[NF_KEY_TRUE] ); + CPPUNIT_ASSERT_EQUAL( OUString("FALSE"), rEnglishKeywords[NF_KEY_FALSE] ); + CPPUNIT_ASSERT_EQUAL( OUString("BOOLEAN"), rEnglishKeywords[NF_KEY_BOOLEAN] ); + CPPUNIT_ASSERT_EQUAL( OUString("COLOR"), rEnglishKeywords[NF_KEY_COLOR] ); + CPPUNIT_ASSERT_EQUAL( OUString("BLACK"), rEnglishKeywords[NF_KEY_BLACK] ); + CPPUNIT_ASSERT_EQUAL( OUString("BLUE"), rEnglishKeywords[NF_KEY_BLUE] ); + CPPUNIT_ASSERT_EQUAL( OUString("GREEN"), rEnglishKeywords[NF_KEY_GREEN] ); + CPPUNIT_ASSERT_EQUAL( OUString("CYAN"), rEnglishKeywords[NF_KEY_CYAN] ); + CPPUNIT_ASSERT_EQUAL( OUString("RED"), rEnglishKeywords[NF_KEY_RED] ); + CPPUNIT_ASSERT_EQUAL( OUString("MAGENTA"), rEnglishKeywords[NF_KEY_MAGENTA] ); + CPPUNIT_ASSERT_EQUAL( OUString("BROWN"), rEnglishKeywords[NF_KEY_BROWN] ); + CPPUNIT_ASSERT_EQUAL( OUString("GREY"), rEnglishKeywords[NF_KEY_GREY] ); + CPPUNIT_ASSERT_EQUAL( OUString("YELLOW"), rEnglishKeywords[NF_KEY_YELLOW] ); + CPPUNIT_ASSERT_EQUAL( OUString("WHITE"), rEnglishKeywords[NF_KEY_WHITE] ); + CPPUNIT_ASSERT_EQUAL( OUString("AAA"), rEnglishKeywords[NF_KEY_AAA]); + CPPUNIT_ASSERT_EQUAL( OUString("AAAA"), rEnglishKeywords[NF_KEY_AAAA] ); + CPPUNIT_ASSERT_EQUAL( OUString("E"), rEnglishKeywords[NF_KEY_EC] ); + CPPUNIT_ASSERT_EQUAL( OUString("EE"), rEnglishKeywords[NF_KEY_EEC] ); + CPPUNIT_ASSERT_EQUAL( OUString("G"), rEnglishKeywords[NF_KEY_G] ); + CPPUNIT_ASSERT_EQUAL( OUString("GG"), rEnglishKeywords[NF_KEY_GG] ); + CPPUNIT_ASSERT_EQUAL( OUString("GGG"), rEnglishKeywords[NF_KEY_GGG] ); + CPPUNIT_ASSERT_EQUAL( OUString("R"), rEnglishKeywords[NF_KEY_R] ); + CPPUNIT_ASSERT_EQUAL( OUString("RR"), rEnglishKeywords[NF_KEY_RR] ); + CPPUNIT_ASSERT_EQUAL( OUString("t"), rEnglishKeywords[NF_KEY_THAI_T] ); } void Test::testStandardColorIntegrity() @@ -1580,7 +1580,7 @@ void Test::testStandardColorIntegrity() SvNumberFormatter aFormatter(m_xContext, LANGUAGE_ENGLISH_US); const ::std::vector<Color> & rStandardColors = aFormatter.GetStandardColors(); const size_t nMaxDefaultColors = aFormatter.GetMaxDefaultColors(); - CPPUNIT_ASSERT_EQUAL( nMaxDefaultColors, size_t(NF_KEY_LASTCOLOR) - size_t(NF_KEY_FIRSTCOLOR) + 1 ); + CPPUNIT_ASSERT_EQUAL( size_t(NF_KEY_LASTCOLOR) - size_t(NF_KEY_FIRSTCOLOR) + 1, nMaxDefaultColors ); CPPUNIT_ASSERT_EQUAL( nMaxDefaultColors, rStandardColors.size() ); // Colors must follow same order as in sEnglishKeyword CPPUNIT_ASSERT_EQUAL( rStandardColors[0], COL_BLACK ); |