1
0
mirror of https://github.com/ThrowTheSwitch/Unity.git synced 2026-01-27 02:11:36 +01:00

rearranged project to centralize all self-test stuff under test directory. only pull in includes when required.

This commit is contained in:
Mark VanderVoord
2014-07-30 10:14:02 -04:00
parent f8f5c39e26
commit bff1fc68cb
25 changed files with 116 additions and 149 deletions

View File

@@ -5,8 +5,6 @@
============================================================================ */
#include "unity.h"
#include <stdio.h>
#include <string.h>
#define UNITY_FAIL_AND_BAIL { Unity.CurrentTestFailed = 1; longjmp(Unity.AbortFrame, 1); }
#define UNITY_IGNORE_AND_BAIL { Unity.CurrentTestIgnored = 1; longjmp(Unity.AbortFrame, 1); }
@@ -231,6 +229,7 @@ void UnityPrintMask(const _U_UINT mask, const _U_UINT number)
//-----------------------------------------------
#ifdef UNITY_FLOAT_VERBOSE
#include <string.h>
void UnityPrintFloat(_UF number)
{
char TempBuffer[32];

View File

@@ -6,7 +6,6 @@
#ifndef UNITY_FRAMEWORK_H
#define UNITY_FRAMEWORK_H
#define UNITY
#include "unity_internals.h"
@@ -268,4 +267,6 @@
#define TEST_ASSERT_DOUBLE_IS_NOT_NEG_INF_MESSAGE(actual, message) UNITY_TEST_ASSERT_DOUBLE_IS_NOT_NEG_INF(actual, __LINE__, message)
#define TEST_ASSERT_DOUBLE_IS_NOT_NAN_MESSAGE(actual, message) UNITY_TEST_ASSERT_DOUBLE_IS_NOT_NAN(actual, __LINE__, message)
#define TEST_ASSERT_DOUBLE_IS_NOT_DETERMINATE_MESSAGE(actual, message) UNITY_TEST_ASSERT_DOUBLE_IS_NOT_DETERMINATE(actual, __LINE__, message)
//end of UNITY_FRAMEWORK_H
#endif

View File

@@ -11,7 +11,6 @@
#include "unity_config.h"
#endif
#include <stdio.h>
#include <setjmp.h>
// Unity Attempts to Auto-Detect Integer Types
@@ -241,7 +240,7 @@ typedef UNITY_FLOAT_TYPE _UF;
#else
//Floating Point Support
//Double Floating Point Support
#ifndef UNITY_DOUBLE_PRECISION
#define UNITY_DOUBLE_PRECISION (1e-12f)
#endif
@@ -252,16 +251,27 @@ typedef UNITY_DOUBLE_TYPE _UD;
#endif
#ifdef UNITY_DOUBLE_VERBOSE
#ifndef UNITY_FLOAT_VERBOSE
#define UNITY_FLOAT_VERBOSE
#endif
#endif
//-------------------------------------------------------
// Output Method
//-------------------------------------------------------
#ifndef UNITY_OUTPUT_CHAR
//Default to using putchar, which is defined in stdio.h above
//Default to using putchar, which is defined in stdio.h
#include <stdio.h>
#define UNITY_OUTPUT_CHAR(a) putchar(a)
#else
//If defined as something else, make sure we declare it here so it's ready for use
extern int UNITY_OUTPUT_CHAR(int);
#endif
//-------------------------------------------------------
@@ -674,4 +684,5 @@ extern const char* UnityStrErr64;
#define UNITY_TEST_ASSERT_DOUBLE_IS_NOT_DETERMINATE(actual, line, message) UnityAssertDoubleSpecial((_UD)(actual), (message), (UNITY_LINE_TYPE)line, UNITY_FLOAT_IS_NOT_DET)
#endif
//End of UNITY_INTERNALS_H
#endif