Ben Evans / Mbed 2 deprecated Defender_Game

Dependencies:   mbed

Revision:
12:1c0b6796aaca
Parent:
11:ab578a151f67
Child:
13:12276eed13ac
diff -r ab578a151f67 -r 1c0b6796aaca test.h
--- a/test.h	Thu Apr 23 18:17:28 2020 +0000
+++ b/test.h	Fri Apr 24 19:09:22 2020 +0000
@@ -2,12 +2,7 @@
 #define TESTS_H
 
 #include "Spaceship_test.h"
-
-/**
- * @brief Run all the tests for this program
- *
- * @returns The number of tests that failed
- */
+#include "Map_test.h"
  
 /** Test
 @brief Runs all tests for game 
@@ -23,7 +18,22 @@
     // Prints spaceshp test results
     usb.printf("spaceship_movement_test = ");
     if (spaceship_test_result) {
-        usb.printf("passed"); 
+        usb.printf("passed\n"); 
+    }
+    else {
+        usb.printf("failed\n"); 
+    }
+}
+
+void run_map_tests(){
+    Serial usb(USBTX, USBRX); 
+    // Runs map test 
+    bool map_test_result = map_draw_test();
+    
+    // Prints map test results
+    usb.printf("map_draw_test = ");
+    if (map_test_result) {
+        usb.printf("passed\n"); 
     }
     else {
         usb.printf("failed\n");