From 7ffbb05393e719cd55f1f6d1c012db8d5311044f Mon Sep 17 00:00:00 2001 From: KaffeeMaus Date: Fri, 26 Jan 2024 10:54:39 +0100 Subject: [PATCH] welcome message added --- src/main/c/Georg/tictactoe.c | 4 ++++ src/main/c/Georg/tictactoe.h | 1 + src/test/c/Georg/test_tictactoe.c | 10 ++++++++++ 3 files changed, 15 insertions(+) diff --git a/src/main/c/Georg/tictactoe.c b/src/main/c/Georg/tictactoe.c index 87680a0..c97a735 100644 --- a/src/main/c/Georg/tictactoe.c +++ b/src/main/c/Georg/tictactoe.c @@ -2,3 +2,7 @@ #include #include "tictactoe.h" + +char* getWelcomeMessage(){ + return "Hallo und willkommen zu unserem TicTacToe Spiel. Anbei die Anleitung:\n"; +} \ No newline at end of file diff --git a/src/main/c/Georg/tictactoe.h b/src/main/c/Georg/tictactoe.h index ca8f3ae..9ac6a1f 100644 --- a/src/main/c/Georg/tictactoe.h +++ b/src/main/c/Georg/tictactoe.h @@ -1,5 +1,6 @@ #ifndef TICTACTOE_H #define TICTACTOE_H +char* getWelcomeMessage(); #endif //TICTACTOE_H diff --git a/src/test/c/Georg/test_tictactoe.c b/src/test/c/Georg/test_tictactoe.c index 95b2edc..05fa62c 100644 --- a/src/test/c/Georg/test_tictactoe.c +++ b/src/test/c/Georg/test_tictactoe.c @@ -13,3 +13,13 @@ void test_compileTest_shutBeAllwaysTrue(void){ TEST_ASSERT_EQUAL_INT(1,1); } +void test_welcome_message(void){ + // arrange + char* expectedMessage = "Hallo und willkommen zu unserem TicTacToe Spiel. Anbei die Anleitung:\n"; + + // act + char* message = getWelcomeMessage(); + + // aassert + TEST_ASSERT_EQUAL_STRING(expectedMessage, message); +} \ No newline at end of file