From 5458590d66fcea3f6c2fd3749e33024e68abf57a Mon Sep 17 00:00:00 2001 From: Jason Peters Date: Mon, 5 Feb 2024 17:12:27 +0100 Subject: [PATCH] =?UTF-8?q?Test=20auf=20korrekte=20Baumkrome=20hinzugef?= =?UTF-8?q?=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/test/c/Jason/test_ASCII_art.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/test/c/Jason/test_ASCII_art.c b/src/test/c/Jason/test_ASCII_art.c index d263a0b..cd7e2e5 100644 --- a/src/test/c/Jason/test_ASCII_art.c +++ b/src/test/c/Jason/test_ASCII_art.c @@ -138,6 +138,21 @@ void test_wirdKleinesDreieckKorrektBefuellt(void){ befuellenDesDreiecksMitZeilenumbruechen(message, 2, 5); + // assert + TEST_ASSERT_EQUAL_STRING(expectedMessage, message); +} + +void test_wirdKleinesBaumkroneKorrektBefuelld(void){ + // arrange + char expectedMessage[] = " + \n+++"; + + // act + char message[9]; + befuellenDesWeihnachtsbaumsMitLeerzeichen(message, 8); + befuellenDesWeihnachtsbaumsMitPlus(message, 4, (3-1)); + befuellenDesWeihnachtsbaumsMitZeilenumbruechen(message, 3, 4); + + // assert TEST_ASSERT_EQUAL_STRING(expectedMessage, message); } \ No newline at end of file