chore: Adjust Clang-format linter rules
120 Column Lines Block Indent for Bracket Align Custom Line Break Rules No Single Line Functions
This commit is contained in:
@ -21,7 +21,8 @@
|
||||
|
||||
using namespace deskflow;
|
||||
|
||||
TEST(StringTests, format_formatWithArguments_formatedString) {
|
||||
TEST(StringTests, format_formatWithArguments_formatedString)
|
||||
{
|
||||
const char *format = "%%%{1}=%{2}";
|
||||
const char *arg1 = "answer";
|
||||
const char *arg2 = "42";
|
||||
@ -31,7 +32,8 @@ TEST(StringTests, format_formatWithArguments_formatedString) {
|
||||
EXPECT_EQ("%answer=42", result);
|
||||
}
|
||||
|
||||
TEST(StringTests, findReplaceAll_inputString_replacedString) {
|
||||
TEST(StringTests, findReplaceAll_inputString_replacedString)
|
||||
{
|
||||
String subject = "foobar";
|
||||
String find = "bar";
|
||||
String replace = "baz";
|
||||
@ -41,7 +43,8 @@ TEST(StringTests, findReplaceAll_inputString_replacedString) {
|
||||
EXPECT_EQ("foobaz", subject);
|
||||
}
|
||||
|
||||
TEST(StringTests, sprintf_formatWithArgument_formatedString) {
|
||||
TEST(StringTests, sprintf_formatWithArgument_formatedString)
|
||||
{
|
||||
const char *format = "%s=%d";
|
||||
const char *arg1 = "answer";
|
||||
int arg2 = 42;
|
||||
@ -51,7 +54,8 @@ TEST(StringTests, sprintf_formatWithArgument_formatedString) {
|
||||
EXPECT_EQ("answer=42", result);
|
||||
}
|
||||
|
||||
TEST(StringTests, toHex_plaintext_hexString) {
|
||||
TEST(StringTests, toHex_plaintext_hexString)
|
||||
{
|
||||
String subject = "foobar";
|
||||
int width = 2;
|
||||
|
||||
@ -60,7 +64,8 @@ TEST(StringTests, toHex_plaintext_hexString) {
|
||||
EXPECT_EQ("666f6f626172", subject);
|
||||
}
|
||||
|
||||
TEST(StringTests, uppercase_lowercaseInput_uppercaseOutput) {
|
||||
TEST(StringTests, uppercase_lowercaseInput_uppercaseOutput)
|
||||
{
|
||||
String subject = "12foo3BaR";
|
||||
|
||||
string::uppercase(subject);
|
||||
@ -68,7 +73,8 @@ TEST(StringTests, uppercase_lowercaseInput_uppercaseOutput) {
|
||||
EXPECT_EQ("12FOO3BAR", subject);
|
||||
}
|
||||
|
||||
TEST(StringTests, removeChar_inputString_removeAllSpecifiedCharactors) {
|
||||
TEST(StringTests, removeChar_inputString_removeAllSpecifiedCharactors)
|
||||
{
|
||||
String subject = "foobar";
|
||||
const char c = 'o';
|
||||
|
||||
@ -77,7 +83,8 @@ TEST(StringTests, removeChar_inputString_removeAllSpecifiedCharactors) {
|
||||
EXPECT_EQ("fbar", subject);
|
||||
}
|
||||
|
||||
TEST(StringTests, intToString_inputInt_outputString) {
|
||||
TEST(StringTests, intToString_inputInt_outputString)
|
||||
{
|
||||
size_t value = 123;
|
||||
|
||||
String number = string::sizeTypeToString(value);
|
||||
@ -85,7 +92,8 @@ TEST(StringTests, intToString_inputInt_outputString) {
|
||||
EXPECT_EQ("123", number);
|
||||
}
|
||||
|
||||
TEST(StringTests, stringToUint_inputString_outputInt) {
|
||||
TEST(StringTests, stringToUint_inputString_outputInt)
|
||||
{
|
||||
String number = "123";
|
||||
|
||||
size_t value = string::stringToSizeType(number);
|
||||
@ -93,7 +101,8 @@ TEST(StringTests, stringToUint_inputString_outputInt) {
|
||||
EXPECT_EQ(123, value);
|
||||
}
|
||||
|
||||
TEST(StringTests, splitString_twoSeparator_returnThreeParts) {
|
||||
TEST(StringTests, splitString_twoSeparator_returnThreeParts)
|
||||
{
|
||||
String string = "stub1:stub2:stub3";
|
||||
|
||||
std::vector<String> results = string::splitString(string, ':');
|
||||
@ -104,7 +113,8 @@ TEST(StringTests, splitString_twoSeparator_returnThreeParts) {
|
||||
EXPECT_EQ("stub3", results[2]);
|
||||
}
|
||||
|
||||
TEST(StringTests, splitString_oneSeparator_returnTwoParts) {
|
||||
TEST(StringTests, splitString_oneSeparator_returnTwoParts)
|
||||
{
|
||||
String string = "stub1:stub2";
|
||||
|
||||
std::vector<String> results = string::splitString(string, ':');
|
||||
@ -114,7 +124,8 @@ TEST(StringTests, splitString_oneSeparator_returnTwoParts) {
|
||||
EXPECT_EQ("stub2", results[1]);
|
||||
}
|
||||
|
||||
TEST(StringTests, splitString_noSeparator_returnOriginalString) {
|
||||
TEST(StringTests, splitString_noSeparator_returnOriginalString)
|
||||
{
|
||||
String string = "stub1";
|
||||
|
||||
std::vector<String> results = string::splitString(string, ':');
|
||||
@ -123,7 +134,8 @@ TEST(StringTests, splitString_noSeparator_returnOriginalString) {
|
||||
EXPECT_EQ("stub1", results[0]);
|
||||
}
|
||||
|
||||
TEST(StringTests, splitString_emptyString_returnEmptyVector) {
|
||||
TEST(StringTests, splitString_emptyString_returnEmptyVector)
|
||||
{
|
||||
String string;
|
||||
|
||||
std::vector<String> results = string::splitString(string, ':');
|
||||
@ -131,7 +143,8 @@ TEST(StringTests, splitString_emptyString_returnEmptyVector) {
|
||||
EXPECT_EQ(0, results.size());
|
||||
}
|
||||
|
||||
TEST(StringTests, splitString_tailSeparator_returnTwoParts) {
|
||||
TEST(StringTests, splitString_tailSeparator_returnTwoParts)
|
||||
{
|
||||
String string = "stub1:stub2:";
|
||||
|
||||
std::vector<String> results = string::splitString(string, ':');
|
||||
@ -141,7 +154,8 @@ TEST(StringTests, splitString_tailSeparator_returnTwoParts) {
|
||||
EXPECT_EQ("stub2", results[1]);
|
||||
}
|
||||
|
||||
TEST(StringTests, splitString_headSeparator_returnTwoParts) {
|
||||
TEST(StringTests, splitString_headSeparator_returnTwoParts)
|
||||
{
|
||||
String string = ":stub1:stub2";
|
||||
|
||||
std::vector<String> results = string::splitString(string, ':');
|
||||
@ -151,7 +165,8 @@ TEST(StringTests, splitString_headSeparator_returnTwoParts) {
|
||||
EXPECT_EQ("stub2", results[1]);
|
||||
}
|
||||
|
||||
TEST(StringTests, splitString_headAndTailSeparators_returnTwoParts) {
|
||||
TEST(StringTests, splitString_headAndTailSeparators_returnTwoParts)
|
||||
{
|
||||
String string = ":stub1:stub2:";
|
||||
|
||||
std::vector<String> results = string::splitString(string, ':');
|
||||
|
||||
Reference in New Issue
Block a user