aboutsummaryrefslogtreecommitdiff
path: root/test9.c
diff options
context:
space:
mode:
authorMichael Davidsaver <mdavidsaver@gmail.com>2016-07-08 22:16:19 -0400
committerMichael Davidsaver <mdavidsaver@gmail.com>2016-07-08 22:56:45 -0400
commit47779efb1de37bb9b564b1fdc3cb6f1d5c662956 (patch)
tree45a7e4539d5736fb3479ec3a7b3b5b74698339d7 /test9.c
parent21f36fc59dce0b29239f3efd34700322556e9430 (diff)
testme for 1 and 9
Diffstat (limited to 'test9.c')
-rw-r--r--test9.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/test9.c b/test9.c
index 05ce68d..dc5aa41 100644
--- a/test9.c
+++ b/test9.c
@@ -1,21 +1,11 @@
/* Capture initial register states
*/
#include "armv7m.h"
+#include "testme.h"
char _main_stack_top;
-static
-void test_equal(const char *msg, uint32_t lhs, uint32_t rhs)
-{
- puts(lhs==rhs ? "ok - " : "fail - ");
- puthex(lhs);
- puts(" == ");
- puthex(rhs);
- puts(" # ");
- puts(msg);
- putc('\n');
-}
-
+/* defintion must match test-m-test9.S */
struct early_state_t {
uint32_t LR;
uint32_t XPSR;
@@ -42,7 +32,8 @@ struct early_state_t {
void main(void)
{
-#define TEST(FLD, VAL) test_equal(#FLD, early_state.FLD, VAL)
+ testInit(20);
+#define TEST(FLD, VAL) testEqI(VAL, early_state.FLD, #FLD)
TEST(marker, 0xdeadbeaf); /* check consistency w/ init-m-test9.S */
TEST(LR, 0xffffffff);
TEST(XPSR, 0);
@@ -72,5 +63,4 @@ void main(void)
puthex(early_state.mpu_type);
putc('\n');
TEST(mpu_ctrl, 0);
- puts("Done\n");
}