Xmega Application Note


suite.h File Reference

Test suite core declarations. More...

#include <compiler.h>
#include <stdio.h>
#include <progmem.h>
Include dependency graph for suite.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  test_case
 A single test case. More...
struct  test_suite
 A test suite. More...

Defines

#define __progmem_arg
 Progmem-related defines.
#define ARRAY_LEN(a)   (sizeof(a) / sizeof((a)[0]))
#define dbg(__fmt_)   printf_P(PSTR(__fmt_))
 Wrappers for printing debug-information.
#define dbg_error(_x,...)   printf_P(PSTR(_x), __VA_ARGS__)
#define dbg_info(__fmt_,...)   printf_P(PSTR(__fmt_), __VA_ARGS__)
#define dbg_putchar(c)   putc(c, stdout)
#define dbg_vprintf_pgm(...)   vfprintf_P(stdout, __VA_ARGS__)
#define DECLARE_TEST_SUITE(_sym)   const struct test_suite _sym
#define DEFINE_TEST_ARRAY(_sym)   const struct test_case *const _sym[]
 Convenience macro for creating an array of test cases.
#define DEFINE_TEST_CASE(_sym, _setup, _run, _cleanup, _name)
 Convenience macro for creating a test case struct.
#define DEFINE_TEST_SUITE(_sym, _test_array, _name)
 Convenience macro for creating a test suite.
#define test_fail(test, result,...)
 Fail the test.
#define test_fail_unless(test, condition,...)
 Verify that condition is true.

Enumerations

enum  test_status { TEST_PASS = 0, TEST_FAILED = 1 }
 

Status codes returned by test cases and fixtures.

More...

Functions

static void * test_get_data (void)
 Get the private data pointer for the current test.
void test_priv_fail (const struct test_case *test, int result, const char *file, unsigned int line, const char __progmem_arg *fmt,...)
static void test_set_data (void *data)
 Set private data pointer for the current test.
int test_suite_run (const struct test_suite *suite)
 Run a test suite.

Variables

void * test_priv_data

Detailed Description

Test suite core declarations.

Copyright (C) 2010 Atmel Corporation. All rights reserved.

Definition in file suite.h.

@DOC_TITLE@
Generated on Fri Oct 22 12:15:25 2010 for AVR1300 Using the Xmega ADC by doxygen 1.6.3