acpc_dealer 2.0.6 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +4 -2
- data/lib/acpc_dealer.rb +6 -2
- data/lib/acpc_dealer/version.rb +1 -1
- data/vendor/project_acpc_server/Makefile +12 -2
- data/vendor/project_acpc_server/README +1 -0
- data/vendor/project_acpc_server/example_player.limit.2p.sh +2 -1
- data/vendor/project_acpc_server/example_player.limit.3p.sh +2 -1
- data/vendor/project_acpc_server/example_player.nolimit.2p.sh +2 -1
- data/vendor/project_acpc_server/example_player.nolimit.3p.sh +2 -1
- data/vendor/project_acpc_server/kuhn.limit.3p.game +14 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player.sf1.sh +3 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player.sf2.sh +3 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player.sf3.sh +3 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/LICENCE +23 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/Makefile +128 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/README.md +35 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/src/CExceptionConfig.h +12 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/src/dealer_connection.c +49 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/src/dealer_connection.h +22 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/src/kuhn_3p_equilibrium_player.c +483 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/src/kuhn_3p_equilibrium_player.h +107 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/src/main.c +84 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/src/player_config.c +252 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/src/player_config.h +21 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/test/support/test_helper.c +45 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/test/support/test_helper.h +27 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/test/test_kuhn_3p_equilibrium_player.c +698 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/test/test_kuhn_3p_equilibrium_player_sub_family_1.c +324 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/test/test_kuhn_3p_equilibrium_player_sub_family_2.c +262 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/test/test_kuhn_3p_equilibrium_player_sub_family_3.c +177 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cexception/docs/CExceptionSummary.odt +0 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cexception/docs/CExceptionSummary.pdf +0 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cexception/docs/license.txt +30 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cexception/docs/readme.txt +242 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cexception/lib/CException.c +43 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cexception/lib/CException.h +86 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cexception/release/build.info +2 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cexception/release/version.info +2 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/config/production_environment.rb +14 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/config/test_environment.rb +16 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/docs/CMock Summary.odt +0 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/docs/CMock Summary.pdf +0 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/docs/CMock_Summary.md +356 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/docs/license.txt +31 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v4/Resource/SAM7_FLASH.mac +71 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v4/Resource/SAM7_RAM.mac +94 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v4/Resource/SAM7_SIM.mac +67 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v4/Resource/at91SAM7X256_FLASH.xcl +185 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v4/Resource/at91SAM7X256_RAM.xcl +185 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v4/Resource/ioat91sam7x256.ddf +2259 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v4/cmock_demo.dep +3691 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v4/cmock_demo.ewd +1696 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v4/cmock_demo.ewp +2581 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v4/cmock_demo.eww +10 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v4/incIAR/AT91SAM7X-EK.h +61 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v4/incIAR/AT91SAM7X256.inc +2314 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v4/incIAR/AT91SAM7X256.rdf +4704 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v4/incIAR/AT91SAM7X256.tcl +3407 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v4/incIAR/AT91SAM7X256_inc.h +2268 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v4/incIAR/ioat91sam7x256.h +4380 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v4/incIAR/lib_AT91SAM7X256.h +4211 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v4/settings/cmock_demo.cspy.bat +32 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v4/settings/cmock_demo.dbgdt +86 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v4/settings/cmock_demo.dni +42 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v4/settings/cmock_demo.wsdt +76 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v4/srcIAR/Cstartup.s79 +266 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v4/srcIAR/Cstartup_SAM7.c +98 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/Resource/SAM7_FLASH.mac +71 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/Resource/SAM7_RAM.mac +94 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/Resource/SAM7_SIM.mac +67 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/Resource/at91SAM7X256_FLASH.icf +43 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/Resource/at91SAM7X256_RAM.icf +42 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/cmock_demo.dep +4204 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/cmock_demo.ewd +1906 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/cmock_demo.ewp +2426 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/cmock_demo.eww +26 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/incIAR/AT91SAM7X-EK.h +61 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/incIAR/AT91SAM7X256_inc.h +2268 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/incIAR/lib_AT91SAM7X256.h +4211 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/incIAR/project.h +30 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/settings/BasicInterrupt_SAM7X.cspy.bat +33 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/settings/BasicInterrupt_SAM7X.dbgdt +5 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/settings/BasicInterrupt_SAM7X.dni +18 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/settings/BasicInterrupt_SAM7X.wsdt +74 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/settings/BasicInterrupt_SAM7X_FLASH_Debug.jlink +12 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/settings/cmock_demo.cspy.bat +33 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/settings/cmock_demo.dbgdt +85 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/settings/cmock_demo.dni +44 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/settings/cmock_demo.wsdt +73 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/settings/cmock_demo_Binary.jlink +12 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/settings/cmock_demo_FLASH_Debug.jlink +12 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/settings/cmock_demo_RAM_Debug.jlink +12 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/srcIAR/Cstartup.s +299 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/iar/iar_v5/srcIAR/Cstartup_SAM7.c +98 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/lib/cmock.rb +65 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/lib/cmock_config.rb +129 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/lib/cmock_file_writer.rb +33 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/lib/cmock_generator.rb +195 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/lib/cmock_generator_plugin_array.rb +57 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/lib/cmock_generator_plugin_callback.rb +78 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/lib/cmock_generator_plugin_cexception.rb +51 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/lib/cmock_generator_plugin_expect.rb +86 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/lib/cmock_generator_plugin_ignore.rb +95 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/lib/cmock_generator_plugin_ignore_arg.rb +44 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/lib/cmock_generator_plugin_return_thru_ptr.rb +74 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/lib/cmock_generator_utils.rb +202 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/lib/cmock_header_parser.rb +277 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/lib/cmock_plugin_manager.rb +40 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/lib/cmock_unityhelper_parser.rb +75 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/release/build.info +2 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/release/version.info +2 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/src/cmock.c +176 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/src/cmock.h +31 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/src/cmock_internals.h +43 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/targets/gcc.yml +53 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/targets/iar_arm_v4.yml +108 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/cmock/targets/iar_arm_v5.yml +93 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/commander.c/History.md +27 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/commander.c/Makefile +8 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/commander.c/Readme.md +103 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/commander.c/package.json +9 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/commander.c/src/commander.c +250 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/commander.c/src/commander.h +88 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/commander.c/test.c +34 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/unity/auto/colour_prompt.rb +94 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/unity/auto/colour_reporter.rb +39 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/unity/auto/generate_config.yml +36 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/unity/auto/generate_module.rb +202 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/unity/auto/generate_test_runner.rb +316 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/unity/auto/test_file_filter.rb +23 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/unity/auto/unity_test_summary.rb +139 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/unity/docs/Unity Summary.odt +0 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/unity/docs/Unity Summary.pdf +0 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/unity/docs/Unity Summary.txt +216 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/unity/docs/license.txt +31 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/unity/release/build.info +2 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/unity/release/version.info +2 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/unity/src/unity.c +1146 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/unity/src/unity.h +245 -0
- data/vendor/project_acpc_server/kuhn_3p_equilibrium_player/vendor/unity/src/unity_internals.h +546 -0
- data/vendor/project_acpc_server/net.c +0 -0
- data/vendor/project_acpc_server/net.h +1 -0
- data/vendor/project_acpc_server/tags +298 -0
- metadata +158 -26
@@ -0,0 +1,245 @@
|
|
1
|
+
/* ==========================================
|
2
|
+
Unity Project - A Test Framework for C
|
3
|
+
Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams
|
4
|
+
[Released under MIT License. Please refer to license.txt for details]
|
5
|
+
========================================== */
|
6
|
+
|
7
|
+
#ifndef UNITY_FRAMEWORK_H
|
8
|
+
#define UNITY_FRAMEWORK_H
|
9
|
+
|
10
|
+
#define UNITY
|
11
|
+
|
12
|
+
#include "unity_internals.h"
|
13
|
+
|
14
|
+
//-------------------------------------------------------
|
15
|
+
// Configuration Options
|
16
|
+
//-------------------------------------------------------
|
17
|
+
// All options described below should be passed as a compiler flag to all files using Unity. If you must add #defines, place them BEFORE the #include above.
|
18
|
+
|
19
|
+
// Integers/longs/pointers
|
20
|
+
// - Unity assumes 32 bit integers, longs, and pointers by default
|
21
|
+
// - If your compiler treats ints of a different size, options are:
|
22
|
+
// - define UNITY_USE_LIMITS_H to use limits.h to determine sizes
|
23
|
+
// - define UNITY_INT_WIDTH, UNITY_LONG_WIDTH, nand UNITY_POINTER_WIDTH
|
24
|
+
|
25
|
+
// Floats
|
26
|
+
// - define UNITY_EXCLUDE_FLOAT to disallow floating point comparisons
|
27
|
+
// - define UNITY_FLOAT_PRECISION to specify the precision to use when doing TEST_ASSERT_EQUAL_FLOAT
|
28
|
+
// - define UNITY_FLOAT_TYPE to specify doubles instead of single precision floats
|
29
|
+
// - define UNITY_FLOAT_VERBOSE to print floating point values in errors (uses sprintf)
|
30
|
+
// - define UNITY_INCLUDE_DOUBLE to allow double floating point comparisons
|
31
|
+
// - define UNITY_EXCLUDE_DOUBLE to disallow double floating point comparisons (default)
|
32
|
+
// - define UNITY_DOUBLE_PRECISION to specify the precision to use when doing TEST_ASSERT_EQUAL_DOUBLE
|
33
|
+
// - define UNITY_DOUBLE_TYPE to specify something other than double
|
34
|
+
// - define UNITY_DOUBLE_VERBOSE to print floating point values in errors (uses sprintf)
|
35
|
+
|
36
|
+
// Output
|
37
|
+
// - by default, Unity prints to standard out with putchar. define UNITY_OUTPUT_CHAR(a) with a different function if desired
|
38
|
+
|
39
|
+
// Optimization
|
40
|
+
// - by default, line numbers are stored in unsigned shorts. Define UNITY_LINE_TYPE with a different type if your files are huge
|
41
|
+
// - by default, test and failure counters are unsigned shorts. Define UNITY_COUNTER_TYPE with a different type if you want to save space or have more than 65535 Tests.
|
42
|
+
|
43
|
+
// Test Cases
|
44
|
+
// - define UNITY_SUPPORT_TEST_CASES to include the TEST_CASE macro, though really it's mostly about the runner generator script
|
45
|
+
|
46
|
+
// Parameterized Tests
|
47
|
+
// - you'll want to create a define of TEST_CASE(...) which basically evaluates to nothing
|
48
|
+
|
49
|
+
//-------------------------------------------------------
|
50
|
+
// Test Running Macros
|
51
|
+
//-------------------------------------------------------
|
52
|
+
|
53
|
+
#define TEST_PROTECT() (setjmp(Unity.AbortFrame) == 0)
|
54
|
+
|
55
|
+
#define TEST_ABORT() {longjmp(Unity.AbortFrame, 1);}
|
56
|
+
|
57
|
+
#ifndef RUN_TEST
|
58
|
+
#define RUN_TEST(func, line_num) UnityDefaultTestRun(func, #func, line_num)
|
59
|
+
#endif
|
60
|
+
|
61
|
+
#define TEST_LINE_NUM (Unity.CurrentTestLineNumber)
|
62
|
+
#define TEST_IS_IGNORED (Unity.CurrentTestIgnored)
|
63
|
+
|
64
|
+
//-------------------------------------------------------
|
65
|
+
// Basic Fail and Ignore
|
66
|
+
//-------------------------------------------------------
|
67
|
+
|
68
|
+
#define TEST_FAIL_MESSAGE(message) UNITY_TEST_FAIL(__LINE__, message)
|
69
|
+
#define TEST_FAIL() UNITY_TEST_FAIL(__LINE__, NULL)
|
70
|
+
#define TEST_IGNORE_MESSAGE(message) UNITY_TEST_IGNORE(__LINE__, message)
|
71
|
+
#define TEST_IGNORE() UNITY_TEST_IGNORE(__LINE__, NULL)
|
72
|
+
#define TEST_ONLY()
|
73
|
+
|
74
|
+
//-------------------------------------------------------
|
75
|
+
// Test Asserts (simple)
|
76
|
+
//-------------------------------------------------------
|
77
|
+
|
78
|
+
//Boolean
|
79
|
+
#define TEST_ASSERT(condition) UNITY_TEST_ASSERT( (condition), __LINE__, " Expression Evaluated To FALSE")
|
80
|
+
#define TEST_ASSERT_TRUE(condition) UNITY_TEST_ASSERT( (condition), __LINE__, " Expected TRUE Was FALSE")
|
81
|
+
#define TEST_ASSERT_UNLESS(condition) UNITY_TEST_ASSERT( !(condition), __LINE__, " Expression Evaluated To TRUE")
|
82
|
+
#define TEST_ASSERT_FALSE(condition) UNITY_TEST_ASSERT( !(condition), __LINE__, " Expected FALSE Was TRUE")
|
83
|
+
#define TEST_ASSERT_NULL(pointer) UNITY_TEST_ASSERT_NULL( (pointer), __LINE__, " Expected NULL")
|
84
|
+
#define TEST_ASSERT_NOT_NULL(pointer) UNITY_TEST_ASSERT_NOT_NULL((pointer), __LINE__, " Expected Non-NULL")
|
85
|
+
|
86
|
+
//Integers (of all sizes)
|
87
|
+
#define TEST_ASSERT_EQUAL_INT(expected, actual) UNITY_TEST_ASSERT_EQUAL_INT((expected), (actual), __LINE__, NULL)
|
88
|
+
#define TEST_ASSERT_EQUAL_INT8(expected, actual) UNITY_TEST_ASSERT_EQUAL_INT8((expected), (actual), __LINE__, NULL)
|
89
|
+
#define TEST_ASSERT_EQUAL_INT16(expected, actual) UNITY_TEST_ASSERT_EQUAL_INT16((expected), (actual), __LINE__, NULL)
|
90
|
+
#define TEST_ASSERT_EQUAL_INT32(expected, actual) UNITY_TEST_ASSERT_EQUAL_INT32((expected), (actual), __LINE__, NULL)
|
91
|
+
#define TEST_ASSERT_EQUAL_INT64(expected, actual) UNITY_TEST_ASSERT_EQUAL_INT64((expected), (actual), __LINE__, NULL)
|
92
|
+
#define TEST_ASSERT_EQUAL(expected, actual) UNITY_TEST_ASSERT_EQUAL_INT((expected), (actual), __LINE__, NULL)
|
93
|
+
#define TEST_ASSERT_NOT_EQUAL(expected, actual) UNITY_TEST_ASSERT(((expected) != (actual)), __LINE__, " Expected Not-Equal")
|
94
|
+
#define TEST_ASSERT_EQUAL_UINT(expected, actual) UNITY_TEST_ASSERT_EQUAL_UINT( (expected), (actual), __LINE__, NULL)
|
95
|
+
#define TEST_ASSERT_EQUAL_UINT8(expected, actual) UNITY_TEST_ASSERT_EQUAL_UINT8( (expected), (actual), __LINE__, NULL)
|
96
|
+
#define TEST_ASSERT_EQUAL_UINT16(expected, actual) UNITY_TEST_ASSERT_EQUAL_UINT16( (expected), (actual), __LINE__, NULL)
|
97
|
+
#define TEST_ASSERT_EQUAL_UINT32(expected, actual) UNITY_TEST_ASSERT_EQUAL_UINT32( (expected), (actual), __LINE__, NULL)
|
98
|
+
#define TEST_ASSERT_EQUAL_UINT64(expected, actual) UNITY_TEST_ASSERT_EQUAL_UINT64( (expected), (actual), __LINE__, NULL)
|
99
|
+
#define TEST_ASSERT_EQUAL_HEX(expected, actual) UNITY_TEST_ASSERT_EQUAL_HEX32((expected), (actual), __LINE__, NULL)
|
100
|
+
#define TEST_ASSERT_EQUAL_HEX8(expected, actual) UNITY_TEST_ASSERT_EQUAL_HEX8( (expected), (actual), __LINE__, NULL)
|
101
|
+
#define TEST_ASSERT_EQUAL_HEX16(expected, actual) UNITY_TEST_ASSERT_EQUAL_HEX16((expected), (actual), __LINE__, NULL)
|
102
|
+
#define TEST_ASSERT_EQUAL_HEX32(expected, actual) UNITY_TEST_ASSERT_EQUAL_HEX32((expected), (actual), __LINE__, NULL)
|
103
|
+
#define TEST_ASSERT_EQUAL_HEX64(expected, actual) UNITY_TEST_ASSERT_EQUAL_HEX64((expected), (actual), __LINE__, NULL)
|
104
|
+
#define TEST_ASSERT_BITS(mask, expected, actual) UNITY_TEST_ASSERT_BITS((mask), (expected), (actual), __LINE__, NULL)
|
105
|
+
#define TEST_ASSERT_BITS_HIGH(mask, actual) UNITY_TEST_ASSERT_BITS((mask), (_UU32)(-1), (actual), __LINE__, NULL)
|
106
|
+
#define TEST_ASSERT_BITS_LOW(mask, actual) UNITY_TEST_ASSERT_BITS((mask), (_UU32)(0), (actual), __LINE__, NULL)
|
107
|
+
#define TEST_ASSERT_BIT_HIGH(bit, actual) UNITY_TEST_ASSERT_BITS(((_UU32)1 << bit), (_UU32)(-1), (actual), __LINE__, NULL)
|
108
|
+
#define TEST_ASSERT_BIT_LOW(bit, actual) UNITY_TEST_ASSERT_BITS(((_UU32)1 << bit), (_UU32)(0), (actual), __LINE__, NULL)
|
109
|
+
|
110
|
+
//Integer Ranges (of all sizes)
|
111
|
+
#define TEST_ASSERT_INT_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_INT_WITHIN(delta, expected, actual, __LINE__, NULL)
|
112
|
+
#define TEST_ASSERT_UINT_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_UINT_WITHIN(delta, expected, actual, __LINE__, NULL)
|
113
|
+
#define TEST_ASSERT_HEX_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_HEX32_WITHIN(delta, expected, actual, __LINE__, NULL)
|
114
|
+
#define TEST_ASSERT_HEX8_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_HEX8_WITHIN(delta, expected, actual, __LINE__, NULL)
|
115
|
+
#define TEST_ASSERT_HEX16_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_HEX16_WITHIN(delta, expected, actual, __LINE__, NULL)
|
116
|
+
#define TEST_ASSERT_HEX32_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_HEX32_WITHIN(delta, expected, actual, __LINE__, NULL)
|
117
|
+
#define TEST_ASSERT_HEX64_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_HEX64_WITHIN(delta, expected, actual, __LINE__, NULL)
|
118
|
+
|
119
|
+
//Structs and Strings
|
120
|
+
#define TEST_ASSERT_EQUAL_PTR(expected, actual) UNITY_TEST_ASSERT_EQUAL_PTR((expected), (actual), __LINE__, NULL)
|
121
|
+
#define TEST_ASSERT_EQUAL_STRING(expected, actual) UNITY_TEST_ASSERT_EQUAL_STRING(expected, actual, __LINE__, NULL)
|
122
|
+
#define TEST_ASSERT_EQUAL_MEMORY(expected, actual, len) UNITY_TEST_ASSERT_EQUAL_MEMORY(expected, actual, len, __LINE__, NULL)
|
123
|
+
|
124
|
+
//Arrays
|
125
|
+
#define TEST_ASSERT_EQUAL_INT_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_INT_ARRAY(expected, actual, num_elements, __LINE__, NULL)
|
126
|
+
#define TEST_ASSERT_EQUAL_INT8_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_INT8_ARRAY(expected, actual, num_elements, __LINE__, NULL)
|
127
|
+
#define TEST_ASSERT_EQUAL_INT16_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_INT16_ARRAY(expected, actual, num_elements, __LINE__, NULL)
|
128
|
+
#define TEST_ASSERT_EQUAL_INT32_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_INT32_ARRAY(expected, actual, num_elements, __LINE__, NULL)
|
129
|
+
#define TEST_ASSERT_EQUAL_INT64_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_INT64_ARRAY(expected, actual, num_elements, __LINE__, NULL)
|
130
|
+
#define TEST_ASSERT_EQUAL_UINT_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_UINT_ARRAY(expected, actual, num_elements, __LINE__, NULL)
|
131
|
+
#define TEST_ASSERT_EQUAL_UINT8_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_UINT8_ARRAY(expected, actual, num_elements, __LINE__, NULL)
|
132
|
+
#define TEST_ASSERT_EQUAL_UINT16_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_UINT16_ARRAY(expected, actual, num_elements, __LINE__, NULL)
|
133
|
+
#define TEST_ASSERT_EQUAL_UINT32_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_UINT32_ARRAY(expected, actual, num_elements, __LINE__, NULL)
|
134
|
+
#define TEST_ASSERT_EQUAL_UINT64_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_UINT64_ARRAY(expected, actual, num_elements, __LINE__, NULL)
|
135
|
+
#define TEST_ASSERT_EQUAL_HEX_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_HEX32_ARRAY(expected, actual, num_elements, __LINE__, NULL)
|
136
|
+
#define TEST_ASSERT_EQUAL_HEX8_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_HEX8_ARRAY(expected, actual, num_elements, __LINE__, NULL)
|
137
|
+
#define TEST_ASSERT_EQUAL_HEX16_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_HEX16_ARRAY(expected, actual, num_elements, __LINE__, NULL)
|
138
|
+
#define TEST_ASSERT_EQUAL_HEX32_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_HEX32_ARRAY(expected, actual, num_elements, __LINE__, NULL)
|
139
|
+
#define TEST_ASSERT_EQUAL_HEX64_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_HEX64_ARRAY(expected, actual, num_elements, __LINE__, NULL)
|
140
|
+
#define TEST_ASSERT_EQUAL_PTR_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_PTR_ARRAY(expected, actual, num_elements, __LINE__, NULL)
|
141
|
+
#define TEST_ASSERT_EQUAL_STRING_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_STRING_ARRAY(expected, actual, num_elements, __LINE__, NULL)
|
142
|
+
#define TEST_ASSERT_EQUAL_MEMORY_ARRAY(expected, actual, len, num_elements) UNITY_TEST_ASSERT_EQUAL_MEMORY_ARRAY(expected, actual, len, num_elements, __LINE__, NULL)
|
143
|
+
|
144
|
+
//Floating Point (If Enabled)
|
145
|
+
#define TEST_ASSERT_FLOAT_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_FLOAT_WITHIN(delta, expected, actual, __LINE__, NULL)
|
146
|
+
#define TEST_ASSERT_EQUAL_FLOAT(expected, actual) UNITY_TEST_ASSERT_EQUAL_FLOAT(expected, actual, __LINE__, NULL)
|
147
|
+
#define TEST_ASSERT_EQUAL_FLOAT_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_FLOAT_ARRAY(expected, actual, num_elements, __LINE__, NULL)
|
148
|
+
#define TEST_ASSERT_FLOAT_IS_INF(actual) UNITY_TEST_ASSERT_FLOAT_IS_INF(actual, __LINE__, NULL)
|
149
|
+
#define TEST_ASSERT_FLOAT_IS_NEG_INF(actual) UNITY_TEST_ASSERT_FLOAT_IS_NEG_INF(actual, __LINE__, NULL)
|
150
|
+
#define TEST_ASSERT_FLOAT_IS_NAN(actual) UNITY_TEST_ASSERT_FLOAT_IS_NAN(actual, __LINE__, NULL)
|
151
|
+
|
152
|
+
//Double (If Enabled)
|
153
|
+
#define TEST_ASSERT_DOUBLE_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_DOUBLE_WITHIN(delta, expected, actual, __LINE__, NULL)
|
154
|
+
#define TEST_ASSERT_EQUAL_DOUBLE(expected, actual) UNITY_TEST_ASSERT_EQUAL_DOUBLE(expected, actual, __LINE__, NULL)
|
155
|
+
#define TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected, actual, num_elements, __LINE__, NULL)
|
156
|
+
#define TEST_ASSERT_DOUBLE_IS_INF(actual) UNITY_TEST_ASSERT_DOUBLE_IS_INF(actual, __LINE__, NULL)
|
157
|
+
#define TEST_ASSERT_DOUBLE_IS_NEG_INF(actual) UNITY_TEST_ASSERT_DOUBLE_IS_NEG_INF(actual, __LINE__, NULL)
|
158
|
+
#define TEST_ASSERT_DOUBLE_IS_NAN(actual) UNITY_TEST_ASSERT_DOUBLE_IS_NAN(actual, __LINE__, NULL)
|
159
|
+
|
160
|
+
//-------------------------------------------------------
|
161
|
+
// Test Asserts (with additional messages)
|
162
|
+
//-------------------------------------------------------
|
163
|
+
|
164
|
+
//Boolean
|
165
|
+
#define TEST_ASSERT_MESSAGE(condition, message) UNITY_TEST_ASSERT( (condition), __LINE__, message)
|
166
|
+
#define TEST_ASSERT_TRUE_MESSAGE(condition, message) UNITY_TEST_ASSERT( (condition), __LINE__, message)
|
167
|
+
#define TEST_ASSERT_UNLESS_MESSAGE(condition, message) UNITY_TEST_ASSERT( !(condition), __LINE__, message)
|
168
|
+
#define TEST_ASSERT_FALSE_MESSAGE(condition, message) UNITY_TEST_ASSERT( !(condition), __LINE__, message)
|
169
|
+
#define TEST_ASSERT_NULL_MESSAGE(pointer, message) UNITY_TEST_ASSERT_NULL( (pointer), __LINE__, message)
|
170
|
+
#define TEST_ASSERT_NOT_NULL_MESSAGE(pointer, message) UNITY_TEST_ASSERT_NOT_NULL((pointer), __LINE__, message)
|
171
|
+
|
172
|
+
//Integers (of all sizes)
|
173
|
+
#define TEST_ASSERT_EQUAL_INT_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_INT((expected), (actual), __LINE__, message)
|
174
|
+
#define TEST_ASSERT_EQUAL_INT8_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_INT8((expected), (actual), __LINE__, message)
|
175
|
+
#define TEST_ASSERT_EQUAL_INT16_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_INT16((expected), (actual), __LINE__, message)
|
176
|
+
#define TEST_ASSERT_EQUAL_INT32_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_INT32((expected), (actual), __LINE__, message)
|
177
|
+
#define TEST_ASSERT_EQUAL_INT64_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_INT64((expected), (actual), __LINE__, message)
|
178
|
+
#define TEST_ASSERT_EQUAL_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_INT((expected), (actual), __LINE__, message)
|
179
|
+
#define TEST_ASSERT_NOT_EQUAL_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT(((expected) != (actual)), __LINE__, message)
|
180
|
+
#define TEST_ASSERT_EQUAL_UINT_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_UINT( (expected), (actual), __LINE__, message)
|
181
|
+
#define TEST_ASSERT_EQUAL_UINT8_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_UINT8( (expected), (actual), __LINE__, message)
|
182
|
+
#define TEST_ASSERT_EQUAL_UINT16_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_UINT16( (expected), (actual), __LINE__, message)
|
183
|
+
#define TEST_ASSERT_EQUAL_UINT32_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_UINT32( (expected), (actual), __LINE__, message)
|
184
|
+
#define TEST_ASSERT_EQUAL_UINT64_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_UINT64( (expected), (actual), __LINE__, message)
|
185
|
+
#define TEST_ASSERT_EQUAL_HEX_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_HEX32((expected), (actual), __LINE__, message)
|
186
|
+
#define TEST_ASSERT_EQUAL_HEX8_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_HEX8( (expected), (actual), __LINE__, message)
|
187
|
+
#define TEST_ASSERT_EQUAL_HEX16_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_HEX16((expected), (actual), __LINE__, message)
|
188
|
+
#define TEST_ASSERT_EQUAL_HEX32_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_HEX32((expected), (actual), __LINE__, message)
|
189
|
+
#define TEST_ASSERT_EQUAL_HEX64_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_HEX64((expected), (actual), __LINE__, message)
|
190
|
+
#define TEST_ASSERT_BITS_MESSAGE(mask, expected, actual, message) UNITY_TEST_ASSERT_BITS((mask), (expected), (actual), __LINE__, message)
|
191
|
+
#define TEST_ASSERT_BITS_HIGH_MESSAGE(mask, actual, message) UNITY_TEST_ASSERT_BITS((mask), (_UU32)(-1), (actual), __LINE__, message)
|
192
|
+
#define TEST_ASSERT_BITS_LOW_MESSAGE(mask, actual, message) UNITY_TEST_ASSERT_BITS((mask), (_UU32)(0), (actual), __LINE__, message)
|
193
|
+
#define TEST_ASSERT_BIT_HIGH_MESSAGE(bit, actual, message) UNITY_TEST_ASSERT_BITS(((_UU32)1 << bit), (_UU32)(-1), (actual), __LINE__, message)
|
194
|
+
#define TEST_ASSERT_BIT_LOW_MESSAGE(bit, actual, message) UNITY_TEST_ASSERT_BITS(((_UU32)1 << bit), (_UU32)(0), (actual), __LINE__, message)
|
195
|
+
|
196
|
+
//Integer Ranges (of all sizes)
|
197
|
+
#define TEST_ASSERT_INT_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_INT_WITHIN(delta, expected, actual, __LINE__, message)
|
198
|
+
#define TEST_ASSERT_UINT_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_UINT_WITHIN(delta, expected, actual, __LINE__, message)
|
199
|
+
#define TEST_ASSERT_HEX_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_HEX32_WITHIN(delta, expected, actual, __LINE__, message)
|
200
|
+
#define TEST_ASSERT_HEX8_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_HEX8_WITHIN(delta, expected, actual, __LINE__, message)
|
201
|
+
#define TEST_ASSERT_HEX16_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_HEX16_WITHIN(delta, expected, actual, __LINE__, message)
|
202
|
+
#define TEST_ASSERT_HEX32_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_HEX32_WITHIN(delta, expected, actual, __LINE__, message)
|
203
|
+
#define TEST_ASSERT_HEX64_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_HEX64_WITHIN(delta, expected, actual, __LINE__, message)
|
204
|
+
|
205
|
+
//Structs and Strings
|
206
|
+
#define TEST_ASSERT_EQUAL_PTR_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_PTR(expected, actual, __LINE__, message)
|
207
|
+
#define TEST_ASSERT_EQUAL_STRING_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_STRING(expected, actual, __LINE__, message)
|
208
|
+
#define TEST_ASSERT_EQUAL_MEMORY_MESSAGE(expected, actual, len, message) UNITY_TEST_ASSERT_EQUAL_MEMORY(expected, actual, len, __LINE__, message)
|
209
|
+
|
210
|
+
//Arrays
|
211
|
+
#define TEST_ASSERT_EQUAL_INT_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_INT_ARRAY(expected, actual, num_elements, __LINE__, message)
|
212
|
+
#define TEST_ASSERT_EQUAL_INT8_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_INT8_ARRAY(expected, actual, num_elements, __LINE__, message)
|
213
|
+
#define TEST_ASSERT_EQUAL_INT16_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_INT16_ARRAY(expected, actual, num_elements, __LINE__, message)
|
214
|
+
#define TEST_ASSERT_EQUAL_INT32_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_INT32_ARRAY(expected, actual, num_elements, __LINE__, message)
|
215
|
+
#define TEST_ASSERT_EQUAL_INT64_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_INT64_ARRAY(expected, actual, num_elements, __LINE__, message)
|
216
|
+
#define TEST_ASSERT_EQUAL_UINT_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_UINT_ARRAY(expected, actual, num_elements, __LINE__, message)
|
217
|
+
#define TEST_ASSERT_EQUAL_UINT8_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_UINT8_ARRAY(expected, actual, num_elements, __LINE__, message)
|
218
|
+
#define TEST_ASSERT_EQUAL_UINT16_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_UINT16_ARRAY(expected, actual, num_elements, __LINE__, message)
|
219
|
+
#define TEST_ASSERT_EQUAL_UINT32_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_UINT32_ARRAY(expected, actual, num_elements, __LINE__, message)
|
220
|
+
#define TEST_ASSERT_EQUAL_UINT64_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_UINT64_ARRAY(expected, actual, num_elements, __LINE__, message)
|
221
|
+
#define TEST_ASSERT_EQUAL_HEX_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_HEX32_ARRAY(expected, actual, num_elements, __LINE__, message)
|
222
|
+
#define TEST_ASSERT_EQUAL_HEX8_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_HEX8_ARRAY(expected, actual, num_elements, __LINE__, message)
|
223
|
+
#define TEST_ASSERT_EQUAL_HEX16_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_HEX16_ARRAY(expected, actual, num_elements, __LINE__, message)
|
224
|
+
#define TEST_ASSERT_EQUAL_HEX32_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_HEX32_ARRAY(expected, actual, num_elements, __LINE__, message)
|
225
|
+
#define TEST_ASSERT_EQUAL_HEX64_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_HEX64_ARRAY(expected, actual, num_elements, __LINE__, message)
|
226
|
+
#define TEST_ASSERT_EQUAL_PTR_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_PTR_ARRAY(expected, actual, num_elements, __LINE__, message)
|
227
|
+
#define TEST_ASSERT_EQUAL_STRING_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_STRING_ARRAY(expected, actual, num_elements, __LINE__, message)
|
228
|
+
#define TEST_ASSERT_EQUAL_MEMORY_ARRAY_MESSAGE(expected, actual, len, num_elements, message) UNITY_TEST_ASSERT_EQUAL_MEMORY_ARRAY(expected, actual, len, num_elements, __LINE__, message)
|
229
|
+
|
230
|
+
//Floating Point (If Enabled)
|
231
|
+
#define TEST_ASSERT_FLOAT_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_FLOAT_WITHIN(delta, expected, actual, __LINE__, message)
|
232
|
+
#define TEST_ASSERT_EQUAL_FLOAT_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_FLOAT(expected, actual, __LINE__, message)
|
233
|
+
#define TEST_ASSERT_EQUAL_FLOAT_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_FLOAT_ARRAY(expected, actual, num_elements, __LINE__, message)
|
234
|
+
#define TEST_ASSERT_FLOAT_IS_INF_MESSAGE(actual, message) UNITY_TEST_ASSERT_FLOAT_IS_INF(actual, __LINE__, message)
|
235
|
+
#define TEST_ASSERT_FLOAT_IS_NEG_INF_MESSAGE(actual, message) UNITY_TEST_ASSERT_FLOAT_IS_NEG_INF(actual, __LINE__, message)
|
236
|
+
#define TEST_ASSERT_FLOAT_IS_NAN_MESSAGE(actual, message) UNITY_TEST_ASSERT_FLOAT_IS_NAN(actual, __LINE__, message)
|
237
|
+
|
238
|
+
//Double (If Enabled)
|
239
|
+
#define TEST_ASSERT_DOUBLE_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_DOUBLE_WITHIN(delta, expected, actual, __LINE__, message)
|
240
|
+
#define TEST_ASSERT_EQUAL_DOUBLE_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_DOUBLE(expected, actual, __LINE__, message)
|
241
|
+
#define TEST_ASSERT_EQUAL_DOUBLE_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected, actual, num_elements, __LINE__, message)
|
242
|
+
#define TEST_ASSERT_DOUBLE_IS_INF_MESSAGE(actual, message) UNITY_TEST_ASSERT_DOUBLE_IS_INF(actual, __LINE__, message)
|
243
|
+
#define TEST_ASSERT_DOUBLE_IS_NEG_INF_MESSAGE(actual, message) UNITY_TEST_ASSERT_DOUBLE_IS_NEG_INF(actual, __LINE__, message)
|
244
|
+
#define TEST_ASSERT_DOUBLE_IS_NAN_MESSAGE(actual, message) UNITY_TEST_ASSERT_DOUBLE_IS_NAN(actual, __LINE__, message)
|
245
|
+
#endif
|
@@ -0,0 +1,546 @@
|
|
1
|
+
/* ==========================================
|
2
|
+
Unity Project - A Test Framework for C
|
3
|
+
Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams
|
4
|
+
[Released under MIT License. Please refer to license.txt for details]
|
5
|
+
========================================== */
|
6
|
+
|
7
|
+
#ifndef UNITY_INTERNALS_H
|
8
|
+
#define UNITY_INTERNALS_H
|
9
|
+
|
10
|
+
#include <stdio.h>
|
11
|
+
#include <setjmp.h>
|
12
|
+
|
13
|
+
// Unity attempts to determine sizeof(various types)
|
14
|
+
// based on UINT_MAX, ULONG_MAX, etc. These are typically
|
15
|
+
// defined in limits.h.
|
16
|
+
#ifdef UNITY_USE_LIMITS_H
|
17
|
+
#include <limits.h>
|
18
|
+
#endif
|
19
|
+
// As a fallback, hope that including stdint.h will
|
20
|
+
// provide this information.
|
21
|
+
#ifndef UNITY_EXCLUDE_STDINT_H
|
22
|
+
#include <stdint.h>
|
23
|
+
#endif
|
24
|
+
|
25
|
+
//-------------------------------------------------------
|
26
|
+
// Guess Widths If Not Specified
|
27
|
+
//-------------------------------------------------------
|
28
|
+
|
29
|
+
// Determine the size of an int, if not already specificied.
|
30
|
+
// We cannot use sizeof(int), because it is not yet defined
|
31
|
+
// at this stage in the trnslation of the C program.
|
32
|
+
// Therefore, infer it from UINT_MAX if possible.
|
33
|
+
#ifndef UNITY_INT_WIDTH
|
34
|
+
#ifdef UINT_MAX
|
35
|
+
#if (UINT_MAX == 0xFFFF)
|
36
|
+
#define UNITY_INT_WIDTH (16)
|
37
|
+
#elif (UINT_MAX == 0xFFFFFFFF)
|
38
|
+
#define UNITY_INT_WIDTH (32)
|
39
|
+
#elif (UINT_MAX == 0xFFFFFFFFFFFFFFFF)
|
40
|
+
#define UNITY_INT_WIDTH (64)
|
41
|
+
#ifndef UNITY_SUPPORT_64
|
42
|
+
#define UNITY_SUPPORT_64
|
43
|
+
#endif
|
44
|
+
#endif
|
45
|
+
#endif
|
46
|
+
#endif
|
47
|
+
#ifndef UNITY_INT_WIDTH
|
48
|
+
#define UNITY_INT_WIDTH (32)
|
49
|
+
#endif
|
50
|
+
|
51
|
+
// Determine the size of a long, if not already specified,
|
52
|
+
// by following the process used above to define
|
53
|
+
// UNITY_INT_WIDTH.
|
54
|
+
#ifndef UNITY_LONG_WIDTH
|
55
|
+
#ifdef ULONG_MAX
|
56
|
+
#if (ULONG_MAX == 0xFFFF)
|
57
|
+
#define UNITY_LONG_WIDTH (16)
|
58
|
+
#elif (ULONG_MAX == 0xFFFFFFFF)
|
59
|
+
#define UNITY_LONG_WIDTH (32)
|
60
|
+
#elif (ULONG_MAX == 0xFFFFFFFFFFFFFFFF)
|
61
|
+
#define UNITY_LONG_WIDTH (64)
|
62
|
+
#ifndef UNITY_SUPPORT_64
|
63
|
+
#define UNITY_SUPPORT_64
|
64
|
+
#endif
|
65
|
+
#endif
|
66
|
+
#endif
|
67
|
+
#endif
|
68
|
+
#ifndef UNITY_LONG_WIDTH
|
69
|
+
#define UNITY_LONG_WIDTH (32)
|
70
|
+
#endif
|
71
|
+
|
72
|
+
// Determine the size of a pointer, if not already specified,
|
73
|
+
// by following the process used above to define
|
74
|
+
// UNITY_INT_WIDTH.
|
75
|
+
#ifndef UNITY_POINTER_WIDTH
|
76
|
+
#ifdef UINTPTR_MAX
|
77
|
+
#if (UINTPTR_MAX <= 0xFFFF)
|
78
|
+
#define UNITY_POINTER_WIDTH (16)
|
79
|
+
#elif (UINTPTR_MAX <= 0xFFFFFFFF)
|
80
|
+
#define UNITY_POINTER_WIDTH (32)
|
81
|
+
#elif (UINTPTR_MAX <= 0xFFFFFFFFFFFFFFFF)
|
82
|
+
#define UNITY_POINTER_WIDTH (64)
|
83
|
+
#ifndef UNITY_SUPPORT_64
|
84
|
+
#define UNITY_SUPPORT_64
|
85
|
+
#endif
|
86
|
+
#endif
|
87
|
+
#endif
|
88
|
+
#endif
|
89
|
+
#ifndef UNITY_POINTER_WIDTH
|
90
|
+
#ifdef INTPTR_MAX
|
91
|
+
#if (INTPTR_MAX <= 0x7FFF)
|
92
|
+
#define UNITY_POINTER_WIDTH (16)
|
93
|
+
#elif (INTPTR_MAX <= 0x7FFFFFFF)
|
94
|
+
#define UNITY_POINTER_WIDTH (32)
|
95
|
+
#elif (INTPTR_MAX <= 0x7FFFFFFFFFFFFFFF)
|
96
|
+
#define UNITY_POINTER_WIDTH (64)
|
97
|
+
#ifndef UNITY_SUPPORT_64
|
98
|
+
#define UNITY_SUPPORT_64
|
99
|
+
#endif
|
100
|
+
#endif
|
101
|
+
#endif
|
102
|
+
#endif
|
103
|
+
#ifndef UNITY_POINTER_WIDTH
|
104
|
+
#define UNITY_POINTER_WIDTH (32)
|
105
|
+
#endif
|
106
|
+
|
107
|
+
//-------------------------------------------------------
|
108
|
+
// Int Support
|
109
|
+
//-------------------------------------------------------
|
110
|
+
|
111
|
+
#if (UNITY_INT_WIDTH == 32)
|
112
|
+
typedef unsigned char _UU8;
|
113
|
+
typedef unsigned short _UU16;
|
114
|
+
typedef unsigned int _UU32;
|
115
|
+
typedef signed char _US8;
|
116
|
+
typedef signed short _US16;
|
117
|
+
typedef signed int _US32;
|
118
|
+
#elif (UNITY_INT_WIDTH == 16)
|
119
|
+
typedef unsigned char _UU8;
|
120
|
+
typedef unsigned int _UU16;
|
121
|
+
typedef unsigned long _UU32;
|
122
|
+
typedef signed char _US8;
|
123
|
+
typedef signed int _US16;
|
124
|
+
typedef signed long _US32;
|
125
|
+
#else
|
126
|
+
#error Invalid UNITY_INT_WIDTH specified! (16 or 32 are supported)
|
127
|
+
#endif
|
128
|
+
|
129
|
+
//-------------------------------------------------------
|
130
|
+
// 64-bit Support
|
131
|
+
//-------------------------------------------------------
|
132
|
+
|
133
|
+
#ifndef UNITY_SUPPORT_64
|
134
|
+
|
135
|
+
//No 64-bit Support
|
136
|
+
typedef _UU32 _U_UINT;
|
137
|
+
typedef _US32 _U_SINT;
|
138
|
+
|
139
|
+
#else
|
140
|
+
|
141
|
+
//64-bit Support
|
142
|
+
#if (UNITY_LONG_WIDTH == 32)
|
143
|
+
typedef unsigned long long _UU64;
|
144
|
+
typedef signed long long _US64;
|
145
|
+
#elif (UNITY_LONG_WIDTH == 64)
|
146
|
+
typedef unsigned long _UU64;
|
147
|
+
typedef signed long _US64;
|
148
|
+
#else
|
149
|
+
#error Invalid UNITY_LONG_WIDTH specified! (32 or 64 are supported)
|
150
|
+
#endif
|
151
|
+
typedef _UU64 _U_UINT;
|
152
|
+
typedef _US64 _U_SINT;
|
153
|
+
|
154
|
+
#endif
|
155
|
+
|
156
|
+
//-------------------------------------------------------
|
157
|
+
// Pointer Support
|
158
|
+
//-------------------------------------------------------
|
159
|
+
|
160
|
+
#if (UNITY_POINTER_WIDTH == 32)
|
161
|
+
typedef _UU32 _UP;
|
162
|
+
#define UNITY_DISPLAY_STYLE_POINTER UNITY_DISPLAY_STYLE_HEX32
|
163
|
+
#elif (UNITY_POINTER_WIDTH == 64)
|
164
|
+
#ifndef UNITY_SUPPORT_64
|
165
|
+
#error "You've Specified 64-bit pointers without enabling 64-bit Support. Define UNITY_SUPPORT_64"
|
166
|
+
#endif
|
167
|
+
typedef _UU64 _UP;
|
168
|
+
#define UNITY_DISPLAY_STYLE_POINTER UNITY_DISPLAY_STYLE_HEX64
|
169
|
+
#elif (UNITY_POINTER_WIDTH == 16)
|
170
|
+
typedef _UU16 _UP;
|
171
|
+
#define UNITY_DISPLAY_STYLE_POINTER UNITY_DISPLAY_STYLE_HEX16
|
172
|
+
#else
|
173
|
+
#error Invalid UNITY_POINTER_WIDTH specified! (16, 32 or 64 are supported)
|
174
|
+
#endif
|
175
|
+
|
176
|
+
//-------------------------------------------------------
|
177
|
+
// Float Support
|
178
|
+
//-------------------------------------------------------
|
179
|
+
|
180
|
+
#ifdef UNITY_EXCLUDE_FLOAT
|
181
|
+
|
182
|
+
//No Floating Point Support
|
183
|
+
#undef UNITY_FLOAT_PRECISION
|
184
|
+
#undef UNITY_FLOAT_TYPE
|
185
|
+
#undef UNITY_FLOAT_VERBOSE
|
186
|
+
|
187
|
+
#else
|
188
|
+
|
189
|
+
//Floating Point Support
|
190
|
+
#ifndef UNITY_FLOAT_PRECISION
|
191
|
+
#define UNITY_FLOAT_PRECISION (0.00001f)
|
192
|
+
#endif
|
193
|
+
#ifndef UNITY_FLOAT_TYPE
|
194
|
+
#define UNITY_FLOAT_TYPE float
|
195
|
+
#endif
|
196
|
+
typedef UNITY_FLOAT_TYPE _UF;
|
197
|
+
|
198
|
+
#endif
|
199
|
+
|
200
|
+
//-------------------------------------------------------
|
201
|
+
// Double Float Support
|
202
|
+
//-------------------------------------------------------
|
203
|
+
|
204
|
+
//unlike FLOAT, we DON'T include by default
|
205
|
+
#ifndef UNITY_EXCLUDE_DOUBLE
|
206
|
+
#ifndef UNITY_INCLUDE_DOUBLE
|
207
|
+
#define UNITY_EXCLUDE_DOUBLE
|
208
|
+
#endif
|
209
|
+
#endif
|
210
|
+
|
211
|
+
#ifdef UNITY_EXCLUDE_DOUBLE
|
212
|
+
|
213
|
+
//No Floating Point Support
|
214
|
+
#undef UNITY_DOUBLE_PRECISION
|
215
|
+
#undef UNITY_DOUBLE_TYPE
|
216
|
+
#undef UNITY_DOUBLE_VERBOSE
|
217
|
+
|
218
|
+
#else
|
219
|
+
|
220
|
+
//Floating Point Support
|
221
|
+
#ifndef UNITY_DOUBLE_PRECISION
|
222
|
+
#define UNITY_DOUBLE_PRECISION (1e-12f)
|
223
|
+
#endif
|
224
|
+
#ifndef UNITY_DOUBLE_TYPE
|
225
|
+
#define UNITY_DOUBLE_TYPE double
|
226
|
+
#endif
|
227
|
+
typedef UNITY_DOUBLE_TYPE _UD;
|
228
|
+
|
229
|
+
#endif
|
230
|
+
|
231
|
+
//-------------------------------------------------------
|
232
|
+
// Output Method
|
233
|
+
//-------------------------------------------------------
|
234
|
+
|
235
|
+
#ifndef UNITY_OUTPUT_CHAR
|
236
|
+
//Default to using putchar, which is defined in stdio.h above
|
237
|
+
#define UNITY_OUTPUT_CHAR(a) putchar(a)
|
238
|
+
#else
|
239
|
+
//If defined as something else, make sure we declare it here so it's ready for use
|
240
|
+
extern int UNITY_OUTPUT_CHAR(int);
|
241
|
+
#endif
|
242
|
+
|
243
|
+
//-------------------------------------------------------
|
244
|
+
// Footprint
|
245
|
+
//-------------------------------------------------------
|
246
|
+
|
247
|
+
#ifndef UNITY_LINE_TYPE
|
248
|
+
#define UNITY_LINE_TYPE _U_UINT
|
249
|
+
#endif
|
250
|
+
|
251
|
+
#ifndef UNITY_COUNTER_TYPE
|
252
|
+
#define UNITY_COUNTER_TYPE _U_UINT
|
253
|
+
#endif
|
254
|
+
|
255
|
+
//-------------------------------------------------------
|
256
|
+
// Internal Structs Needed
|
257
|
+
//-------------------------------------------------------
|
258
|
+
|
259
|
+
typedef void (*UnityTestFunction)(void);
|
260
|
+
|
261
|
+
#define UNITY_DISPLAY_RANGE_INT (0x10)
|
262
|
+
#define UNITY_DISPLAY_RANGE_UINT (0x20)
|
263
|
+
#define UNITY_DISPLAY_RANGE_HEX (0x40)
|
264
|
+
#define UNITY_DISPLAY_RANGE_AUTO (0x80)
|
265
|
+
|
266
|
+
typedef enum
|
267
|
+
{
|
268
|
+
#if (UNITY_INT_WIDTH == 16)
|
269
|
+
UNITY_DISPLAY_STYLE_INT = 2 + UNITY_DISPLAY_RANGE_INT + UNITY_DISPLAY_RANGE_AUTO,
|
270
|
+
#elif (UNITY_INT_WIDTH == 32)
|
271
|
+
UNITY_DISPLAY_STYLE_INT = 4 + UNITY_DISPLAY_RANGE_INT + UNITY_DISPLAY_RANGE_AUTO,
|
272
|
+
#elif (UNITY_INT_WIDTH == 64)
|
273
|
+
UNITY_DISPLAY_STYLE_INT = 8 + UNITY_DISPLAY_RANGE_INT + UNITY_DISPLAY_RANGE_AUTO,
|
274
|
+
#endif
|
275
|
+
UNITY_DISPLAY_STYLE_INT8 = 1 + UNITY_DISPLAY_RANGE_INT,
|
276
|
+
UNITY_DISPLAY_STYLE_INT16 = 2 + UNITY_DISPLAY_RANGE_INT,
|
277
|
+
UNITY_DISPLAY_STYLE_INT32 = 4 + UNITY_DISPLAY_RANGE_INT,
|
278
|
+
#ifdef UNITY_SUPPORT_64
|
279
|
+
UNITY_DISPLAY_STYLE_INT64 = 8 + UNITY_DISPLAY_RANGE_INT,
|
280
|
+
#endif
|
281
|
+
|
282
|
+
#if (UNITY_INT_WIDTH == 16)
|
283
|
+
UNITY_DISPLAY_STYLE_UINT = 2 + UNITY_DISPLAY_RANGE_UINT + UNITY_DISPLAY_RANGE_AUTO,
|
284
|
+
#elif (UNITY_INT_WIDTH == 32)
|
285
|
+
UNITY_DISPLAY_STYLE_UINT = 4 + UNITY_DISPLAY_RANGE_UINT + UNITY_DISPLAY_RANGE_AUTO,
|
286
|
+
#elif (UNITY_INT_WIDTH == 64)
|
287
|
+
UNITY_DISPLAY_STYLE_UINT = 8 + UNITY_DISPLAY_RANGE_UINT + UNITY_DISPLAY_RANGE_AUTO,
|
288
|
+
#endif
|
289
|
+
UNITY_DISPLAY_STYLE_UINT8 = 1 + UNITY_DISPLAY_RANGE_UINT,
|
290
|
+
UNITY_DISPLAY_STYLE_UINT16 = 2 + UNITY_DISPLAY_RANGE_UINT,
|
291
|
+
UNITY_DISPLAY_STYLE_UINT32 = 4 + UNITY_DISPLAY_RANGE_UINT,
|
292
|
+
#ifdef UNITY_SUPPORT_64
|
293
|
+
UNITY_DISPLAY_STYLE_UINT64 = 8 + UNITY_DISPLAY_RANGE_UINT,
|
294
|
+
#endif
|
295
|
+
UNITY_DISPLAY_STYLE_HEX8 = 1 + UNITY_DISPLAY_RANGE_HEX,
|
296
|
+
UNITY_DISPLAY_STYLE_HEX16 = 2 + UNITY_DISPLAY_RANGE_HEX,
|
297
|
+
UNITY_DISPLAY_STYLE_HEX32 = 4 + UNITY_DISPLAY_RANGE_HEX,
|
298
|
+
#ifdef UNITY_SUPPORT_64
|
299
|
+
UNITY_DISPLAY_STYLE_HEX64 = 8 + UNITY_DISPLAY_RANGE_HEX,
|
300
|
+
#endif
|
301
|
+
UNITY_DISPLAY_STYLE_UNKNOWN
|
302
|
+
} UNITY_DISPLAY_STYLE_T;
|
303
|
+
|
304
|
+
struct _Unity
|
305
|
+
{
|
306
|
+
const char* TestFile;
|
307
|
+
const char* CurrentTestName;
|
308
|
+
UNITY_LINE_TYPE CurrentTestLineNumber;
|
309
|
+
UNITY_COUNTER_TYPE NumberOfTests;
|
310
|
+
UNITY_COUNTER_TYPE TestFailures;
|
311
|
+
UNITY_COUNTER_TYPE TestIgnores;
|
312
|
+
UNITY_COUNTER_TYPE CurrentTestFailed;
|
313
|
+
UNITY_COUNTER_TYPE CurrentTestIgnored;
|
314
|
+
jmp_buf AbortFrame;
|
315
|
+
};
|
316
|
+
|
317
|
+
extern struct _Unity Unity;
|
318
|
+
|
319
|
+
//-------------------------------------------------------
|
320
|
+
// Test Suite Management
|
321
|
+
//-------------------------------------------------------
|
322
|
+
|
323
|
+
void UnityBegin(void);
|
324
|
+
int UnityEnd(void);
|
325
|
+
void UnityConcludeTest(void);
|
326
|
+
void UnityDefaultTestRun(UnityTestFunction Func, const char* FuncName, const int FuncLineNum);
|
327
|
+
|
328
|
+
//-------------------------------------------------------
|
329
|
+
// Test Output
|
330
|
+
//-------------------------------------------------------
|
331
|
+
|
332
|
+
void UnityPrint(const char* string);
|
333
|
+
void UnityPrintMask(const _U_UINT mask, const _U_UINT number);
|
334
|
+
void UnityPrintNumberByStyle(const _U_SINT number, const UNITY_DISPLAY_STYLE_T style);
|
335
|
+
void UnityPrintNumber(const _U_SINT number);
|
336
|
+
void UnityPrintNumberUnsigned(const _U_UINT number);
|
337
|
+
void UnityPrintNumberHex(const _U_UINT number, const char nibbles);
|
338
|
+
|
339
|
+
#ifdef UNITY_FLOAT_VERBOSE
|
340
|
+
void UnityPrintFloat(const _UF number);
|
341
|
+
#endif
|
342
|
+
|
343
|
+
//-------------------------------------------------------
|
344
|
+
// Test Assertion Fuctions
|
345
|
+
//-------------------------------------------------------
|
346
|
+
// Use the macros below this section instead of calling
|
347
|
+
// these directly. The macros have a consistent naming
|
348
|
+
// convention and will pull in file and line information
|
349
|
+
// for you.
|
350
|
+
|
351
|
+
void UnityAssertEqualNumber(const _U_SINT expected,
|
352
|
+
const _U_SINT actual,
|
353
|
+
const char* msg,
|
354
|
+
const UNITY_LINE_TYPE lineNumber,
|
355
|
+
const UNITY_DISPLAY_STYLE_T style);
|
356
|
+
|
357
|
+
void UnityAssertEqualIntArray(const _U_SINT* expected,
|
358
|
+
const _U_SINT* actual,
|
359
|
+
const _UU32 num_elements,
|
360
|
+
const char* msg,
|
361
|
+
const UNITY_LINE_TYPE lineNumber,
|
362
|
+
const UNITY_DISPLAY_STYLE_T style);
|
363
|
+
|
364
|
+
void UnityAssertBits(const _U_SINT mask,
|
365
|
+
const _U_SINT expected,
|
366
|
+
const _U_SINT actual,
|
367
|
+
const char* msg,
|
368
|
+
const UNITY_LINE_TYPE lineNumber);
|
369
|
+
|
370
|
+
void UnityAssertEqualString(const char* expected,
|
371
|
+
const char* actual,
|
372
|
+
const char* msg,
|
373
|
+
const UNITY_LINE_TYPE lineNumber);
|
374
|
+
|
375
|
+
void UnityAssertEqualStringArray( const char** expected,
|
376
|
+
const char** actual,
|
377
|
+
const _UU32 num_elements,
|
378
|
+
const char* msg,
|
379
|
+
const UNITY_LINE_TYPE lineNumber);
|
380
|
+
|
381
|
+
void UnityAssertEqualMemory( const void* expected,
|
382
|
+
const void* actual,
|
383
|
+
const _UU32 length,
|
384
|
+
const _UU32 num_elements,
|
385
|
+
const char* msg,
|
386
|
+
const UNITY_LINE_TYPE lineNumber);
|
387
|
+
|
388
|
+
void UnityAssertNumbersWithin(const _U_SINT delta,
|
389
|
+
const _U_SINT expected,
|
390
|
+
const _U_SINT actual,
|
391
|
+
const char* msg,
|
392
|
+
const UNITY_LINE_TYPE lineNumber,
|
393
|
+
const UNITY_DISPLAY_STYLE_T style);
|
394
|
+
|
395
|
+
void UnityFail(const char* message, const UNITY_LINE_TYPE line);
|
396
|
+
|
397
|
+
void UnityIgnore(const char* message, const UNITY_LINE_TYPE line);
|
398
|
+
|
399
|
+
#ifndef UNITY_EXCLUDE_FLOAT
|
400
|
+
void UnityAssertFloatsWithin(const _UF delta,
|
401
|
+
const _UF expected,
|
402
|
+
const _UF actual,
|
403
|
+
const char* msg,
|
404
|
+
const UNITY_LINE_TYPE lineNumber);
|
405
|
+
|
406
|
+
void UnityAssertEqualFloatArray(const _UF* expected,
|
407
|
+
const _UF* actual,
|
408
|
+
const _UU32 num_elements,
|
409
|
+
const char* msg,
|
410
|
+
const UNITY_LINE_TYPE lineNumber);
|
411
|
+
|
412
|
+
void UnityAssertFloatIsInf(const _UF actual,
|
413
|
+
const char* msg,
|
414
|
+
const UNITY_LINE_TYPE lineNumber);
|
415
|
+
|
416
|
+
void UnityAssertFloatIsNegInf(const _UF actual,
|
417
|
+
const char* msg,
|
418
|
+
const UNITY_LINE_TYPE lineNumber);
|
419
|
+
|
420
|
+
void UnityAssertFloatIsNaN(const _UF actual,
|
421
|
+
const char* msg,
|
422
|
+
const UNITY_LINE_TYPE lineNumber);
|
423
|
+
#endif
|
424
|
+
|
425
|
+
#ifndef UNITY_EXCLUDE_DOUBLE
|
426
|
+
void UnityAssertDoublesWithin(const _UD delta,
|
427
|
+
const _UD expected,
|
428
|
+
const _UD actual,
|
429
|
+
const char* msg,
|
430
|
+
const UNITY_LINE_TYPE lineNumber);
|
431
|
+
|
432
|
+
void UnityAssertEqualDoubleArray(const _UD* expected,
|
433
|
+
const _UD* actual,
|
434
|
+
const _UU32 num_elements,
|
435
|
+
const char* msg,
|
436
|
+
const UNITY_LINE_TYPE lineNumber);
|
437
|
+
|
438
|
+
void UnityAssertDoubleIsInf(const _UD actual,
|
439
|
+
const char* msg,
|
440
|
+
const UNITY_LINE_TYPE lineNumber);
|
441
|
+
|
442
|
+
void UnityAssertDoubleIsNegInf(const _UD actual,
|
443
|
+
const char* msg,
|
444
|
+
const UNITY_LINE_TYPE lineNumber);
|
445
|
+
|
446
|
+
void UnityAssertDoubleIsNaN(const _UD actual,
|
447
|
+
const char* msg,
|
448
|
+
const UNITY_LINE_TYPE lineNumber);
|
449
|
+
#endif
|
450
|
+
|
451
|
+
//-------------------------------------------------------
|
452
|
+
// Basic Fail and Ignore
|
453
|
+
//-------------------------------------------------------
|
454
|
+
|
455
|
+
#define UNITY_TEST_FAIL(line, message) UnityFail( (message), (UNITY_LINE_TYPE)line);
|
456
|
+
#define UNITY_TEST_IGNORE(line, message) UnityIgnore( (message), (UNITY_LINE_TYPE)line);
|
457
|
+
|
458
|
+
//-------------------------------------------------------
|
459
|
+
// Test Asserts
|
460
|
+
//-------------------------------------------------------
|
461
|
+
|
462
|
+
#define UNITY_TEST_ASSERT(condition, line, message) if (condition) {} else {UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, message);}
|
463
|
+
#define UNITY_TEST_ASSERT_NULL(pointer, line, message) UNITY_TEST_ASSERT(((pointer) == NULL), (UNITY_LINE_TYPE)line, message)
|
464
|
+
#define UNITY_TEST_ASSERT_NOT_NULL(pointer, line, message) UNITY_TEST_ASSERT(((pointer) != NULL), (UNITY_LINE_TYPE)line, message)
|
465
|
+
|
466
|
+
#define UNITY_TEST_ASSERT_EQUAL_INT(expected, actual, line, message) UnityAssertEqualNumber((_U_SINT)(expected), (_U_SINT)(actual), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_INT)
|
467
|
+
#define UNITY_TEST_ASSERT_EQUAL_INT8(expected, actual, line, message) UnityAssertEqualNumber((_U_SINT)(_US8 )(expected), (_U_SINT)(_US8 )(actual), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_INT)
|
468
|
+
#define UNITY_TEST_ASSERT_EQUAL_INT16(expected, actual, line, message) UnityAssertEqualNumber((_U_SINT)(_US16)(expected), (_U_SINT)(_US16)(actual), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_INT)
|
469
|
+
#define UNITY_TEST_ASSERT_EQUAL_INT32(expected, actual, line, message) UnityAssertEqualNumber((_U_SINT)(_US32)(expected), (_U_SINT)(_US32)(actual), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_INT)
|
470
|
+
#define UNITY_TEST_ASSERT_EQUAL_UINT(expected, actual, line, message) UnityAssertEqualNumber((_U_SINT)(expected), (_U_SINT)(actual), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_UINT)
|
471
|
+
#define UNITY_TEST_ASSERT_EQUAL_UINT8(expected, actual, line, message) UnityAssertEqualNumber((_U_SINT)(_US8 )(expected), (_U_SINT)(_US8 )(actual), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_UINT)
|
472
|
+
#define UNITY_TEST_ASSERT_EQUAL_UINT16(expected, actual, line, message) UnityAssertEqualNumber((_U_SINT)(_US16)(expected), (_U_SINT)(_US16)(actual), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_UINT)
|
473
|
+
#define UNITY_TEST_ASSERT_EQUAL_UINT32(expected, actual, line, message) UnityAssertEqualNumber((_U_SINT)(_US32)(expected), (_U_SINT)(_US32)(actual), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_UINT)
|
474
|
+
#define UNITY_TEST_ASSERT_EQUAL_HEX8(expected, actual, line, message) UnityAssertEqualNumber((_U_SINT)(_US8 )(expected), (_U_SINT)(_US8 )(actual), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_HEX8)
|
475
|
+
#define UNITY_TEST_ASSERT_EQUAL_HEX16(expected, actual, line, message) UnityAssertEqualNumber((_U_SINT)(_US16)(expected), (_U_SINT)(_US16)(actual), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_HEX16)
|
476
|
+
#define UNITY_TEST_ASSERT_EQUAL_HEX32(expected, actual, line, message) UnityAssertEqualNumber((_U_SINT)(_US32)(expected), (_U_SINT)(_US32)(actual), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_HEX32)
|
477
|
+
#define UNITY_TEST_ASSERT_BITS(mask, expected, actual, line, message) UnityAssertBits((_U_SINT)(mask), (_U_SINT)(expected), (_U_SINT)(actual), (message), (UNITY_LINE_TYPE)line)
|
478
|
+
|
479
|
+
#define UNITY_TEST_ASSERT_INT_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((_U_SINT)(delta), (_U_SINT)(expected), (_U_SINT)(actual), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_INT)
|
480
|
+
#define UNITY_TEST_ASSERT_UINT_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((_U_SINT)(delta), (_U_SINT)(expected), (_U_SINT)(actual), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_UINT)
|
481
|
+
#define UNITY_TEST_ASSERT_HEX8_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((_U_SINT)(_U_UINT)(_UU8 )(delta), (_U_SINT)(_U_UINT)(_UU8 )(expected), (_U_SINT)(_U_UINT)(_UU8 )(actual), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_HEX8)
|
482
|
+
#define UNITY_TEST_ASSERT_HEX16_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((_U_SINT)(_U_UINT)(_UU16)(delta), (_U_SINT)(_U_UINT)(_UU16)(expected), (_U_SINT)(_U_UINT)(_UU16)(actual), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_HEX16)
|
483
|
+
#define UNITY_TEST_ASSERT_HEX32_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((_U_SINT)(_U_UINT)(_UU32)(delta), (_U_SINT)(_U_UINT)(_UU32)(expected), (_U_SINT)(_U_UINT)(_UU32)(actual), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_HEX32)
|
484
|
+
|
485
|
+
#define UNITY_TEST_ASSERT_EQUAL_PTR(expected, actual, line, message) UnityAssertEqualNumber((_U_SINT)(_UP)(expected), (_U_SINT)(_UP)(actual), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_POINTER)
|
486
|
+
#define UNITY_TEST_ASSERT_EQUAL_STRING(expected, actual, line, message) UnityAssertEqualString((const char*)(expected), (const char*)(actual), (message), (UNITY_LINE_TYPE)line)
|
487
|
+
#define UNITY_TEST_ASSERT_EQUAL_MEMORY(expected, actual, len, line, message) UnityAssertEqualMemory((void*)(expected), (void*)(actual), (_UU32)(len), 1, (message), (UNITY_LINE_TYPE)line)
|
488
|
+
|
489
|
+
#define UNITY_TEST_ASSERT_EQUAL_INT_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((const _U_SINT*)(expected), (const _U_SINT*)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_INT)
|
490
|
+
#define UNITY_TEST_ASSERT_EQUAL_INT8_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((const _U_SINT*)(expected), (const _U_SINT*)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_INT8)
|
491
|
+
#define UNITY_TEST_ASSERT_EQUAL_INT16_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((const _U_SINT*)(expected), (const _U_SINT*)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_INT16)
|
492
|
+
#define UNITY_TEST_ASSERT_EQUAL_INT32_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((const _U_SINT*)(expected), (const _U_SINT*)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_INT32)
|
493
|
+
#define UNITY_TEST_ASSERT_EQUAL_UINT_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((const _U_SINT*)(expected), (const _U_SINT*)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_UINT)
|
494
|
+
#define UNITY_TEST_ASSERT_EQUAL_UINT8_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((const _U_SINT*)(expected), (const _U_SINT*)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_UINT8)
|
495
|
+
#define UNITY_TEST_ASSERT_EQUAL_UINT16_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((const _U_SINT*)(expected), (const _U_SINT*)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_UINT16)
|
496
|
+
#define UNITY_TEST_ASSERT_EQUAL_UINT32_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((const _U_SINT*)(expected), (const _U_SINT*)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_UINT32)
|
497
|
+
#define UNITY_TEST_ASSERT_EQUAL_HEX8_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((const _U_SINT*)(expected), (const _U_SINT*)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_HEX8)
|
498
|
+
#define UNITY_TEST_ASSERT_EQUAL_HEX16_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((const _U_SINT*)(expected), (const _U_SINT*)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_HEX16)
|
499
|
+
#define UNITY_TEST_ASSERT_EQUAL_HEX32_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((const _U_SINT*)(expected), (const _U_SINT*)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_HEX32)
|
500
|
+
#define UNITY_TEST_ASSERT_EQUAL_PTR_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((const _U_SINT*)(_UP*)(expected), (const _U_SINT*)(_UP*)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_POINTER)
|
501
|
+
#define UNITY_TEST_ASSERT_EQUAL_STRING_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualStringArray((const char**)(expected), (const char**)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line)
|
502
|
+
#define UNITY_TEST_ASSERT_EQUAL_MEMORY_ARRAY(expected, actual, len, num_elements, line, message) UnityAssertEqualMemory((void*)(expected), (void*)(actual), (_UU32)(len), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line)
|
503
|
+
|
504
|
+
#ifdef UNITY_SUPPORT_64
|
505
|
+
#define UNITY_TEST_ASSERT_EQUAL_INT64(expected, actual, line, message) UnityAssertEqualNumber((_U_SINT)(expected), (_U_SINT)(actual), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_INT64)
|
506
|
+
#define UNITY_TEST_ASSERT_EQUAL_UINT64(expected, actual, line, message) UnityAssertEqualNumber((_U_SINT)(expected), (_U_SINT)(actual), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_UINT64)
|
507
|
+
#define UNITY_TEST_ASSERT_EQUAL_HEX64(expected, actual, line, message) UnityAssertEqualNumber((_U_SINT)(expected), (_U_SINT)(actual), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_HEX64)
|
508
|
+
#define UNITY_TEST_ASSERT_EQUAL_INT64_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((const _U_SINT*)(expected), (const _U_SINT*)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_INT64)
|
509
|
+
#define UNITY_TEST_ASSERT_EQUAL_UINT64_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((const _U_SINT*)(expected), (const _U_SINT*)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_UINT64)
|
510
|
+
#define UNITY_TEST_ASSERT_EQUAL_HEX64_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualIntArray((const _U_SINT*)(expected), (const _U_SINT*)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_HEX64)
|
511
|
+
#define UNITY_TEST_ASSERT_HEX64_WITHIN(delta, expected, actual, line, message) UnityAssertNumbersWithin((_U_SINT)(delta), (_U_SINT)(expected), (_U_SINT)(actual), NULL, (UNITY_LINE_TYPE)line, UNITY_DISPLAY_STYLE_HEX64)
|
512
|
+
#endif
|
513
|
+
|
514
|
+
#ifdef UNITY_EXCLUDE_FLOAT
|
515
|
+
#define UNITY_TEST_ASSERT_FLOAT_WITHIN(delta, expected, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, "Unity Floating Point Disabled")
|
516
|
+
#define UNITY_TEST_ASSERT_EQUAL_FLOAT(expected, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, "Unity Floating Point Disabled")
|
517
|
+
#define UNITY_TEST_ASSERT_EQUAL_FLOAT_ARRAY(expected, actual, num_elements, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, "Unity Floating Point Disabled")
|
518
|
+
#define UNITY_TEST_ASSERT_FLOAT_IS_INF(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, "Unity Floating Point Disabled")
|
519
|
+
#define UNITY_TEST_ASSERT_FLOAT_IS_NEG_INF(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, "Unity Floating Point Disabled")
|
520
|
+
#define UNITY_TEST_ASSERT_FLOAT_IS_NAN(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, "Unity Floating Point Disabled")
|
521
|
+
#else
|
522
|
+
#define UNITY_TEST_ASSERT_FLOAT_WITHIN(delta, expected, actual, line, message) UnityAssertFloatsWithin((_UF)(delta), (_UF)(expected), (_UF)(actual), (message), (UNITY_LINE_TYPE)line)
|
523
|
+
#define UNITY_TEST_ASSERT_EQUAL_FLOAT(expected, actual, line, message) UNITY_TEST_ASSERT_FLOAT_WITHIN((_UF)(expected) * (_UF)UNITY_FLOAT_PRECISION, (_UF)expected, (_UF)actual, (UNITY_LINE_TYPE)line, message)
|
524
|
+
#define UNITY_TEST_ASSERT_EQUAL_FLOAT_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualFloatArray((_UF*)(expected), (_UF*)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line)
|
525
|
+
#define UNITY_TEST_ASSERT_FLOAT_IS_INF(actual, line, message) UnityAssertFloatIsInf((_UF)(actual), (message), (UNITY_LINE_TYPE)line)
|
526
|
+
#define UNITY_TEST_ASSERT_FLOAT_IS_NEG_INF(actual, line, message) UnityAssertFloatIsNegInf((_UF)(actual), (message), (UNITY_LINE_TYPE)line)
|
527
|
+
#define UNITY_TEST_ASSERT_FLOAT_IS_NAN(actual, line, message) UnityAssertFloatIsNaN((_UF)(actual), (message), (UNITY_LINE_TYPE)line)
|
528
|
+
#endif
|
529
|
+
|
530
|
+
#ifdef UNITY_EXCLUDE_DOUBLE
|
531
|
+
#define UNITY_TEST_ASSERT_DOUBLE_WITHIN(delta, expected, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, "Unity Double Precision Disabled")
|
532
|
+
#define UNITY_TEST_ASSERT_EQUAL_DOUBLE(expected, actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, "Unity Double Precision Disabled")
|
533
|
+
#define UNITY_TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected, actual, num_elements, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, "Unity Double Precision Disabled")
|
534
|
+
#define UNITY_TEST_ASSERT_DOUBLE_IS_INF(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, "Unity Double Precision Disabled")
|
535
|
+
#define UNITY_TEST_ASSERT_DOUBLE_IS_NEG_INF(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, "Unity Double Precision Disabled")
|
536
|
+
#define UNITY_TEST_ASSERT_DOUBLE_IS_NAN(actual, line, message) UNITY_TEST_FAIL((UNITY_LINE_TYPE)line, "Unity Double Precision Disabled")
|
537
|
+
#else
|
538
|
+
#define UNITY_TEST_ASSERT_DOUBLE_WITHIN(delta, expected, actual, line, message) UnityAssertDoublesWithin((_UD)(delta), (_UD)(expected), (_UD)(actual), (message), (UNITY_LINE_TYPE)line)
|
539
|
+
#define UNITY_TEST_ASSERT_EQUAL_DOUBLE(expected, actual, line, message) UNITY_TEST_ASSERT_DOUBLE_WITHIN((_UF)(expected) * (_UD)UNITY_DOUBLE_PRECISION, (_UD)expected, (_UD)actual, (UNITY_LINE_TYPE)line, message)
|
540
|
+
#define UNITY_TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected, actual, num_elements, line, message) UnityAssertEqualDoubleArray((_UD*)(expected), (_UD*)(actual), (_UU32)(num_elements), (message), (UNITY_LINE_TYPE)line)
|
541
|
+
#define UNITY_TEST_ASSERT_DOUBLE_IS_INF(actual, line, message) UnityAssertFloatIsInf((_UF)(actual), (message), (UNITY_LINE_TYPE)line)
|
542
|
+
#define UNITY_TEST_ASSERT_DOUBLE_IS_NEG_INF(actual, line, message) UnityAssertFloatIsNegInf((_UF)(actual), (message), (UNITY_LINE_TYPE)line)
|
543
|
+
#define UNITY_TEST_ASSERT_DOUBLE_IS_NAN(actual, line, message) UnityAssertFloatIsNaN((_UF)(actual), (message), (UNITY_LINE_TYPE)line)
|
544
|
+
#endif
|
545
|
+
|
546
|
+
#endif
|