X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit-internal%2Futc-Dali-Text-Markup.cpp;h=3efd9aa1bf7f72cc595beb163b2c288b837c3a44;hp=6e2d63291e9088132a1da3a614e4ee17eedc1b19;hb=309be8bafca890aea5baad5c46679cf207adb497;hpb=92cbca2f5bd2e15fa589448d4c884b71f4fef03c diff --git a/automated-tests/src/dali-toolkit-internal/utc-Dali-Text-Markup.cpp b/automated-tests/src/dali-toolkit-internal/utc-Dali-Text-Markup.cpp old mode 100755 new mode 100644 index 6e2d632..3efd9aa --- a/automated-tests/src/dali-toolkit-internal/utc-Dali-Text-Markup.cpp +++ b/automated-tests/src/dali-toolkit-internal/utc-Dali-Text-Markup.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,13 +22,13 @@ #include #include -#include -#include -#include #include #include +#include +#include #include #include +#include using namespace Dali; using namespace Toolkit; @@ -36,177 +36,179 @@ using namespace Text; namespace { +/////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////// - - struct TokenComparisonData - { - std::string description; - std::string string1; ///< must be in lower case!!!! - std::string string2; - bool expectedResult; - }; - - bool TokenComparisonTest( const TokenComparisonData& data ) - { - std::cout << " testing " << data.description << std::endl; +struct TokenComparisonData +{ + std::string description; + std::string string1; ///< must be in lower case!!!! + std::string string2; + bool expectedResult; +}; - const bool result = TokenComparison( data.string1, - data.string2.c_str(), - data.string2.size() ); +bool TokenComparisonTest(const TokenComparisonData& data) +{ + std::cout << " testing " << data.description << std::endl; - if( result != data.expectedResult ) - { - std::cout << " different conparison result : " << result << ", expected : " << data.expectedResult << std::endl; - std::cout << " comparing : [" << data.string1 << "] and [" << data.string2 << "]" << std::endl; + const bool result = TokenComparison(data.string1, + data.string2.c_str(), + data.string2.size()); - return false; - } + if(result != data.expectedResult) + { + std::cout << " different conparison result : " << result << ", expected : " << data.expectedResult << std::endl; + std::cout << " comparing : [" << data.string1 << "] and [" << data.string2 << "]" << std::endl; - return true; + return false; } - /////////////////////////////////////////////////////////// + return true; +} - struct ColorStringToVector4Data - { - std::string description; - std::string colorStr; - Vector4 expectedColor; - }; +/////////////////////////////////////////////////////////// - bool ColorStringToVector4Test( const ColorStringToVector4Data& data ) - { - std::cout << " testing " << data.description << std::endl; +struct ColorStringToVector4Data +{ + std::string description; + std::string colorStr; + Vector4 expectedColor; +}; - Vector4 color; - ColorStringToVector4( data.colorStr.c_str(), data.colorStr.size(), color ); +bool ColorStringToVector4Test(const ColorStringToVector4Data& data) +{ + std::cout << " testing " << data.description << std::endl; - if( color != data.expectedColor ) - { - std::cout << " different color : " << color << ", expected : " << data.expectedColor << std::endl; - return false; - } + Vector4 color; + ColorStringToVector4(data.colorStr.c_str(), data.colorStr.size(), color); - return true; + if(color != data.expectedColor) + { + std::cout << " different color : " << color << ", expected : " << data.expectedColor << std::endl; + return false; } - /////////////////////////////////////////////////////////// + return true; +} - struct Vector4ToColorStringData - { - std::string description; - Vector4 color; - std::string expectedColorStr; - }; +/////////////////////////////////////////////////////////// - bool Vector4ToColorStringTest( const Vector4ToColorStringData& data ) - { - std::cout << " testing " << data.description << std::endl; +struct Vector4ToColorStringData +{ + std::string description; + Vector4 color; + std::string expectedColorStr; +}; - std::string colorStr; - Vector4ToColorString( data.color, colorStr ); +bool Vector4ToColorStringTest(const Vector4ToColorStringData& data) +{ + std::cout << " testing " << data.description << std::endl; - if( colorStr != data.expectedColorStr ) - { - std::cout << " different color : [" << colorStr << "], expected : [" << data.expectedColorStr << "]" << std::endl; - return false; - } + std::string colorStr; + Vector4ToColorString(data.color, colorStr); - return true; + if(colorStr != data.expectedColorStr) + { + std::cout << " different color : [" << colorStr << "], expected : [" << data.expectedColorStr << "]" << std::endl; + return false; } - /////////////////////////////////////////////////////////// + return true; +} - struct StringToVector2Data - { - std::string description; - std::string vector2Str; - Vector2 expectedVector2; - }; +/////////////////////////////////////////////////////////// - bool StringToVector2Test( const StringToVector2Data& data ) - { - std::cout << " testing " << data.description << std::endl; +struct StringToVector2Data +{ + std::string description; + std::string vector2Str; + Vector2 expectedVector2; +}; - Vector2 vector2; - StringToVector2( data.vector2Str.c_str(), data.vector2Str.size(), vector2 ); +bool StringToVector2Test(const StringToVector2Data& data) +{ + std::cout << " testing " << data.description << std::endl; - if( vector2 != data.expectedVector2 ) - { - std::cout << " different vector2 : " << vector2 << ", expected : " << data.expectedVector2 << std::endl; - return false; - } + Vector2 vector2; + StringToVector2(data.vector2Str.c_str(), data.vector2Str.size(), vector2); - return true; + if(vector2 != data.expectedVector2) + { + std::cout << " different vector2 : " << vector2 << ", expected : " << data.expectedVector2 << std::endl; + return false; } - /////////////////////////////////////////////////////////// - + return true; +} - struct Vector2ToStringData - { - std::string description; - Vector2 vector2; - std::string expectedVector2Str; - }; +/////////////////////////////////////////////////////////// - bool Vector2ToStringTest( const Vector2ToStringData& data ) - { - std::cout << " testing " << data.description << std::endl; +struct Vector2ToStringData +{ + std::string description; + Vector2 vector2; + std::string expectedVector2Str; +}; - std::string vector2Str; - Vector2ToString( data.vector2, vector2Str ); +bool Vector2ToStringTest(const Vector2ToStringData& data) +{ + std::cout << " testing " << data.description << std::endl; - if( vector2Str != data.expectedVector2Str ) - { - std::cout << " different vector2 : [" << vector2Str << "], expected : [" << data.expectedVector2Str << "]" << std::endl; - return false; - } + std::string vector2Str; + Vector2ToString(data.vector2, vector2Str); - return true; + if(vector2Str != data.expectedVector2Str) + { + std::cout << " different vector2 : [" << vector2Str << "], expected : [" << data.expectedVector2Str << "]" << std::endl; + return false; } - /////////////////////////////////////////////////////////// + return true; +} +/////////////////////////////////////////////////////////// - struct XHTMLEntityToUTF8Data - { - std::string description; - std::string xHTMLEntityString; - std::string expectedString; - }; +struct XHTMLEntityToUTF8Data +{ + std::string description; + std::string xHTMLEntityString; + std::string expectedString; +}; - bool XHTMLEntityToUTF8Test( const XHTMLEntityToUTF8Data& data ) +bool XHTMLEntityToUTF8Test(const XHTMLEntityToUTF8Data& data) +{ + std::cout << " testing " << data.description << std::endl; + + Vector colorRuns; + Vector fontRuns; + Vector items; + Vector anchors; + Vector underlinedCharacterRuns; + Vector backgroundColorRuns; + Vector strikethroughCharacterRuns; + Vector boundedParagraphRuns; + Vector characterSpacingCharacterRuns; + MarkupProcessData markupProcessData(colorRuns, fontRuns, items, anchors, underlinedCharacterRuns, backgroundColorRuns, strikethroughCharacterRuns, boundedParagraphRuns, characterSpacingCharacterRuns); + ProcessMarkupString(data.xHTMLEntityString, markupProcessData); + + for(Vector::Iterator it = items.Begin(), + endIt = items.End(); + it != endIt; + ++it) { - std::cout << " testing " << data.description << std::endl; - - Vector colorRuns; - Vector fontRuns; - Vector items; - Vector anchors; - MarkupProcessData markupProcessData( colorRuns, fontRuns, items, anchors ); - ProcessMarkupString( data.xHTMLEntityString, markupProcessData ); - - for( Vector::Iterator it = items.Begin(), - endIt = items.End(); - it != endIt; - ++it ) - { - EmbeddedItem& item = *it; - delete[] item.url; - } - items.Clear(); - - if( markupProcessData.markupProcessedText != data.expectedString ) - { - std::cout << " different output string : " << markupProcessData.markupProcessedText << ", expected : " << data.expectedString << " " << std::endl; - return false; - } + EmbeddedItem& item = *it; + delete[] item.url; + } + items.Clear(); - return true; + if(markupProcessData.markupProcessedText != data.expectedString) + { + std::cout << " different output string : " << markupProcessData.markupProcessedText << ", expected : " << data.expectedString << " " << std::endl; + return false; } + return true; +} + } // namespace int UtcDaliTextTokenComparison(void) @@ -214,45 +216,35 @@ int UtcDaliTextTokenComparison(void) tet_infoline(" UtcDaliTextTokenComparison"); const TokenComparisonData data[] = - { { - "void texts", - "", - "", - true - }, - { - "different size text", - "hello", - "world!", - false - }, - { - "different texts", - "hello", - "world", - false - }, - { - "same texts", - "world", - "wOrLD", - true - }, - { - "some punctuation characters, numbers, ...", - "hello0123456789.![?]", - "Hello0123456789.![?]", - true - } - - }; + {"void texts", + "", + "", + true}, + {"different size text", + "hello", + "world!", + false}, + {"different texts", + "hello", + "world", + false}, + {"same texts", + "world", + "wOrLD", + true}, + {"some punctuation characters, numbers, ...", + "hello0123456789.![?]", + "Hello0123456789.![?]", + true} + + }; const unsigned int numberOfTests = 5u; - for( unsigned int index = 0u; index < numberOfTests; ++index ) + for(unsigned int index = 0u; index < numberOfTests; ++index) { ToolkitTestApplication application; - if( !TokenComparisonTest( data[index] ) ) + if(!TokenComparisonTest(data[index])) { tet_result(TET_FAIL); } @@ -267,84 +259,56 @@ int UtcDaliTextColorStringToVector4(void) tet_infoline(" UtcDaliTextColorStringToVector4"); const ColorStringToVector4Data data[] = - { - { - "black string", - "bLack", - Color::BLACK - }, - { - "white string", - "White", - Color::WHITE - }, - { - "red string", - "reD", - Color::RED - }, - { - "green string", - "green", - Color::GREEN - }, - { - "blue string", - "blue", - Color::BLUE - }, - { - "yellow string", - "yeLloW", - Color::YELLOW - }, - { - "magenta string", - "MagEnta", - Color::MAGENTA - }, - { - "cyan string", - "CyaN", - Color::CYAN - }, - { - "transparent string", - "transparent", - Color::TRANSPARENT - }, - { - "3 component web color", - "#F00", - Color::RED - }, - { - "6 component web color", - "#fF0000", - Color::RED - }, - { - "hex color red (ARGB)", - "0xffff0000", - Color::RED - }, { - "hex color green (ARGB)", - "0xFf00FF00", - Color::GREEN - }, - { - "undefined color", - "undefined", - Vector4::ZERO - }, - }; + {"black string", + "bLack", + Color::BLACK}, + {"white string", + "White", + Color::WHITE}, + {"red string", + "reD", + Color::RED}, + {"green string", + "green", + Color::GREEN}, + {"blue string", + "blue", + Color::BLUE}, + {"yellow string", + "yeLloW", + Color::YELLOW}, + {"magenta string", + "MagEnta", + Color::MAGENTA}, + {"cyan string", + "CyaN", + Color::CYAN}, + {"transparent string", + "transparent", + Color::TRANSPARENT}, + {"3 component web color", + "#F00", + Color::RED}, + {"6 component web color", + "#fF0000", + Color::RED}, + {"hex color red (ARGB)", + "0xffff0000", + Color::RED}, + {"hex color green (ARGB)", + "0xFf00FF00", + Color::GREEN}, + {"undefined color", + "undefined", + Vector4::ZERO}, + }; const unsigned int numberOfTests = 14u; - for( unsigned int index = 0u; index < numberOfTests; ++index ) + for(unsigned int index = 0u; index < numberOfTests; ++index) { ToolkitTestApplication application; - if( !ColorStringToVector4Test( data[index] ) ) + if(!ColorStringToVector4Test(data[index])) { tet_result(TET_FAIL); } @@ -359,64 +323,46 @@ int UtcDaliTextVector4ToColorString(void) tet_infoline(" UtcDaliTextVector4ToColorString"); const Vector4ToColorStringData data[] = - { - { - "black color", - Color::BLACK, - "black" - }, - { - "white string", - Color::WHITE, - "white" - }, - { - "red string", - Color::RED, - "red" - }, - { - "green string", - Color::GREEN, - "green" - }, - { - "blue string", - Color::BLUE, - "blue" - }, { - "yellow string", - Color::YELLOW, - "yellow" - }, - { - "magenta string", - Color::MAGENTA, - "magenta", - }, - { - "cyan string", - Color::CYAN, - "cyan" - }, - { - "transparent string", - Color::TRANSPARENT, - "transparent" - }, - { - "hex color", - Vector4( 0.4f, 0.5f, 0.6f, 1.f ), - "0xff667f99" - }, - }; + {"black color", + Color::BLACK, + "black"}, + {"white string", + Color::WHITE, + "white"}, + {"red string", + Color::RED, + "red"}, + {"green string", + Color::GREEN, + "green"}, + {"blue string", + Color::BLUE, + "blue"}, + {"yellow string", + Color::YELLOW, + "yellow"}, + { + "magenta string", + Color::MAGENTA, + "magenta", + }, + {"cyan string", + Color::CYAN, + "cyan"}, + {"transparent string", + Color::TRANSPARENT, + "transparent"}, + {"hex color", + Vector4(0.4f, 0.5f, 0.6f, 1.f), + "0xff667f99"}, + }; const unsigned int numberOfTests = 10u; - for( unsigned int index = 0u; index < numberOfTests; ++index ) + for(unsigned int index = 0u; index < numberOfTests; ++index) { ToolkitTestApplication application; - if( !Vector4ToColorStringTest( data[index] ) ) + if(!Vector4ToColorStringTest(data[index])) { tet_result(TET_FAIL); } @@ -430,29 +376,22 @@ int UtcDaliTextStringToVector2(void) { tet_infoline(" UtcDaliTextStringToVector2"); const StringToVector2Data data[] = - { - { - "void text", - "", - Vector2::ZERO - }, { - "zero zero", - "0 0", - Vector2::ZERO - }, - { - "five four", - "5 4", - Vector2(5.f, 4.f) - } - }; + {"void text", + "", + Vector2::ZERO}, + {"zero zero", + "0 0", + Vector2::ZERO}, + {"five four", + "5 4", + Vector2(5.f, 4.f)}}; const unsigned int numberOfTests = 3u; - for( unsigned int index = 0u; index < numberOfTests; ++index ) + for(unsigned int index = 0u; index < numberOfTests; ++index) { ToolkitTestApplication application; - if( !StringToVector2Test( data[index] ) ) + if(!StringToVector2Test(data[index])) { tet_result(TET_FAIL); } @@ -466,24 +405,23 @@ int UtcDaliTextVector2ToString(void) { tet_infoline(" UtcDaliTextVector2ToString"); const Vector2ToStringData data[] = - { { - "zero zero", - Vector2::ZERO, - "0 0", - }, - { - "five four", - Vector2(5.f, 4.f), - "5 4", - } - }; + { + "zero zero", + Vector2::ZERO, + "0 0", + }, + { + "five four", + Vector2(5.f, 4.f), + "5 4", + }}; const unsigned int numberOfTests = 2u; - for( unsigned int index = 0u; index < numberOfTests; ++index ) + for(unsigned int index = 0u; index < numberOfTests; ++index) { ToolkitTestApplication application; - if( !Vector2ToStringTest( data[index] ) ) + if(!Vector2ToStringTest(data[index])) { tet_result(TET_FAIL); } @@ -497,44 +435,31 @@ int UtcDaliTextXHTMLEntityToUTF8(void) { tet_infoline(" UtcDaliTextXHTMLEntityToUTF8"); const XHTMLEntityToUTF8Data data[] = - { { - "Text Without XHTML Entity", - "Checking XHTML Entitities", - "Checking XHTML Entitities" - }, - { - "Text With XHTML Entity in Numeric form", - "Checking Numeric Entitities & ' < > ¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ ­ ® ¯ ° ± ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿ À Á Â Ã Ä Å æ Ç È É Ê Ë Ì Í Î Ï ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ý þ ß à á â ã ä å æ ç è é ê ë ì í î ï ð ñ ò ó ô õ ö ÷ ø ù ú û ü ý þ ÿ α β γ δ ε ζ η θ ι κ λ μ ν ξ ο π ρ σ τ υ φ χ ψ ω … € ← ↑ → ↓ ↔ ← → ∀ ∃ ∇ ∏ ∑ ∧ ∨ ∫ ≠ ≡ ⊕ ⊥ † ‡ • ", - "Checking Numeric Entitities & ' < > ¡ ¢ £ ¤ Â¥ ¦ § ¨ © ª « ¬ ­ ® ¯ ° ± ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿ À Á Â Ã Ä Å æ Ç È É Ê Ë Ì Í Î Ï ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ý þ ß à á â ã ä Ã¥ æ ç è é ê ë ì í î ï ð ñ ò ó ô õ ö ÷ ø ù ú û ü ý þ ÿ α β γ δ ε ζ η θ ι κ λ μ ν ξ ο π ρ σ τ υ φ χ ψ ω … € ← ↑ → ↓ ↔ ← → ∀ ∃ ∇ ∏ ∑ ∧ ∨ ∫ ≠ ≡ ⊕ ⊥ † ‡ • " - }, - { - "Text With XHTML Named Entities", - "Checking Named Entitities & ' < > ¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ ­ ® ¯ ° ± ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿ À Á Â Ã Ä Å æ Ç È É Ê Ë Ì Í Î Ï ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ý þ ß à á â ã ä å æ ç è é ê ë ì í î ï ð ñ ò ó ô õ ö ÷ ø ù ú û ü ý þ ÿ α β γ δ ε ζ η θ ι κ λ μ ν ξ ο π ρ σ τ υ φ χ ψ ω … € ← ↑ → ↓ ↔ ← → ∀ ∃ ∇ ∏ ∑ ∧ ∨ ∫ ≠ ≡ ⊕ ⊥ † ‡ • ", - "Checking Named Entitities & ' < > ¡ ¢ £ ¤ Â¥ ¦ § ¨ © ª « ¬ ­ ® ¯ ° ± ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿ À Á Â Ã Ä Å æ Ç È É Ê Ë Ì Í Î Ï ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ý þ ß à á â ã ä Ã¥ æ ç è é ê ë ì í î ï ð ñ ò ó ô õ ö ÷ ø ù ú û ü ý þ ÿ α β γ δ ε ζ η θ ι κ λ μ ν ξ ο π ρ σ τ υ φ χ ψ ω … € ← ↑ → ↓ ↔ ← → ∀ ∃ ∇ ∏ ∑ ∧ ∨ ∫ ≠ ≡ ⊕ ⊥ † ‡ • " - }, - { - "Testing of < special character", - "Testing of < special character", - "Testing of " - }, - { - "Testing of & special character", - "Testing of & special character", - "Testing of " - }, - { - "Testing of & < > special character", - "Testing of \\& \\< \\> special character", - "Testing of & < > special character" - } - }; + {"Text Without XHTML Entity", + "Checking XHTML Entitities", + "Checking XHTML Entitities"}, + {"Text With XHTML Entity in Numeric form", + "Checking Numeric Entitities & ' < > ¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ ­ ® ¯ ° ± ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿ À Á Â Ã Ä Å æ Ç È É Ê Ë Ì Í Î Ï ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ý þ ß à á â ã ä å æ ç è é ê ë ì í î ï ð ñ ò ó ô õ ö ÷ ø ù ú û ü ý þ ÿ α β γ δ ε ζ η θ ι κ λ μ ν ξ ο π ρ σ τ υ φ χ ψ ω … € ← ↑ → ↓ ↔ ← → ∀ ∃ ∇ ∏ ∑ ∧ ∨ ∫ ≠ ≡ ⊕ ⊥ † ‡ • ", + "Checking Numeric Entitities & ' < > ¡ ¢ £ ¤ Â¥ ¦ § ¨ © ª « ¬ ­ ® ¯ ° ± ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿ À Á Â Ã Ä Å æ Ç È É Ê Ë Ì Í Î Ï ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ý þ ß à á â ã ä Ã¥ æ ç è é ê ë ì í î ï ð ñ ò ó ô õ ö ÷ ø ù ú û ü ý þ ÿ α β γ δ ε ζ η θ ι κ λ μ ν ξ ο π ρ σ τ υ φ χ ψ ω … € ← ↑ → ↓ ↔ ← → ∀ ∃ ∇ ∏ ∑ ∧ ∨ ∫ ≠ ≡ ⊕ ⊥ † ‡ • "}, + {"Text With XHTML Named Entities", + "Checking Named Entitities & ' < > ¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ ­ ® ¯ ° ± ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿ À Á Â Ã Ä Å æ Ç È É Ê Ë Ì Í Î Ï ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ý þ ß à á â ã ä å æ ç è é ê ë ì í î ï ð ñ ò ó ô õ ö ÷ ø ù ú û ü ý þ ÿ α β γ δ ε ζ η θ ι κ λ μ ν ξ ο π ρ σ τ υ φ χ ψ ω … € ← ↑ → ↓ ↔ ← → ∀ ∃ ∇ ∏ ∑ ∧ ∨ ∫ ≠ ≡ ⊕ ⊥ † ‡ • ", + "Checking Named Entitities & ' < > ¡ ¢ £ ¤ Â¥ ¦ § ¨ © ª « ¬ ­ ® ¯ ° ± ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿ À Á Â Ã Ä Å æ Ç È É Ê Ë Ì Í Î Ï ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ý þ ß à á â ã ä Ã¥ æ ç è é ê ë ì í î ï ð ñ ò ó ô õ ö ÷ ø ù ú û ü ý þ ÿ α β γ δ ε ζ η θ ι κ λ μ ν ξ ο π ρ σ τ υ φ χ ψ ω … € ← ↑ → ↓ ↔ ← → ∀ ∃ ∇ ∏ ∑ ∧ ∨ ∫ ≠ ≡ ⊕ ⊥ † ‡ • "}, + {"Testing of < special character", + "Testing of < special character", + "Testing of "}, + {"Testing of & special character", + "Testing of & special character", + "Testing of "}, + {"Testing of & < > special character", + "Testing of \\& \\< \\> special character", + "Testing of & < > special character"}}; const unsigned int numberOfTests = 6u; - for( unsigned int index = 0u; index < numberOfTests; ++index ) + for(unsigned int index = 0u; index < numberOfTests; ++index) { ToolkitTestApplication application; - if( !XHTMLEntityToUTF8Test( data[index] ) ) + if(!XHTMLEntityToUTF8Test(data[index])) { tet_result(TET_FAIL); }