File: test_atmega88_timer16.c

package info (click to toggle)
simavr 1.6%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 20,268 kB
  • sloc: ansic: 362,806; makefile: 622; ruby: 70; python: 63
file content (20 lines) | stat: -rw-r--r-- 528 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include "tests.h"

int main(int argc, char **argv) {
	tests_init(argc, argv);
	enum tests_finish_reason reason =
		tests_init_and_run_test("atmega88_timer16.axf", 10000000);
	switch(reason) {
	case LJR_CYCLE_TIMER:
		fail("Test failed to finish properly; reason=%d, cycles=%"
		     PRI_avr_cycle_count, reason, tests_cycle_count);
		break;
	case LJR_SPECIAL_DEINIT:
		break;
	default:
		fail("This should not be reached; reason=%d", reason);
	}
	tests_assert_cycles_between(12500000, 12500300);
	tests_success();
	return 0;
}