Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Diff: main.cpp
- Revision:
- 9:6e8964c19459
- Parent:
- 8:d8e9de797e90
--- a/main.cpp Sun Mar 05 16:47:15 2017 +0000
+++ b/main.cpp Mon Apr 16 17:53:30 2018 +0000
@@ -4,6 +4,10 @@
#include "N5110.h"
#include "PongEngine.h"
+#ifdef WITH_TESTING
+# include "tests.h"
+#endif
+
#define PADDLE_WIDTH 2
#define PADDLE_HEIGHT 10
#define BALL_RADIUS 2
@@ -28,6 +32,12 @@
///////////// functions ////////////////
int main()
{
+#ifdef WITH_TESTING
+ int n_failures = run_all_tests();
+
+ if(n_failures) return n_failures;
+#endif
+
int fps = 8;
// Initialise hardware