File: test.h

package info (click to toggle)
cfengine3 3.6.2-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 20,256 kB
  • ctags: 9,613
  • sloc: ansic: 116,129; sh: 12,366; yacc: 1,088; makefile: 1,006; lex: 391; perl: 197; xml: 21; sed: 4
file content (33 lines) | stat: -rw-r--r-- 900 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* ALWAYS INCLUDE FIRST, so that platform.h is included first as well! */


#ifndef CFENGINE_TEST_H
#define CFENGINE_TEST_H

#include <platform.h>

#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <cmockery.h>
#include <stdio.h>


/* Use this define for specific overrides inside all our source tree. */
#define CFENGINE_TEST


char *file_read_string(FILE *in);

void assert_file_equal(FILE *a, FILE *b);

#define assert_double_close(a, b) _assert_double_close(a, b, __FILE__, __LINE__)

void _assert_double_close(double left, double right, const char *const file, const int line);

#define PRINT_TEST_BANNER()                                             \
    printf("==================================================\n");     \
    printf("Starting test: %s\n", __FILE__);                            \
    printf("==================================================\n")

#endif