test: fix test cases and add new test function
[simavr] / tests / test_atmega88_vcd.c
1 #include "sim_avr.h"
2 #include "avr_ioport.h"
3 #include "sim_vcd_file.h"
4
5 #include "tests.h"
6
7 int main(int argc, char **argv) {
8         tests_init(argc, argv);
9
10
11         avr_t *avr = tests_init_avr("atmega88_vcd.axf");
12
13         avr_vcd_t vcd_file;
14         avr_vcd_init(avr, "atmega88_vcd.vcd", &vcd_file, 10000);
15         avr_vcd_add_signal(&vcd_file, avr_io_getirq(avr, AVR_IOCTL_IOPORT_GETIRQ('B'), IOPORT_IRQ_PIN0), 1, "PB0" );
16         avr_vcd_start(&vcd_file);
17
18         tests_run_test(avr, 10000);
19
20         avr_vcd_stop(&vcd_file);
21         tests_success();
22         return 0;
23 }