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.
tests/test.c
- Committer:
- Patrick Barrett
- Date:
- 2015-01-07
- Revision:
- 29:004c318e63fa
- Parent:
- 0:c7393ae16c16
File content as of revision 29:004c318e63fa:
#include <stdio.h> #include <string.h> #include "minunit.h" #include "../src/exosite.h" int tests_run = 0; static char * test_math() { mu_assert("[ERROR] 2+2 != 4", 2+2 == 4); return 0; } static char * all_tests() { // Make Sure the Tests Are Working mu_run_test(test_math); // Actually Run the Real Tests return 0; } int main(int argc, char **argv) { char *result = all_tests(); if (result != 0) { printf("%s\n", result); } else { printf("ALL TESTS PASSED\n"); } printf("Tests run: %d\n", tests_run); return result != 0; }