mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2025-08-06 13:50:49 +08:00
Merge pull request #185 from jsalling/feature/output-declaration
Add Unity Fixture to the travisCI build and restore header declaration of UNITY_OUTPUT_CHAR
This commit is contained in:
@ -4,3 +4,6 @@ rvm:
|
|||||||
- "2.0.0"
|
- "2.0.0"
|
||||||
script:
|
script:
|
||||||
- cd test && rake ci
|
- cd test && rake ci
|
||||||
|
- make -s
|
||||||
|
- cd ../extras/fixture/test && rake ci
|
||||||
|
- make -s default noStdlibMalloc
|
||||||
|
@ -7,11 +7,9 @@
|
|||||||
#include "unity.h"
|
#include "unity.h"
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
#ifndef UNITY_OUTPUT_CHAR_USE_PUTC
|
#ifdef UNITY_OMIT_OUTPUT_CHAR_HEADER_DECLARATION
|
||||||
//If defined as something else, make sure we declare it here so it's ready for use
|
int UNITY_OUTPUT_CHAR(int); //If omitted from header, declare it here so it's ready for use
|
||||||
extern int UNITY_OUTPUT_CHAR(int);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define UNITY_FAIL_AND_BAIL { Unity.CurrentTestFailed = 1; longjmp(Unity.AbortFrame, 1); }
|
#define UNITY_FAIL_AND_BAIL { Unity.CurrentTestFailed = 1; longjmp(Unity.AbortFrame, 1); }
|
||||||
#define UNITY_IGNORE_AND_BAIL { Unity.CurrentTestIgnored = 1; longjmp(Unity.AbortFrame, 1); }
|
#define UNITY_IGNORE_AND_BAIL { Unity.CurrentTestIgnored = 1; longjmp(Unity.AbortFrame, 1); }
|
||||||
/// return prematurely if we are already in failure or ignore state
|
/// return prematurely if we are already in failure or ignore state
|
||||||
|
@ -291,12 +291,11 @@ typedef UNITY_DOUBLE_TYPE _UD;
|
|||||||
//Default to using putchar, which is defined in stdio.h
|
//Default to using putchar, which is defined in stdio.h
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#define UNITY_OUTPUT_CHAR(a) putchar(a)
|
#define UNITY_OUTPUT_CHAR(a) putchar(a)
|
||||||
// We need to flag the output char function uses putc in
|
#else
|
||||||
// unity.c the extern function is not declared then.
|
//If defined as something else, make sure we declare it here so it's ready for use
|
||||||
// Previously the extern was declared in this header but
|
#ifndef UNITY_OMIT_OUTPUT_CHAR_HEADER_DECLARATION
|
||||||
// when redundant function declaration compiler flag is enabled
|
extern int UNITY_OUTPUT_CHAR(int);
|
||||||
// it wont compile.
|
#endif
|
||||||
#define UNITY_OUTPUT_CHAR_USE_PUTC
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef UNITY_PRINT_EOL
|
#ifndef UNITY_PRINT_EOL
|
||||||
|
@ -8,8 +8,6 @@
|
|||||||
#include "unity.h"
|
#include "unity.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
int putcharSpy(int c);
|
|
||||||
|
|
||||||
// Dividing by these constants produces +/- infinity.
|
// Dividing by these constants produces +/- infinity.
|
||||||
// The rationale is given in UnityAssertFloatIsInf's body.
|
// The rationale is given in UnityAssertFloatIsInf's body.
|
||||||
#ifndef UNITY_EXCLUDE_FLOAT
|
#ifndef UNITY_EXCLUDE_FLOAT
|
||||||
|
Reference in New Issue
Block a user