X-Git-Url: http://Server1/repobrowser/?p=xestiaab%2F.git;a=blobdiff_plain;f=source%2Ftests%2Fxestiaab_common.h;h=ca9b72746d68a198a7c65f7e4bdc5948e99dd7d1;hp=4739afb26a3ac4ff8319be7874bffd6219deb91d;hb=ba3ba5de4e84a8c3ddeb65549d0b46998e5ebdf5;hpb=2a30393d59c892349cffec18ec16907c2358fd0f diff --git a/source/tests/xestiaab_common.h b/source/tests/xestiaab_common.h index 4739afb..ca9b727 100644 --- a/source/tests/xestiaab_common.h +++ b/source/tests/xestiaab_common.h @@ -370,7 +370,7 @@ TEST(CommonFunctions, GivenStringWithCommaWhenEscapeStringIsCalledThenCommaIsEsc // Given - EscapeStringData = "Here we go, an \"example\" of escaping string."; + wxString EscapeStringData = "Here we go, an \"example\" of escaping string."; // When @@ -389,7 +389,7 @@ TEST(CommonFunctions, GivenStringWithNewlineCharactersWhenEscapeStringIsCalledTh // Given - EscapeStringData = "Lets put some \nnew \nlines \nin \nhere."; + wxString EscapeStringData = "Lets put some \nnew \nlines \nin \nhere."; // When @@ -408,7 +408,7 @@ TEST(CommonFunctions, GivenAStringWithReturnCharactersWhenEscapeStringIsCalledTh // Given - EscapeStringData = "Lets put some \r\nnew \r\nlines \r\nin \r\nhere."; + wxString EscapeStringData = "Lets put some \r\nnew \r\nlines \r\nin \r\nhere."; // When @@ -427,7 +427,7 @@ TEST(CommonFunctions, GivenStringWithBackslashesWhenEscapeStringIsCalledThenBack // Given - EscapeStringData = "A:\\path\\example\\lets\\have\\some\\fun"; + wxString EscapeStringData = "A:\\path\\example\\lets\\have\\some\\fun"; // When @@ -465,7 +465,7 @@ TEST(CommonFunctions, GivenStringWithEscapedCommasWhenCaptureStringIsCalledThenC // Given - CaptureStringData = "Here we go\\, an \"example\" of escaping string."; + wxString CaptureStringData = "Here we go\\, an \"example\" of escaping string."; // When @@ -484,7 +484,7 @@ TEST(CommonFunctions, GivenStringWithEscapedNewlinesWhenCaptureStringIsCalledThe // Given - CaptureStringData = "Lets put some \\nnew \\nlines \\nin \\nhere."; + wxString CaptureStringData = "Lets put some \\nnew \\nlines \\nin \\nhere."; // When @@ -503,7 +503,7 @@ TEST(CommonFunctions, GivenStringWithEscapedBackslashesWhenCaptureStringIsCalled // Given - CaptureStringData = "A:\\\\path\\\\example\\\\lets\\\\have\\\\some\\\\fun"; + wxString CaptureStringData = "A:\\\\path\\\\example\\\\lets\\\\have\\\\some\\\\fun"; // When @@ -541,7 +541,7 @@ TEST(CommonFunctions, GivenStringWithNewlinesWhenResetUnusedStringIsCalledThenSt // Given - ResetUnusedStringData = "Some text \\nwith new \\nlines!"; + wxString ResetUnusedStringData = "Some text \\nwith new \\nlines!"; // When @@ -560,7 +560,7 @@ TEST(CommonFunctions, GivenStringWithSeveralCharactersWhenResetUnusedStringThenS // Given - ResetUnusedStringData = "And now the list of characters: \\\\ \\n \\; \\,"; + wxString ResetUnusedStringData = "And now the list of characters: \\\\ \\n \\; \\,"; // When @@ -600,7 +600,7 @@ TEST(CommonFunctions, GivenStringWithNewlineWhenConvertToHTMLIsCalledThenStringI // Given - ConvertToHTMLData = "More testing &<>\n"; + wxString ConvertToHTMLData = "More testing &<>\n"; // When @@ -620,7 +620,7 @@ TEST(CommonFunctions, GivenStringWithSeveralLinesWhenConvertToHTMLIsCalledThenSt // Given - ConvertToHTMLData = "This is the first line.\nThis is the second line.\nThis is the third line."; + wxString ConvertToHTMLData = "This is the first line.\nThis is the second line.\nThis is the third line."; // When @@ -632,16 +632,13 @@ TEST(CommonFunctions, GivenStringWithSeveralLinesWhenConvertToHTMLIsCalledThenSt } -static std::map mapExample; +static std::map mapExample = +{ + { 0, 1 }, { 1, 1 }, { 2, 1 }, { 5, 1 }, { 500, 1 }, { 2415, 1 } +}; static int itemIndex = 0; -static mapExample.insert(std::make_pair(0,1)); -static mapExample.insert(std::make_pair(1,1)); -static mapExample.insert(std::make_pair(2,1)); -static mapExample.insert(std::make_pair(5,1)); -static mapExample.insert(std::make_pair(500,1)); -static mapExample.insert(std::make_pair(2415,1)); -static mapExistsStatus = false; +bool mapExistsStatus = false; TEST(CommonFunctions, GivenMapExistsStatusIsFalseAndItemIndexIs0WhenMapDataExistsIsCalledThenConfirmItemIndex0DoesExist) { @@ -690,16 +687,16 @@ TEST(CommonFunctions, GivenMapExistsStatusIsFalseAndItemIndexIs2WhenMapDataExist // Given - mapStatusExists = false; + mapExistsStatus = false; itemIndex = 2; // When - mapStatusExists = MapDataExists(&itemIndex, &mapExample); + mapExistsStatus = MapDataExists(&itemIndex, &mapExample); // Then - ASSERT_EQ(true, mapStatusExists); + ASSERT_EQ(true, mapExistsStatus); } @@ -710,16 +707,16 @@ TEST(CommonFunctions, GivenMapExistsStatusIsTrueAndItemIndexIs3WhenMapDataExists // Given - mapStatusExists = true; + mapExistsStatus = true; itemIndex = 3; // When - mapStatusExists = MapDataExists(&itemIndex, &mapExample); + mapExistsStatus = MapDataExists(&itemIndex, &mapExample); // Then - ASSERT_EQ(false, mapStatusExists); + ASSERT_EQ(false, mapExistsStatus); } @@ -730,16 +727,16 @@ TEST(CommonFunctions, GivenMapExistsStatusIsFalseAndItemIndexIs5WhenMapDataExist // Given - mapStatusExists = false; + mapExistsStatus = false; itemIndex = 5; // When - mapStatusExists = MapDataExists(&itemIndex, &mapExample); + mapExistsStatus = MapDataExists(&itemIndex, &mapExample); // Then - ASSERT_EQ(true, mapStatusExists); + ASSERT_EQ(true, mapExistsStatus); } @@ -750,16 +747,16 @@ TEST(CommonFunctions, GivenMapExistsStatusIsTrueAndItemIndexIs6WhenMapDataExists // Given - mapStatusExists = true; + mapExistsStatus = true; itemIndex = 6; // When - mapStatusExists = MapDataExists(&itemIndex, &mapExample); + mapExistsStatus = MapDataExists(&itemIndex, &mapExample); // Then - ASSERT_EQ(false, mapStatusExists); + ASSERT_EQ(false, mapExistsStatus); } @@ -770,16 +767,16 @@ TEST(CommonFunctions, GivenMapExistsStatusIsFalseAndItemIndexIs499WhenMapDataExi // Given - mapStatusExists = false; + mapExistsStatus = false; itemIndex = 499; // When - mapStatusExists = MapDataExists(&itemIndex, &mapExample); + mapExistsStatus = MapDataExists(&itemIndex, &mapExample); // Then - ASSERT_EQ(false, mapStatusExists); + ASSERT_EQ(false, mapExistsStatus); } @@ -790,16 +787,16 @@ TEST(CommonFunctions, GivenMapExistsStatusIsFalseAndItemIndexIs500WhenMapDataExi // Given - mapStatusExists = false; + mapExistsStatus = false; itemIndex = 500; // When - mapStatusExists = MapDataExists(&itemIndex, &mapExample); + mapExistsStatus = MapDataExists(&itemIndex, &mapExample); // Then - ASSERT_EQ(true, mapStatusExists); + ASSERT_EQ(true, mapExistsStatus); } @@ -810,16 +807,16 @@ TEST(CommonFunctions, GivenMapExistsStatusIsTrueAndItemIndexIs501WhenMapDataExis // Given - mapStatusExists = true; + mapExistsStatus = true; itemIndex = 501; // When - mapStatusExists = MapDataExists(&itemIndex, &mapExample); + mapExistsStatus = MapDataExists(&itemIndex, &mapExample); // Then - ASSERT_EQ(false, mapStatusExists); + ASSERT_EQ(false, mapExistsStatus); } @@ -830,16 +827,16 @@ TEST(CommonFunctions, GivenMapExistsStatusIsTrueAndItemIndexIs2414WhenMapDataExi // Given - mapStatusExists = true; + mapExistsStatus = true; itemIndex = 2414; // When - mapStatusExists = MapDataExists(&itemIndex, &mapExample); + mapExistsStatus = MapDataExists(&itemIndex, &mapExample); // Then - ASSERT_EQ(false, mapStatusExists); + ASSERT_EQ(false, mapExistsStatus); } @@ -850,16 +847,16 @@ TEST(CommonFunctions, GivenMapExistsStatusIsFalseAndItemIndexIs2415WhenMapDataEx // Given - mapStatusExists = false; + mapExistsStatus = false; itemIndex = 2415; // When - mapStatusExists = MapDataExists(&itemIndex, &mapExample); + mapExistsStatus = MapDataExists(&itemIndex, &mapExample); // Then - ASSERT_EQ(true, mapStatusExists); + ASSERT_EQ(true, mapExistsStatus); } @@ -870,15 +867,15 @@ TEST(CommonFunctions, GivenMapExistsStatusIsTrueAndItemIndexIs2416WhenMapDataExi // Given - mapStatusExists = true; + mapExistsStatus = true; itemIndex = 2416; // When - mapStatusExists = MapDataExists(&itemIndex, &mapExample); + mapExistsStatus = MapDataExists(&itemIndex, &mapExample); // Then - ASSERT_EQ(false, mapStatusExists); + ASSERT_EQ(false, mapExistsStatus); } \ No newline at end of file