Skip to content

Commit 28b0d95

Browse files
committed
Fixed unit tests
1 parent 416016e commit 28b0d95

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

.vscode/extensions.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
{
2-
// See http://go.microsoft.com/fwlink/?LinkId=827846
3-
// for the documentation about the extensions.json format
4-
"recommendations": [
5-
"platformio.platformio-ide"
6-
]
7-
}
1+
{
2+
// See http://go.microsoft.com/fwlink/?LinkId=827846
3+
// for the documentation about the extensions.json format
4+
"recommendations": [
5+
"platformio.platformio-ide"
6+
]
7+
}

lib/Battleship.DisplayManager/DisplayManager.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ DisplayManager::DisplayManager(){
77
int DisplayManager::AddPage(Page page){
88
OutputBuffer.insert(OutputBuffer.end(), page);
99
CurrentPage++;
10+
return CurrentPage;
1011
}
1112

1213
Page & DisplayManager::GetLastPage(){

test/test_DisplayManager.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -130,5 +130,6 @@ int test_DisplayManager::runDisplayManagerTests( int argc, char **argv) {
130130
RUN_TEST(test_UpdateExistingPage);
131131
RUN_TEST(test_CurrentPageIsLastPage);
132132
RUN_TEST(test_CurrentPageIsNotLastPage);
133+
return 0;
133134
}
134135
#endif

test/test_GameController.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,13 @@ void test_ShouldNotHitShip() {
8080
}
8181

8282
int test_GameController::runGameControllerTests( int argc, char **argv) {
83-
//UNITY_BEGIN();
8483
RUN_TEST(test_StringConcat);
8584
RUN_TEST(test_CharToLetter_A);
8685
RUN_TEST(test_CharToLetter_B);
8786
RUN_TEST(test_PositionToString);
8887
RUN_TEST(test_dummy);
8988
RUN_TEST(test_ShouldHitShip);
9089
RUN_TEST(test_ShouldNotHitShip);
91-
//UNITY_END();
90+
return 0;
9291
}
9392
#endif

0 commit comments

Comments
 (0)