Home
last modified time | relevance | path

Searched full:unity (Results 1 – 25 of 389) sorted by relevance

12345678910>>...16

/third_party/cJSON/tests/unity/docs/
DUnityGettingStartedGuide.md1 # Unity - Getting Started
9 Unity is a unit test framework. The goal has been to keep it small and
10 functional. The core Unity test framework is three files: a single C file and a
14 Unity was designed to be cross platform. It works hard to stick with C standards
16 rules. Unity has been used with many compilers, including GCC, IAR, Clang,
23 #### Unity Assertions reference
26 Unity. This is going to be your unit testing bread and butter. You'll spend more
27 time with assertions than any other part of Unity.
30 #### Unity Assertions Cheat Sheet
34 familiarize yourself with Unity's options.
[all …]
DUnityConfigurationGuide.md1 # Unity Configuration Guide
11 Unity is designed to run on almost anything that is targeted by a C compiler. It
17 All of Unity's configuration options are `#defines`. Most of these are simple
40 Unity will rely on `unity_config.h` for any further definitions it may need.
53 certainly not every compiler you are likely to encounter. Therefore, Unity has a
60 The first thing that Unity does to guess your types is check `stdint.h`.
61 This file includes defines like `UINT_MAX` that Unity can make use of to
65 That way, Unity will know to skip the inclusion of this file and you won't
76 want Unity to check this file either, define this to make it skip the inclusion.
121 Unity will automatically include 64-bit support if it auto-detects it, or if
[all …]
DUnityAssertionsReference.md1 # Unity Assertions Reference
9 - Unity is mainly a rich collection of assertions and the support to gather up
11 - The structure of Unity allows you to easily separate test assertions from
13 - Unity's assertions:
20 ### Unity Is Several Things But Mainly It's Assertions
22 One way to think of Unity is simply as a rich collection of assertions you can
24 Unity provides a framework to easily organize and execute those assertions in
45 code in the way Unity facilitates.
48 ### Unity's Assertions: Helpful Messages _and_ Free Source Code Documentation
55 That's what Unity's collection of assertions do - capture context to give you
[all …]
/third_party/unity/docs/
DUnityGettingStartedGuide.md1 # Unity - Getting Started
10 Unity is a unit test framework.
12 The core Unity test framework is three files: a single C file and a couple header files.
15 Unity was designed to be cross-platform.
17 Unity has been used with many compilers, including GCC, IAR, Clang, Green Hills, Microchip, and MS …
22 #### Unity Assertions reference
24 This document will guide you through all the assertion options provided by Unity.
26 You'll spend more time with assertions than any other part of Unity.
28 #### Unity Assertions Cheat Sheet
31 It's perfect for printing and referencing while you familiarize yourself with Unity's options.
[all …]
DUnityChangeLog.md1 # Unity Test - Change Log
5 This document captures significant features and fixes to the Unity project core source files
16 ### Unity 2.6.0 ()
24 - Add Unity BDD plugin
42 ### Unity 2.5.2 (January 2021)
48 ### Unity 2.5.1 (May 2020)
56 ### Unity 2.5.0 (October 2019)
58 It's been a LONG time since the last release of Unity. Finally, here it is!
66 ### Unity 2.4.3 (November 2017)
73 ### Unity 2.4.2 (September 2017)
[all …]
DUnityConfigurationGuide.md1 # Unity Configuration Guide
12 Unity is designed to run on almost anything that is targeted by a C compiler.
17 All of Unity's configuration options are `#defines`.
32 …ic to your target. All you must do is define `UNITY_INCLUDE_CONFIG_H` and Unity will rely on `unit…
35 These defines need to take effect where ever unity.h is included.
36 This would be test test, the test runner (if you're generating one), and from unity.c when it's com…
47 Therefore, Unity has a number of features for helping to adjust itself to match your required integ…
52 The first thing that Unity does to guess your types is check `stdint.h`.
53 This file includes defines like `UINT_MAX` that Unity can use to learn a lot about your system.
56 That way, Unity will know to skip the inclusion of this file and you won't be left with a compiler …
[all …]
DUnityAssertionsReference.md1 # Unity Assertions Reference
9 - Unity is mainly a rich collection of assertions and the support to gather up
11 - The structure of Unity allows you to easily separate test assertions from
13 - Unity’s assertions:
19 ### Unity Is Several Things But Mainly It’s Assertions
21 One way to think of Unity is simply as a rich collection of assertions you can
23 Unity provides a framework to easily organize and execute those assertions in
43 code in the way Unity facilitates.
45 ### Unity’s Assertions: Helpful Messages _and_ Free Source Code Documentation
52 That’s what Unity’s collection of assertions do - capture context to give you
[all …]
/third_party/cJSON/tests/unity/test/tests/
Dtestparameterized.c2 Unity Project - A Test Framework for C
9 #include "unity.h"
21 Unity.CurrentTestFailed = (Unity.CurrentTestFailed != 0) ? 0 : 1; \
22 if (Unity.CurrentTestFailed == 1) { \
24 UnityPrintNumberUnsigned(Unity.CurrentTestLineNumber); \
26 UnityPrint(Unity.CurrentTestName); \
33 Unity.CurrentTestFailed = (Unity.CurrentTestIgnored != 0) ? 0 : 1; \
34 Unity.CurrentTestIgnored = 0; \
35 if (Unity.CurrentTestFailed == 1) { \
37 UnityPrintNumberUnsigned(Unity.CurrentTestLineNumber); \
[all …]
/third_party/unity/test/
DMakefile25 SRC1 = ../src/unity.c tests/test_unity_arrays.c build/test_unity_arraysRunner.c
26 SRC2 = ../src/unity.c tests/test_unity_core.c build/test_unity_coreRunner.c
27 SRC3 = ../src/unity.c tests/test_unity_doubles.c build/test_unity_doublesRunner.c
28 SRC4 = ../src/unity.c tests/test_unity_floats.c build/test_unity_floatsRunner.c
29 SRC5 = ../src/unity.c tests/test_unity_integers.c build/test_unity_integersRunner.c
30 SRC6 = ../src/unity.c tests/test_unity_integers_64.c build/test_unity_integers_64Runner.c
31 SRC7 = ../src/unity.c tests/test_unity_memory.c build/test_unity_memoryRunner.c
32 SRC8 = ../src/unity.c tests/test_unity_strings.c build/test_unity_stringsRunner.c
48 gcov unity.c | head -3
49 grep '###' $(BUILD_DIR)/unity.c.gcov -C2 || true
[all …]
Drakefile2 # Unity Project - A Test Framework for C
35 desc "Build and test Unity"
39 desc "Test unity with its own unit tests"
53 desc "Test unity's helper scripts"
60 desc "Test unity triggered from make"
65 desc "Test unity fixture addon"
70 desc "Test unity memory addon"
75 desc "Test unity examples"
/third_party/cJSON/tests/
DCMakeLists.txt2 add_library(unity STATIC unity/src/unity.c) target
4 # Disable -Werror for Unity
9 target_compile_options(unity PRIVATE "-Wno-error")
12 # Disable -fvisibility=hidden for Unity
17 target_compile_options(unity PRIVATE "-fvisibility=default")
20 …# Disable -fsanitize=float-divide-by-zero for Unity (GCC bug on x86 https://gcc.gnu.org/bugzilla/s…
25 target_compile_options(unity PRIVATE "-fno-sanitize=float-divide-by-zero")
28 # Disable -Wswitch-enum for Unity
33 target_compile_options(unity PRIVATE "-Wno-switch-enum")
79 target_link_libraries("${unity_test}" "${CJSON_LIB}" unity)
[all …]
/third_party/unity/extras/fixture/src/
Dunity_fixture.c1 /* Copyright (c) 2010 James Grenning and Contributed to Unity Project
3 * Unity Project - A Test Framework for C
23 UnityPrint("Unity test run "); in announceTestRun()
46 return (int)Unity.TestFailures; in UnityMain()
77 Unity.TestFile = file; in UnityTestRunner()
78 Unity.CurrentTestName = printableName; in UnityTestRunner()
79 Unity.CurrentTestLineNumber = line; in UnityTestRunner()
84 Unity.CurrentTestName = NULL; in UnityTestRunner()
96 Unity.NumberOfTests++; in UnityTestRunner()
122 Unity.NumberOfTests++; in UnityIgnoreTest()
[all …]
/third_party/cJSON/tests/unity/extras/fixture/src/
Dunity_fixture.c1 /* Copyright (c) 2010 James Grenning and Contributed to Unity Project
3 * Unity Project - A Test Framework for C
25 UnityPrint("Unity test run "); in announceTestRun()
48 return (int)Unity.TestFailures; in UnityMain()
79 Unity.TestFile = file; in UnityTestRunner()
80 Unity.CurrentTestName = printableName; in UnityTestRunner()
81 Unity.CurrentTestLineNumber = line; in UnityTestRunner()
88 Unity.CurrentTestName = NULL; in UnityTestRunner()
92 Unity.NumberOfTests++; in UnityTestRunner()
108 if (!Unity.CurrentTestFailed) in UnityTestRunner()
[all …]
/third_party/unity/examples/
Dunity_config.h1 /* Unity Configuration
2 * As of May 11th, 2016 at ThrowTheSwitch/Unity commit 837c529
4 * See Also: Unity/docs/UnityConfigurationGuide.pdf
6 * Unity is designed to run on almost anything that is targeted by a C compiler.
12 * All of Unity's configuration options are `#defines`. Most of these are simple
33 * `UNITY_INCLUDE_CONFIG_H` and Unity will rely on `unity_config.h` for any
47 * encounter. Therefore, Unity has a number of features for helping to adjust
54 * want Unity to check this file, define this to make it skip the inclusion.
55 * Unity looks at UINT_MAX & ULONG_MAX, which were available since C89.
59 /* The second thing that Unity does to guess your types is check `stdint.h`.
[all …]
/third_party/unity/test/tests/
Dself_assessment_utils.h26 Unity.CurrentTestFailed = (Unity.CurrentTestFailed == 1) ? 0 : 1; \
27 if (Unity.CurrentTestFailed == 1) { \
29 UnityPrintNumberUnsigned(Unity.CurrentTestLineNumber); \
31 UnityPrint(Unity.CurrentTestName); \
39 Unity.CurrentTestFailed = (Unity.CurrentTestIgnored == 1) ? 0 : 1; \
40 Unity.CurrentTestIgnored = 0; \
41 if (Unity.CurrentTestFailed == 1) { \
43 UnityPrintNumberUnsigned(Unity.CurrentTestLineNumber); \
45 UnityPrint(Unity.CurrentTestName); \
Dtest_unity_core.c2 Unity Project - A Test Framework for C
7 #include "unity.h"
29 if ((SetToOneMeanWeAlreadyCheckedThisGuy == 0) && (Unity.CurrentTestFailed > 0)) in tearDown()
39 * test breaks, go look at the initialization of the Unity global variable in testUnitySizeInitializationReminder()
40 * in unity.c and make sure we're filling in the proper fields. */ in testUnitySizeInitializationReminder()
42 "the initialization of the Unity symbol in unity.c is " in testUnitySizeInitializationReminder()
91 TEST_ASSERT_EQUAL_MESSAGE(sizeof(_Expected_Unity), sizeof(Unity), message); in testUnitySizeInitializationReminder()
151 TEST_ASSERT_EQUAL_INT(0U, Unity.TestFailures); in testPreviousPass()
277 Unity.CurrentTestFailed = 0; in testProtection()
295 UNITY_UINT savedFailures = Unity.TestFailures; in testFailureCountIncrementsAndIsReturnedAtEnd()
[all …]
Dtest_unity_parameterized.c2 Unity Project - A Test Framework for C
9 #include "unity.h"
22 Unity.CurrentTestFailed = (Unity.CurrentTestFailed != 0) ? 0 : 1; \
23 if (Unity.CurrentTestFailed == 1) { \
25 UnityPrintNumberUnsigned(Unity.CurrentTestLineNumber); \
27 UnityPrint(Unity.CurrentTestName); \
34 Unity.CurrentTestFailed = (Unity.CurrentTestIgnored != 0) ? 0 : 1; \
35 Unity.CurrentTestIgnored = 0; \
36 if (Unity.CurrentTestFailed == 1) { \
38 UnityPrintNumberUnsigned(Unity.CurrentTestLineNumber); \
[all …]
/third_party/cJSON/tests/unity/examples/
Dunity_config.h1 /* Unity Configuration
2 * As of May 11th, 2016 at ThrowTheSwitch/Unity commit 837c529
4 * See Also: Unity/docs/UnityConfigurationGuide.pdf
6 * Unity is designed to run on almost anything that is targeted by a C compiler.
12 * All of Unity's configuration options are `#defines`. Most of these are simple
33 * `UNITY_INCLUDE_CONFIG_H` and Unity will rely on `unity_config.h` for any
47 * encounter. Therefore, Unity has a number of features for helping to adjust
54 * want Unity to check this file, define this to make it skip the inclusion.
55 * Unity looks at UINT_MAX & ULONG_MAX, which were available since C89.
59 /* The second thing that Unity does to guess your types is check `stdint.h`.
[all …]
/third_party/cJSON/tests/unity/src/
Dunity.c2 Unity Project - A Test Framework for C
8 #include "unity.h"
17 #define UNITY_FAIL_AND_BAIL { Unity.CurrentTestFailed = 1; TEST_ABORT(); }
18 #define UNITY_IGNORE_AND_BAIL { Unity.CurrentTestIgnored = 1; TEST_ABORT(); }
19 #define RETURN_IF_FAIL_OR_IGNORE if (Unity.CurrentTestFailed || Unity.CurrentTestIgnored) return
21 struct UNITY_STORAGE_T Unity; variable
56 const char UnityStrErrFloat[] = "Unity Floating Point Disabled";
57 const char UnityStrErrDouble[] = "Unity Double Precision Disabled";
58 const char UnityStrErr64[] = "Unity 64-bit Support Disabled";
363 UnityPrint(Unity.CurrentTestName); in UnityTestResultsBegin()
[all …]
/third_party/unity/extras/fixture/
Dreadme.md1 # Unity Fixtures
3 This Framework is an optional add-on to Unity.
4 By including unity_fixture.h in place of unity.h, you may now work with Unity in a manner similar t…
7 … James Grenning's book on Embedded Test Driven Development, or those coming to Unity from CppUTest.
8 We should note that using this framework glosses over some of the features of Unity, and makes it m…
20 By default the test executables produced by Unity Fixtures run all tests once, but the behavior can…
/third_party/unity/extras/fixture/test/
Dunity_fixture_Test.c1 /* Copyright (c) 2010 James Grenning and Contributed to Unity Project
3 * Unity Project - A Test Framework for C
75 UNITY_UINT savedFails = Unity.TestFailures; in TEST()
76 UNITY_UINT savedIgnores = Unity.TestIgnores; in TEST()
77 Unity.CurrentTestFailed = 1; in TEST()
79 Unity.CurrentTestIgnored = 1; in TEST()
81 TEST_ASSERT_EQUAL(savedFails + 1, Unity.TestFailures); in TEST()
82 TEST_ASSERT_EQUAL(savedIgnores + 1, Unity.TestIgnores); in TEST()
83 Unity.TestFailures = savedFails; in TEST()
84 Unity.TestIgnores = savedIgnores; in TEST()
[all …]
/third_party/cJSON/tests/unity/extras/fixture/test/
Dunity_fixture_Test.c1 /* Copyright (c) 2010 James Grenning and Contributed to Unity Project
3 * Unity Project - A Test Framework for C
141 UNITY_UINT savedFails = Unity.TestFailures; in TEST()
142 UNITY_UINT savedIgnores = Unity.TestIgnores; in TEST()
144 Unity.CurrentTestFailed = 1; in TEST()
146 Unity.CurrentTestIgnored = 1; in TEST()
149 TEST_ASSERT_EQUAL(savedFails + 1, Unity.TestFailures); in TEST()
150 TEST_ASSERT_EQUAL(savedIgnores + 1, Unity.TestIgnores); in TEST()
151 Unity.TestFailures = savedFails; in TEST()
152 Unity.TestIgnores = savedIgnores; in TEST()
[all …]
/third_party/cJSON/tests/unity/extras/fixture/
Dreadme.txt1 Copyright (c) 2010 James Grenning and Contributed to Unity Project
3 Unity Project - A Test Framework for C
7 This Framework is an optional add-on to Unity. By including unity_framework.h in place of unity.h,
8 you may now work with Unity in a manner similar to CppUTest. This framework adds the concepts of
/third_party/unity/src/
Dunity.c2 Unity Project - A Test Framework for C
7 #include "unity.h"
19 #define UNITY_FAIL_AND_BAIL do { Unity.CurrentTestFailed = 1; UNITY_OUTPUT_FLUSH(); TEST_A…
20 #define UNITY_IGNORE_AND_BAIL do { Unity.CurrentTestIgnored = 1; UNITY_OUTPUT_FLUSH(); TEST_A…
21 #define RETURN_IF_FAIL_OR_IGNORE do { if (Unity.CurrentTestFailed || Unity.CurrentTestIgnored) {…
23 struct UNITY_STORAGE_T Unity; variable
59 const char UNITY_PROGMEM UnityStrErrShorthand[] = "Unity Shorthand Support Disable…
60 const char UNITY_PROGMEM UnityStrErrFloat[] = "Unity Floating Point Disabled";
61 const char UNITY_PROGMEM UnityStrErrDouble[] = "Unity Double Precision Disabled…
62 const char UNITY_PROGMEM UnityStrErr64[] = "Unity 64-bit Support Disabled";
[all …]
/third_party/unity/
DCMakeLists.txt14 # Read src/unity.h file and get project version from it
15 set(UNITY_HEADER "src/unity.h")
38 project(unity project
45 option(UNITY_EXTENSION_FIXTURE "Compiles Unity with the \"fixture\" extension." OFF)
46 option(UNITY_EXTENSION_MEMORY "Compiles Unity with the \"memory\" extension." OFF)
52 message(STATUS "Unity: Building with the fixture extension.")
56 message(STATUS "Unity: Building with the memory extension.")
69 src/unity.c
85 src/unity.h

12345678910>>...16