Mercurial > ~darius > hgwebdir.cgi > stm32temp
changeset 22:198ac9d95770
Add test for assert
author | Daniel O'Connor <darius@dons.net.au> |
---|---|
date | Sat, 17 Nov 2012 12:14:38 +1030 |
parents | bd8e2cf04034 |
children | 2bce4dbf52b8 |
files | main.c |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/main.c Thu Nov 15 23:40:51 2012 +1030 +++ b/main.c Sat Nov 17 12:14:38 2012 +1030 @@ -6,6 +6,7 @@ #include <string.h> #include <sys/time.h> #include <stdlib.h> +#include <assert.h> #include "stm32f10x.h" @@ -323,6 +324,8 @@ printf("%hd.%02hd\r\n", GETWHOLE(res), GETFRAC(res)); break; } + } else if (!strcmp("assert", argv[0])) { + assert(0 == 1); } else if (!strcmp("zz", argv[0])) { NVIC_SystemReset(); } else {