Browse Source

welcome message added

remotes/origin/georg
KaffeeMaus 11 months ago
parent
commit
7ffbb05393
  1. 4
      src/main/c/Georg/tictactoe.c
  2. 1
      src/main/c/Georg/tictactoe.h
  3. 10
      src/test/c/Georg/test_tictactoe.c

4
src/main/c/Georg/tictactoe.c

@ -2,3 +2,7 @@
#include <stdlib.h> #include <stdlib.h>
#include "tictactoe.h" #include "tictactoe.h"
char* getWelcomeMessage(){
return "Hallo und willkommen zu unserem TicTacToe Spiel. Anbei die Anleitung:\n";
}

1
src/main/c/Georg/tictactoe.h

@ -1,5 +1,6 @@
#ifndef TICTACTOE_H #ifndef TICTACTOE_H
#define TICTACTOE_H #define TICTACTOE_H
char* getWelcomeMessage();
#endif //TICTACTOE_H #endif //TICTACTOE_H

10
src/test/c/Georg/test_tictactoe.c

@ -13,3 +13,13 @@ void test_compileTest_shutBeAllwaysTrue(void){
TEST_ASSERT_EQUAL_INT(1,1); 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);
}
Loading…
Cancel
Save