// This tells Catch to provide a main() - only do this in one cpp file #define CATCH_CONFIG_MAIN #include "catch.hpp" #include #include "trim.h" #define TEXT(text) \ char s[] = text; \ size_t len = strlen(s); #define LEFT(result) \ SECTION("left") { REQUIRE( strcmp( trim_left(s), result ) == 0 ); } #define RIGHT(result) \ SECTION("right") { REQUIRE( strcmp( trim_right(s), result ) == 0 ); } \ SECTION("right2") { REQUIRE( strcmp( trim_right2(s, len), result ) == 0 ); } #define INSIDE(result) \ SECTION("inside") { REQUIRE( strcmp( trim_inside(s), result ) == 0 ); } #define TRIM(result) \ SECTION("trim") { REQUIRE( strcmp( trim(s), result ) == 0 ); } \ SECTION("trim2") { REQUIRE( strcmp( trim2(s, len), result ) == 0 ); } #define ALL(result) \ SECTION("all") { REQUIRE( strcmp( trim_all(s), result ) == 0 ); } \ SECTION("all2") { REQUIRE( strcmp( trim_all2(s, len), result ) == 0 ); } #if TRIM_LINE1 && TRIM_LINE2 #define LINE000(result) \ SECTION("line000") { REQUIRE( strcmp( trim_line(s, 0, 0, 0), result ) == 0 ); } \ SECTION("line000s") { REQUIRE( strcmp( trim_line2(s, len, 0, 0, 0), result ) == 0 ); } #elif TRIM_LINE1 #define LINE000(result) \ SECTION("line000") { REQUIRE( strcmp( trim_line(s, 0, 0, 0), result ) == 0 ); } #elif TRIM_LINE2 #define LINE000(result) \ SECTION("line000s") { REQUIRE( strcmp( trim_line2(s, len, 0, 0, 0), result ) == 0 ); } #else #define LINE000(result) #endif #if TRIM_LINE1 && TRIM_LINE2 #define LINE011(result) \ SECTION("line011") { REQUIRE( strcmp( trim_line(s, 0, 1, 1), result ) == 0 ); } \ SECTION("line011s") { REQUIRE( strcmp( trim_line2(s, len, 0, 1, 1), result ) == 0 ); } #elif TRIM_LINE1 #define LINE011(result) \ SECTION("line011") { REQUIRE( strcmp( trim_line(s, 0, 1, 1), result ) == 0 ); } #elif TRIM_LINE2 #define LINE011(result) \ SECTION("line011s") { REQUIRE( strcmp( trim_line2(s, len, 0, 1, 1), result ) == 0 ); } #else #define LINE011(result) #endif #if TRIM_LINE1 && TRIM_LINE2 #define LINE110(result) \ SECTION("line110") { REQUIRE( strcmp( trim_line(s, 1, 1, 0), result ) == 0 ); } \ SECTION("line110s") { REQUIRE( strcmp( trim_line2(s, len, 1, 1, 0), result ) == 0 ); } #elif TRIM_LINE1 #define LINE110(result) \ SECTION("line110") { REQUIRE( strcmp( trim_line(s, 1, 1, 0), result ) == 0 ); } #elif TRIM_LINE2 #define LINE110(result) \ SECTION("line110s") { REQUIRE( strcmp( trim_line2(s, len, 1, 1, 0), result ) == 0 ); } #else #define LINE110(result) #endif TEST_CASE("empty") { TEXT ("") LEFT ("") RIGHT ("") INSIDE ("") TRIM ("") ALL ("") LINE000("") LINE011("") LINE110("") } TEST_CASE("1char") { TEXT ("1") LEFT ("1") RIGHT ("1") INSIDE ("1") TRIM ("1") ALL ("1") LINE000("1") LINE011("1") LINE110("1") } TEST_CASE("2char") { TEXT ("3o") LEFT ("3o") RIGHT ("3o") INSIDE ("3o") TRIM ("3o") ALL ("3o") LINE000("3o") LINE011("3o") LINE110("3o") } TEST_CASE("ch-sp-ch") { TEXT ("D b") LEFT ("D b") RIGHT ("D b") INSIDE ("D b") TRIM ("D b") ALL ("D b") LINE000("D b") LINE011("D b") LINE110("D b") } TEST_CASE("ch-sp-sp-ch") { TEXT (". ;") LEFT (". ;") RIGHT (". ;") INSIDE (". ;") TRIM (". ;") ALL (". ;") LINE000(". ;") LINE011(". ;") LINE110(". ;") } TEST_CASE("--/--/--") { TEXT ("No left. No inside. No right.") const char* const result = "No left. No inside. No right."; LEFT (result) RIGHT (result) INSIDE (result) TRIM (result) ALL (result) LINE000(result) LINE011(result) LINE110(result) } TEST_CASE("--/--/ws") { TEXT ("No left. No inside. Right ") LEFT ("No left. No inside. Right ") RIGHT ("No left. No inside. Right") INSIDE ("No left. No inside. Right ") TRIM ("No left. No inside. Right") ALL ("No left. No inside. Right") LINE000("No left. No inside. Right ") LINE011("No left. No inside. Right") LINE110("No left. No inside. Right ") } TEST_CASE("--/ws/--") { TEXT ("No left. Inside white space. No right.") LEFT ("No left. Inside white space. No right.") RIGHT ("No left. Inside white space. No right.") INSIDE ("No left. Inside white space. No right.") TRIM ("No left. Inside white space. No right.") ALL ("No left. Inside white space. No right.") LINE000("No left. Inside white space. No right.") LINE011("No left. Inside white space. No right.") LINE110("No left. Inside white space. No right.") } TEST_CASE("--/ws/ws") { TEXT ("No left. Inside white space. Right ") LEFT ("No left. Inside white space. Right ") RIGHT ("No left. Inside white space. Right") INSIDE ("No left. Inside white space. Right ") TRIM ("No left. Inside white space. Right") ALL ("No left. Inside white space. Right") LINE000("No left. Inside white space. Right ") LINE011("No left. Inside white space. Right") LINE110("No left. Inside white space. Right ") } TEST_CASE("ws/--/--") { TEXT (" Left. No inside. No right.") LEFT ("Left. No inside. No right.") RIGHT (" Left. No inside. No right.") INSIDE (" Left. No inside. No right.") TRIM ("Left. No inside. No right.") ALL ("Left. No inside. No right.") LINE000(" Left. No inside. No right.") LINE011(" Left. No inside. No right.") LINE110("Left. No inside. No right.") } TEST_CASE("ws/--/ws") { TEXT (" Left. No inside. Right ") LEFT ("Left. No inside. Right ") RIGHT (" Left. No inside. Right") INSIDE (" Left. No inside. Right ") TRIM ("Left. No inside. Right") ALL ("Left. No inside. Right") LINE000(" Left. No inside. Right ") LINE011(" Left. No inside. Right") LINE110("Left. No inside. Right ") } TEST_CASE("ws/ws/--") { TEXT (" Left. Inside white space. No right.") LEFT ("Left. Inside white space. No right.") RIGHT (" Left. Inside white space. No right.") INSIDE (" Left. Inside white space. No right.") TRIM ("Left. Inside white space. No right.") ALL ("Left. Inside white space. No right.") LINE000(" Left. Inside white space. No right.") LINE011(" Left. Inside white space. No right.") LINE110("Left. Inside white space. No right.") } TEST_CASE("ws/ws/ws") { TEXT (" Left. Inside white space. Right ") LEFT ("Left. Inside white space. Right ") RIGHT (" Left. Inside white space. Right") INSIDE (" Left. Inside white space. Right ") TRIM ("Left. Inside white space. Right") ALL ("Left. Inside white space. Right") LINE000(" Left. Inside white space. Right ") LINE011(" Left. Inside white space. Right") LINE110("Left. Inside white space. Right ") } TEST_CASE("all-types-ws") { TEXT (" \t \n \t") LEFT ("") RIGHT ("") INSIDE (" \t \n \t") TRIM ("") ALL ("") LINE000(" \t \n \t") LINE011("") LINE110("") } TEST_CASE("1word/ws") { TEXT ("OnlyAWord1\t\t\t\t") LEFT ("OnlyAWord1\t\t\t\t") RIGHT ("OnlyAWord1") INSIDE ("OnlyAWord1\t\t\t\t") TRIM ("OnlyAWord1") ALL ("OnlyAWord1") LINE000("OnlyAWord1\t\t\t\t") LINE011("OnlyAWord1") LINE110("OnlyAWord1\t\t\t\t") } TEST_CASE("ws/1word") { TEXT ("\t\t\t\t\t\t\tOnlyAWord2") LEFT ("OnlyAWord2") RIGHT ("\t\t\t\t\t\t\tOnlyAWord2") INSIDE ("\t\t\t\t\t\t\tOnlyAWord2") TRIM ("OnlyAWord2") ALL ("OnlyAWord2") LINE000("\t\t\t\t\t\t\tOnlyAWord2") LINE011("\t\t\t\t\t\t\tOnlyAWord2") LINE110("OnlyAWord2") } TEST_CASE("ws/word/ws") { TEXT ("\t\t\t\tOnlyAWord3\t\t\t\t") LEFT ("OnlyAWord3\t\t\t\t") RIGHT ("\t\t\t\tOnlyAWord3") INSIDE ("\t\t\t\tOnlyAWord3\t\t\t\t") TRIM ("OnlyAWord3") ALL ("OnlyAWord3") LINE000("\t\t\t\tOnlyAWord3\t\t\t\t") LINE011("\t\t\t\tOnlyAWord3") LINE110("OnlyAWord3\t\t\t\t") } TEST_CASE("your-case-here") { TEXT ("") LEFT ("") RIGHT ("") INSIDE ("") TRIM ("") ALL ("") LINE000("") LINE011("") LINE110("") } //A85576 TEST_CASE("Einstein") { TEXT (" Solament e una vid a dedicada a l o s demás merece ser vivida ") LEFT ("Solament e una vid a dedicada a l o s demás merece ser vivida ") RIGHT (" Solament e una vid a dedicada a l o s demás merece ser vivida") INSIDE (" Solament e una vid a dedicada a l o s demás merece ser vivida ") TRIM ("Solament e una vid a dedicada a l o s demás merece ser vivida") ALL ("Solament e una vid a dedicada a l o s demás merece ser vivida") LINE000(" Solament e una vid a dedicada a l o s demás merece ser vivida ") LINE011(" Solament e una vid a dedicada a l o s demás merece ser vivida") LINE110("Solament e una vid a dedicada a l o s demás merece ser vivida ") } TEST_CASE("\n\nsymbol\t\t\tsymbol ") { TEXT ("\n\n$\t\t\t$ ") LEFT ("$\t\t\t$ ") RIGHT ("\n\n$\t\t\t$") INSIDE ("\n\n$ $ ") TRIM ("$\t\t\t$") ALL ("$ $") LINE000("\n\n$\t\t\t$ ") LINE011("\n\n$ $") LINE110("$ $ ") } TEST_CASE("nO_sPACES") { TEXT ("EsteTextoNoTieneEspacios") LEFT ("EsteTextoNoTieneEspacios") RIGHT ("EsteTextoNoTieneEspacios") INSIDE ("EsteTextoNoTieneEspacios") TRIM ("EsteTextoNoTieneEspacios") ALL ("EsteTextoNoTieneEspacios") LINE000("EsteTextoNoTieneEspacios") LINE011("EsteTextoNoTieneEspacios") LINE110("EsteTextoNoTieneEspacios") } TEST_CASE("low lines") { TEXT ("_l_o_w_ _l_i_n_e_") LEFT ("_l_o_w_ _l_i_n_e_") RIGHT ("_l_o_w_ _l_i_n_e_") INSIDE ("_l_o_w_ _l_i_n_e_") TRIM ("_l_o_w_ _l_i_n_e_") ALL ("_l_o_w_ _l_i_n_e_") LINE000("_l_o_w_ _l_i_n_e_") LINE011("_l_o_w_ _l_i_n_e_") LINE110("_l_o_w_ _l_i_n_e_") } //B11291 TEST_CASE("Seafood") { TEXT (" I am on a seafood diet. I see food, and I eat it. ") LEFT ("I am on a seafood diet. I see food, and I eat it. ") RIGHT (" I am on a seafood diet. I see food, and I eat it.") INSIDE (" I am on a seafood diet. I see food, and I eat it. ") TRIM ("I am on a seafood diet. I see food, and I eat it.") ALL ("I am on a seafood diet. I see food, and I eat it.") LINE000(" I am on a seafood diet. I see food, and I eat it. ") LINE011(" I am on a seafood diet. I see food, and I eat it.") LINE110("I am on a seafood diet. I see food, and I eat it. ") } TEST_CASE("Eyes") { TEXT (" Sometimes when I close my eyes, I can't see. ") LEFT ("Sometimes when I close my eyes, I can't see. ") RIGHT (" Sometimes when I close my eyes, I can't see.") INSIDE (" Sometimes when I close my eyes, I can't see. ") TRIM ("Sometimes when I close my eyes, I can't see.") ALL ("Sometimes when I close my eyes, I can't see.") LINE000(" Sometimes when I close my eyes, I can't see. ") LINE011(" Sometimes when I close my eyes, I can't see.") LINE110("Sometimes when I close my eyes, I can't see. ") } TEST_CASE("Nothing") { TEXT (" Who says nothing is impossible? I've been doing nothing for years. ") LEFT ("Who says nothing is impossible? I've been doing nothing for years. ") RIGHT (" Who says nothing is impossible? I've been doing nothing for years.") INSIDE (" Who says nothing is impossible? I've been doing nothing for years. ") TRIM ("Who says nothing is impossible? I've been doing nothing for years.") ALL ("Who says nothing is impossible? I've been doing nothing for years.") LINE000(" Who says nothing is impossible? I've been doing nothing for years. ") LINE011(" Who says nothing is impossible? I've been doing nothing for years.") LINE110("Who says nothing is impossible? I've been doing nothing for years. ") } //B20501 TEST_CASE("dabale-arroz-a-la-zorra-del-abad") { TEXT (" dabale arroz a la zorra del abad \n") LEFT ("dabale arroz a la zorra del abad \n") RIGHT (" dabale arroz a la zorra del abad") INSIDE (" dabale arroz a la zorra del abad \n") TRIM ("dabale arroz a la zorra del abad") ALL ("dabale arroz a la zorra del abad") LINE000(" dabale arroz a la zorra del abad \n") LINE011(" dabale arroz a la zorra del abad") LINE110("dabale arroz a la zorra del abad \n") } TEST_CASE("I'm-just-a-test-case") { TEXT (" \n\t I'm just a \n\t test case ") LEFT ("I'm just a \n\t test case ") RIGHT (" \n\t I'm just a \n\t test case") INSIDE (" \n\t I'm just a test case ") TRIM ("I'm just a \n\t test case") ALL ("I'm just a test case") LINE000(" \n\t I'm just a \n\t test case ") LINE011(" \n\t I'm just a test case") LINE110("I'm just a test case ") } TEST_CASE("|@#~½¬{[]}!") { TEXT ("\n|\n@\n#\n~\n½\n¬\n{\n[\n]\n}\n!\n") LEFT ("|\n@\n#\n~\n½\n¬\n{\n[\n]\n}\n!\n") RIGHT ("\n|\n@\n#\n~\n½\n¬\n{\n[\n]\n}\n!") INSIDE ("\n| @ # ~ ½ ¬ { [ ] } !\n") TRIM ("|\n@\n#\n~\n½\n¬\n{\n[\n]\n}\n!") ALL ("| @ # ~ ½ ¬ { [ ] } !") LINE000("\n|\n@\n#\n~\n½\n¬\n{\n[\n]\n}\n!\n") LINE011("\n| @ # ~ ½ ¬ { [ ] } !") LINE110("| @ # ~ ½ ¬ { [ ] } !\n") } //B25692 TEST_CASE("carlos-case-1") { TEXT (" Something. Here .notHere") LEFT ("Something. Here .notHere") RIGHT (" Something. Here .notHere") INSIDE (" Something. Here .notHere") TRIM ("Something. Here .notHere") ALL ("Something. Here .notHere") LINE000(" Something. Here .notHere") LINE011(" Something. Here .notHere") LINE110("Something. Here .notHere") } TEST_CASE("carlos-case-2") { TEXT ("m\t\t\n\t\t\nm") LEFT ("m\t\t\n\t\t\nm") RIGHT ("m\t\t\n\t\t\nm") INSIDE ("m m") TRIM ("m\t\t\n\t\t\nm") ALL ("m m") LINE000("m\t\t\n\t\t\nm") LINE011("m m") LINE110("m m") } TEST_CASE("carlos-case-3") { TEXT (" \t\n\r\vNo \t\n\r\vSe \t\n\r\vQue \t\n\r\vMas \t\n\r\vPoner \t\n\r\v") LEFT ("No \t\n\r\vSe \t\n\r\vQue \t\n\r\vMas \t\n\r\vPoner \t\n\r\v") RIGHT (" \t\n\r\vNo \t\n\r\vSe \t\n\r\vQue \t\n\r\vMas \t\n\r\vPoner") INSIDE (" \t\n\r\vNo Se Que Mas Poner \t\n\r\v") TRIM ("No \t\n\r\vSe \t\n\r\vQue \t\n\r\vMas \t\n\r\vPoner") ALL ("No Se Que Mas Poner") LINE000(" \t\n\r\vNo \t\n\r\vSe \t\n\r\vQue \t\n\r\vMas \t\n\r\vPoner \t\n\r\v") LINE011(" \t\n\r\vNo Se Que Mas Poner") LINE110("No Se Que Mas Poner \t\n\r\v") } //B30210 TEST_CASE("Hello world") { TEXT ("\t\n\t\n Hello World \n\t\n\n ") LEFT ("Hello World \n\t\n\n ") RIGHT ("\t\n\t\n Hello World") INSIDE ("\t\n\t\n Hello World \n\t\n\n ") TRIM ("Hello World") ALL ("Hello World") LINE000("\t\n\t\n Hello World \n\t\n\n ") LINE011("\t\n\t\n Hello World") LINE110("Hello World \n\t\n\n ") } TEST_CASE("Chata") { TEXT ("\t\n\t\n q \n\t\n\n me dice pa \n\t\n\n ") LEFT ("q \n\t\n\n me dice pa \n\t\n\n ") RIGHT ("\t\n\t\n q \n\t\n\n me dice pa") INSIDE ("\t\n\t\n q me dice pa \n\t\n\n ") TRIM ("q \n\t\n\n me dice pa") ALL ("q me dice pa") LINE000("\t\n\t\n q \n\t\n\n me dice pa \n\t\n\n ") LINE011("\t\n\t\n q me dice pa") LINE110("q me dice pa \n\t\n\n ") } TEST_CASE("Chivis") { TEXT ("\t\n\t\n me volvi emoshithop !!11 \n\t\n\n ") LEFT ("me volvi emoshithop !!11 \n\t\n\n ") RIGHT ("\t\n\t\n me volvi emoshithop !!11") INSIDE ("\t\n\t\n me volvi emoshithop !!11 \n\t\n\n ") TRIM ("me volvi emoshithop !!11") ALL ("me volvi emoshithop !!11") LINE000("\t\n\t\n me volvi emoshithop !!11 \n\t\n\n ") LINE011("\t\n\t\n me volvi emoshithop !!11") LINE110("me volvi emoshithop !!11 \n\t\n\n ") } //B32135 TEST_CASE("TEST-CASE-9 5 8") { TEXT (" TEST CASE 9 5 8 ") LEFT ("TEST CASE 9 5 8 ") RIGHT (" TEST CASE 9 5 8") INSIDE (" TEST CASE 9 5 8 ") TRIM ("TEST CASE 9 5 8") ALL ("TEST CASE 9 5 8") LINE000(" TEST CASE 9 5 8 ") LINE011(" TEST CASE 9 5 8") LINE110("TEST CASE 9 5 8 ") } TEST_CASE("TEST-CASE-SERIOUSLY LIFE") { TEXT (" Do not take life too seriously. You will never get out of it alive . ") LEFT ("Do not take life too seriously. You will never get out of it alive . ") RIGHT (" Do not take life too seriously. You will never get out of it alive .") INSIDE (" Do not take life too seriously. You will never get out of it alive . ") TRIM ("Do not take life too seriously. You will never get out of it alive .") ALL ("Do not take life too seriously. You will never get out of it alive .") LINE000(" Do not take life too seriously. You will never get out of it alive . ") LINE011(" Do not take life too seriously. You will never get out of it alive .") LINE110("Do not take life too seriously. You will never get out of it alive . ") } TEST_CASE("ENGINEERING FACT") { TEXT (" you Know you're in the wrong class when more than 3 students are female") LEFT ("you Know you're in the wrong class when more than 3 students are female") RIGHT (" you Know you're in the wrong class when more than 3 students are female") INSIDE (" you Know you're in the wrong class when more than 3 students are female") TRIM ("you Know you're in the wrong class when more than 3 students are female") ALL ("you Know you're in the wrong class when more than 3 students are female") LINE000(" you Know you're in the wrong class when more than 3 students are female") LINE011(" you Know you're in the wrong class when more than 3 students are female") LINE110("you Know you're in the wrong class when more than 3 students are female") } //B32973 TEST_CASE("sp-sp-ch-sp-ch-sp-sp") { TEXT (" ¿ ? ") LEFT ("¿ ? ") RIGHT (" ¿ ?") INSIDE (" ¿ ? ") TRIM ("¿ ?") ALL ("¿ ?") LINE000(" ¿ ? ") LINE011(" ¿ ?") LINE110("¿ ? ") } TEST_CASE("groot") { TEXT (" I am groot ") LEFT ("I am groot ") RIGHT (" I am groot") INSIDE (" I am groot ") TRIM ("I am groot") ALL ("I am groot") LINE000(" I am groot ") LINE011(" I am groot") LINE110("I am groot ") } TEST_CASE("4char") { TEXT ("¡¿?!") LEFT ("¡¿?!") RIGHT ("¡¿?!") INSIDE ("¡¿?!") TRIM ("¡¿?!") ALL ("¡¿?!") LINE000("¡¿?!") LINE011("¡¿?!") LINE110("¡¿?!") } //B34104 TEST_CASE("agua-de-rio-yo-me-llevo-to-lo-malo") { TEXT (" agua de rio yo me llevo to lo malo ") LEFT ("agua de rio yo me llevo to lo malo ") RIGHT (" agua de rio yo me llevo to lo malo") INSIDE (" agua de rio yo me llevo to lo malo ") TRIM ("agua de rio yo me llevo to lo malo") ALL ("agua de rio yo me llevo to lo malo") LINE000(" agua de rio yo me llevo to lo malo ") LINE011(" agua de rio yo me llevo to lo malo") LINE110("agua de rio yo me llevo to lo malo ") } TEST_CASE("tres-tristes-tigres") { TEXT (" tres tristes tigres ") LEFT ("tres tristes tigres ") RIGHT (" tres tristes tigres") INSIDE (" tres tristes tigres ") TRIM ("tres tristes tigres") ALL ("tres tristes tigres") LINE000(" tres tristes tigres ") LINE011(" tres tristes tigres") LINE110("tres tristes tigres ") } TEST_CASE("un-gato") { TEXT (" un gato") LEFT ("un gato") RIGHT (" un gato") INSIDE (" un gato") TRIM ("un gato") ALL ("un gato") LINE000(" un gato") LINE011(" un gato") LINE110("un gato") } //B34252 TEST_CASE("j-me-c-1") { TEXT (" Left inside & Right.") LEFT ("Left inside & Right.") RIGHT (" Left inside & Right.") INSIDE (" Left inside & Right.") TRIM ("Left inside & Right.") ALL ("Left inside & Right.") LINE000(" Left inside & Right.") LINE011(" Left inside & Right.") LINE110("Left inside & Right.") } TEST_CASE("j-me-c-2") { TEXT (" not really ") LEFT ("not really ") RIGHT (" not really") INSIDE (" not really ") TRIM ("not really") ALL ("not really") LINE000(" not really ") LINE011(" not really") LINE110("not really ") } TEST_CASE("j-me-c-3") { TEXT ("Random numbers 8 7 4 5 6 ") LEFT ("Random numbers 8 7 4 5 6 ") RIGHT ("Random numbers 8 7 4 5 6") INSIDE ("Random numbers 8 7 4 5 6 ") TRIM ("Random numbers 8 7 4 5 6") ALL ("Random numbers 8 7 4 5 6") LINE000("Random numbers 8 7 4 5 6 ") LINE011("Random numbers 8 7 4 5 6") LINE110("Random numbers 8 7 4 5 6 ") } //B34614 TEST_CASE("Christopher Mora Román") { TEXT (" ¿Falta mucho para Navidad? ") LEFT ("¿Falta mucho para Navidad? ") RIGHT (" ¿Falta mucho para Navidad?") INSIDE (" ¿Falta mucho para Navidad? ") TRIM ("¿Falta mucho para Navidad?") ALL ("¿Falta mucho para Navidad?") LINE000(" ¿Falta mucho para Navidad? ") LINE011(" ¿Falta mucho para Navidad?") LINE110("¿Falta mucho para Navidad? ") } TEST_CASE("Christopher Mora Román 2") { TEXT (" Que viva Saprissa, campeón nacional ") LEFT ("Que viva Saprissa, campeón nacional ") RIGHT (" Que viva Saprissa, campeón nacional") INSIDE (" Que viva Saprissa, campeón nacional ") TRIM ("Que viva Saprissa, campeón nacional") ALL ("Que viva Saprissa, campeón nacional") LINE000(" Que viva Saprissa, campeón nacional ") LINE011(" Que viva Saprissa, campeón nacional") LINE110("Que viva Saprissa, campeón nacional ") } TEST_CASE("Christopher Mora Román 3") { TEXT (" Los ornitorrincos son los únicos mamíferos que ponen huevos ") LEFT ("Los ornitorrincos son los únicos mamíferos que ponen huevos ") RIGHT (" Los ornitorrincos son los únicos mamíferos que ponen huevos") INSIDE (" Los ornitorrincos son los únicos mamíferos que ponen huevos ") TRIM ("Los ornitorrincos son los únicos mamíferos que ponen huevos") ALL ("Los ornitorrincos son los únicos mamíferos que ponen huevos") LINE000(" Los ornitorrincos son los únicos mamíferos que ponen huevos ") LINE011(" Los ornitorrincos son los únicos mamíferos que ponen huevos") LINE110("Los ornitorrincos son los únicos mamíferos que ponen huevos ") } //B34619 TEST_CASE("Shulk Time") { TEXT (" This is the power of the Banado ") LEFT ("This is the power of the Banado ") RIGHT (" This is the power of the Banado") INSIDE (" This is the power of the Banado ") TRIM ("This is the power of the Banado") ALL ("This is the power of the Banado") LINE000(" This is the power of the Banado ") LINE011(" This is the power of the Banado") LINE110("This is the power of the Banado ") } TEST_CASE("Waifus War") { TEXT (" Your waifu sucks ") LEFT ("Your waifu sucks ") RIGHT (" Your waifu sucks") INSIDE (" Your waifu sucks ") TRIM ("Your waifu sucks") ALL ("Your waifu sucks") LINE000(" Your waifu sucks ") LINE011(" Your waifu sucks") LINE110("Your waifu sucks ") } TEST_CASE("Noels Prince") { TEXT ("El delfin esta en el jacuzzi") LEFT ("El delfin esta en el jacuzzi") RIGHT ("El delfin esta en el jacuzzi") INSIDE ("El delfin esta en el jacuzzi") TRIM ("El delfin esta en el jacuzzi") ALL ("El delfin esta en el jacuzzi") LINE000("El delfin esta en el jacuzzi") LINE011("El delfin esta en el jacuzzi") LINE110("El delfin esta en el jacuzzi") } //B35033 TEST_CASE("tongue-twister-1") { TEXT (" Six thick thistle sticks. Six thick thistles stick. ") LEFT ("Six thick thistle sticks. Six thick thistles stick. ") RIGHT (" Six thick thistle sticks. Six thick thistles stick.") INSIDE (" Six thick thistle sticks. Six thick thistles stick. ") TRIM ("Six thick thistle sticks. Six thick thistles stick.") ALL ("Six thick thistle sticks. Six thick thistles stick.") LINE000(" Six thick thistle sticks. Six thick thistles stick. ") LINE011(" Six thick thistle sticks. Six thick thistles stick.") LINE110("Six thick thistle sticks. Six thick thistles stick. ") } TEST_CASE("tongue-twister-2") { TEXT ("Which wristwatches are Swiss wristwatches") LEFT ("Which wristwatches are Swiss wristwatches") RIGHT ("Which wristwatches are Swiss wristwatches") INSIDE ("Which wristwatches are Swiss wristwatches") TRIM ("Which wristwatches are Swiss wristwatches") ALL ("Which wristwatches are Swiss wristwatches") LINE000("Which wristwatches are Swiss wristwatches") LINE011("Which wristwatches are Swiss wristwatches") LINE110("Which wristwatches are Swiss wristwatches") } TEST_CASE("tongue-twister-3") { TEXT (" Flash message. Flash message. Flash message. Flash message. Flash message. Flash message. ") LEFT ("Flash message. Flash message. Flash message. Flash message. Flash message. Flash message. ") RIGHT (" Flash message. Flash message. Flash message. Flash message. Flash message. Flash message.") INSIDE (" Flash message. Flash message. Flash message. Flash message. Flash message. Flash message. ") TRIM ("Flash message. Flash message. Flash message. Flash message. Flash message. Flash message.") ALL ("Flash message. Flash message. Flash message. Flash message. Flash message. Flash message.") LINE000(" Flash message. Flash message. Flash message. Flash message. Flash message. Flash message. ") LINE011(" Flash message. Flash message. Flash message. Flash message. Flash message. Flash message.") LINE110("Flash message. Flash message. Flash message. Flash message. Flash message. Flash message. ") } //B37275 TEST_CASE("himno") { TEXT (" \t vivan siempre \t \t el trabajo y \t la paz\n\n") LEFT ("vivan siempre \t \t el trabajo y \t la paz\n\n") RIGHT (" \t vivan siempre \t \t el trabajo y \t la paz") INSIDE (" \t vivan siempre el trabajo y la paz\n\n") TRIM ("vivan siempre \t \t el trabajo y \t la paz") ALL ("vivan siempre el trabajo y la paz") LINE000(" \t vivan siempre \t \t el trabajo y \t la paz\n\n") LINE011(" \t vivan siempre el trabajo y la paz") LINE110("vivan siempre el trabajo y la paz\n\n") } TEST_CASE("sele") { TEXT ("\t\t\t\tviva \t\t \t la sele\t\t \n\n\n") LEFT ("viva \t\t \t la sele\t\t \n\n\n") RIGHT ("\t\t\t\tviva \t\t \t la sele") INSIDE ("\t\t\t\tviva la sele\t\t \n\n\n") TRIM ("viva \t\t \t la sele") ALL ("viva la sele") LINE000("\t\t\t\tviva \t\t \t la sele\t\t \n\n\n") LINE011("\t\t\t\tviva la sele") LINE110("viva la sele\t\t \n\n\n") } TEST_CASE("1995") { TEXT (" \t\t 1995 \n \n \n") LEFT ("1995 \n \n \n") RIGHT (" \t\t 1995") INSIDE (" \t\t 1995 \n \n \n") TRIM ("1995") ALL ("1995") LINE000(" \t\t 1995 \n \n \n") LINE011(" \t\t 1995") LINE110("1995 \n \n \n") } //B37620 TEST_CASE("Case_1_heiner") { TEXT ("\t\t\tdisappointed\tof\tblanquito\t\t\t") LEFT ("disappointed\tof\tblanquito\t\t\t") RIGHT ("\t\t\tdisappointed\tof\tblanquito") INSIDE ("\t\t\tdisappointed of blanquito\t\t\t") TRIM ("disappointed\tof\tblanquito") ALL ("disappointed of blanquito") LINE000("\t\t\tdisappointed\tof\tblanquito\t\t\t") LINE011("\t\t\tdisappointed of blanquito") LINE110("disappointed of blanquito\t\t\t") } TEST_CASE("Case_2_heiner") { TEXT ("saprissa\t1\tliga\t0\t\t\t") LEFT ("saprissa\t1\tliga\t0\t\t\t") RIGHT ("saprissa\t1\tliga\t0") INSIDE ("saprissa 1 liga 0\t\t\t") TRIM ("saprissa\t1\tliga\t0") ALL ("saprissa 1 liga 0") LINE000("saprissa\t1\tliga\t0\t\t\t") LINE011("saprissa 1 liga 0") LINE110("saprissa 1 liga 0\t\t\t") } TEST_CASE("Case_3_heiner") { TEXT ("\t\t\teccisetiembre2014\t\t\t") LEFT ("eccisetiembre2014\t\t\t") RIGHT ("\t\t\teccisetiembre2014") INSIDE ("\t\t\teccisetiembre2014\t\t\t") TRIM ("eccisetiembre2014") ALL ("eccisetiembre2014") LINE000("\t\t\teccisetiembre2014\t\t\t") LINE011("\t\t\teccisetiembre2014") LINE110("eccisetiembre2014\t\t\t") } //B37638 TEST_CASE("caso 1") { TEXT (" carlos cruzo el rio ") LEFT ("carlos cruzo el rio ") RIGHT (" carlos cruzo el rio") INSIDE (" carlos cruzo el rio ") TRIM ("carlos cruzo el rio") ALL ("carlos cruzo el rio") LINE000(" carlos cruzo el rio ") LINE011(" carlos cruzo el rio") LINE110("carlos cruzo el rio ") } TEST_CASE("caso 2") { TEXT (" el gato callo de pie ") LEFT ("el gato callo de pie ") RIGHT (" el gato callo de pie") INSIDE (" el gato callo de pie ") TRIM ("el gato callo de pie") ALL ("el gato callo de pie") LINE000(" el gato callo de pie ") LINE011(" el gato callo de pie") LINE110("el gato callo de pie ") } TEST_CASE("caso 3") { TEXT (" el arbol") LEFT ("el arbol") RIGHT (" el arbol") INSIDE (" el arbol") TRIM ("el arbol") ALL ("el arbol") LINE000(" el arbol") LINE011(" el arbol") LINE110("el arbol") } //B37822 TEST_CASE("monkey") { TEXT("\t\t\t hello my monkey \t\t\t ") LEFT("hello my monkey \t\t\t ") RIGHT("\t\t\t hello my monkey") INSIDE("\t\t\t hello my monkey \t\t\t ") TRIM("hello my monkey") ALL("hello my monkey") LINE000("\t\t\t hello my monkey \t\t\t ") LINE011("\t\t\t hello my monkey") LINE110("hello my monkey \t\t\t ") } TEST_CASE("poker") { TEXT(" poker i sg oo d \t\t\t ") LEFT("poker i sg oo d \t\t\t ") RIGHT(" poker i sg oo d") INSIDE(" poker i sg oo d \t\t\t ") TRIM("poker i sg oo d") ALL("poker i sg oo d") LINE000(" poker i sg oo d \t\t\t ") LINE011(" poker i sg oo d") LINE110("poker i sg oo d \t\t\t ") } TEST_CASE("line") { TEXT("\t\t\t Ihat em yc las sm at es\t\t\t ") LEFT("Ihat em yc las sm at es\t\t\t ") RIGHT("\t\t\t Ihat em yc las sm at es") INSIDE("\t\t\t Ihat em yc las sm at es\t\t\t ") TRIM("Ihat em yc las sm at es") ALL("Ihat em yc las sm at es") LINE000("\t\t\t Ihat em yc las sm at es\t\t\t ") LINE011("\t\t\t Ihat em yc las sm at es") LINE110("Ihat em yc las sm at es\t\t\t ") }