Atmel Software Framework

suite.c File Reference

Test suite core functionality.

Copyright (c) 2011-2013 Atmel Corporation. All rights reserved.

#include <compiler.h>
#include <setjmp.h>
#include <stdarg.h>
#include <stdio.h>
#include "suite.h"


static int test_call (void(*func)(const struct test_case *), const struct test_case *test)
 Call a test or fixture function. More...
void test_case_fail (const struct test_case *test, int result, const char *file, unsigned int line, const char *fmt,...)
 Report a failure and jump out of current test case function. More...
static int test_case_run (const struct test_case *test)
 Run a test case. More...
static void test_report_failure (const struct test_case *test, const char *stage, int result)
 Report a failing test stage. More...
Test suite interaction
int test_suite_run (const struct test_suite *suite)
 Run a test suite. More...


struct test_casetest_case_ptr = NULL
 Pointer to current test case. More...
static jmp_buf test_failure_jmpbuf
 Context saved before executing a test or fixture function. More...
void * test_priv_data
 Data pointer for test cases. More...