diff options
Diffstat (limited to 'test/ui/v1/mbops/ui.c')
| -rw-r--r-- | test/ui/v1/mbops/ui.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/test/ui/v1/mbops/ui.c b/test/ui/v1/mbops/ui.c new file mode 100644 index 0000000..8a92d6f --- /dev/null +++ b/test/ui/v1/mbops/ui.c @@ -0,0 +1,36 @@ +#if !defined(COMMAND_NEW) +#error +#endif + +int main(void) { + salis_init(); + + while (g_cores->pvec->ip < ANC_SIZE) { + bool on_swap = mvec_get_inst(g_cores, g_cores->pvec->ip) == bswp; + bool on_clear = mvec_get_inst(g_cores, g_cores->pvec->ip) == bclr; + + uint64_t mb0a = g_cores->pvec->mb0a; + uint64_t mb0s = g_cores->pvec->mb0s; + uint64_t mb1a = g_cores->pvec->mb1a; + uint64_t mb1s = g_cores->pvec->mb1s; + + salis_step(1); + + if (on_swap) { + if (mb1s) { + assert(g_cores->pvec->mb0a == mb1a); + assert(g_cores->pvec->mb0s == mb1s); + assert(g_cores->pvec->mb1a == mb0a); + assert(g_cores->pvec->mb1s == mb0s); + } + } + + if (on_clear) { + assert(g_cores->pvec->mb1a == 0); + assert(g_cores->pvec->mb1s == 0); + } + } + + salis_free(); + return 0; +} |
