Skip to content

Commit 00a1d02

Browse files
committed
Break on sentences instead of column
1 parent 8b90b51 commit 00a1d02

File tree

7 files changed

+529
-635
lines changed

7 files changed

+529
-635
lines changed

README.md

Lines changed: 56 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,19 @@
22

33
__Copyright (c) 2007 - 2021 Unity Project by Mike Karlesky, Mark VanderVoord, and Greg Williams__
44

5-
Welcome to the Unity Test Project, one of the main projects of ThrowTheSwitch.org. Unity Test is a
6-
unit testing framework built for C, with a focus on working with embedded toolchains.
5+
Welcome to the Unity Test Project, one of the main projects of ThrowTheSwitch.org.
6+
Unity Test is a unit testing framework built for C, with a focus on working with embedded toolchains.
77

8-
This project is made to test code targetting microcontrollers big and small. The core project is a
9-
single C file and a pair of headers, allowing it to the added to your existing build setup without
10-
too much headache. You may use any compiler you wish, and may use most existing build systems
11-
including Make, CMake, etc. If you'd like to leave the hard work to us, you might be interested
12-
in Ceedling, a build tool also by ThrowTheSwitch.org.
8+
This project is made to test code targetting microcontrollers big and small.
9+
The core project is a single C file and a pair of headers, allowing it to the added to your existing build setup without too much headache.
10+
You may use any compiler you wish, and may use most existing build systems including Make, CMake, etc.
11+
If you'd like to leave the hard work to us, you might be interested in Ceedling, a build tool also by ThrowTheSwitch.org.
1312

1413
If you're new to Unity, we encourage you to tour the [getting started guide][].
1514

1615
## Getting Started
1716

18-
The [docs][] folder contains a [getting started guide][]
19-
and much more tips about using Unity.
17+
The [docs][] folder contains a [getting started guide][] and much more tips about using Unity.
2018

2119
## Unity Assertion Summary
2220

@@ -43,7 +41,8 @@ Another way of calling `TEST_ASSERT_FALSE`
4341
TEST_FAIL()
4442
TEST_FAIL_MESSAGE(message)
4543

46-
This test is automatically marked as a failure. The message is output stating why.
44+
This test is automatically marked as a failure.
45+
The message is output stating why.
4746

4847
### Numerical Assertions: Integers
4948

@@ -53,84 +52,92 @@ This test is automatically marked as a failure. The message is output stating wh
5352
TEST_ASSERT_EQUAL_INT32(expected, actual)
5453
TEST_ASSERT_EQUAL_INT64(expected, actual)
5554

56-
Compare two integers for equality and display errors as signed integers. A cast will be performed
57-
to your natural integer size so often this can just be used. When you need to specify the exact size,
58-
like when comparing arrays, you can use a specific version:
55+
Compare two integers for equality and display errors as signed integers.
56+
A cast will be performed to your natural integer size so often this can just be used.
57+
When you need to specify the exact size, like when comparing arrays, you can use a specific version:
5958

6059
TEST_ASSERT_EQUAL_UINT(expected, actual)
6160
TEST_ASSERT_EQUAL_UINT8(expected, actual)
6261
TEST_ASSERT_EQUAL_UINT16(expected, actual)
6362
TEST_ASSERT_EQUAL_UINT32(expected, actual)
6463
TEST_ASSERT_EQUAL_UINT64(expected, actual)
6564

66-
Compare two integers for equality and display errors as unsigned integers. Like INT, there are
67-
variants for different sizes also.
65+
Compare two integers for equality and display errors as unsigned integers.
66+
Like INT, there are variants for different sizes also.
6867

6968
TEST_ASSERT_EQUAL_HEX(expected, actual)
7069
TEST_ASSERT_EQUAL_HEX8(expected, actual)
7170
TEST_ASSERT_EQUAL_HEX16(expected, actual)
7271
TEST_ASSERT_EQUAL_HEX32(expected, actual)
7372
TEST_ASSERT_EQUAL_HEX64(expected, actual)
7473

75-
Compares two integers for equality and display errors as hexadecimal. Like the other integer comparisons,
76-
you can specify the size... here the size will also effect how many nibbles are shown (for example, `HEX16`
77-
will show 4 nibbles).
74+
Compares two integers for equality and display errors as hexadecimal.
75+
Like the other integer comparisons, you can specify the size... here the size will also effect how many nibbles are shown (for example, `HEX16` will show 4 nibbles).
7876

7977
TEST_ASSERT_EQUAL(expected, actual)
8078

8179
Another way of calling TEST_ASSERT_EQUAL_INT
8280

8381
TEST_ASSERT_INT_WITHIN(delta, expected, actual)
8482

85-
Asserts that the actual value is within plus or minus delta of the expected value. This also comes in
86-
size specific variants.
83+
Asserts that the actual value is within plus or minus delta of the expected value.
84+
This also comes in size specific variants.
8785

8886
TEST_ASSERT_GREATER_THAN(threshold, actual)
8987

90-
Asserts that the actual value is greater than the threshold. This also comes in size specific variants.
88+
Asserts that the actual value is greater than the threshold.
89+
This also comes in size specific variants.
9190

9291
TEST_ASSERT_LESS_THAN(threshold, actual)
9392

94-
Asserts that the actual value is less than the threshold. This also comes in size specific variants.
93+
Asserts that the actual value is less than the threshold.
94+
This also comes in size specific variants.
9595

9696
### Arrays
9797

9898
_ARRAY
9999

100-
You can append `_ARRAY` to any of these macros to make an array comparison of that type. Here you will
101-
need to care a bit more about the actual size of the value being checked. You will also specify an
102-
additional argument which is the number of elements to compare. For example:
100+
You can append `_ARRAY` to any of these macros to make an array comparison of that type.
101+
Here you will need to care a bit more about the actual size of the value being checked.
102+
You will also specify an additional argument which is the number of elements to compare.
103+
For example:
103104

104105
TEST_ASSERT_EQUAL_HEX8_ARRAY(expected, actual, elements)
105106

106107
_EACH_EQUAL
107108

108-
Another array comparison option is to check that EVERY element of an array is equal to a single expected
109-
value. You do this by specifying the EACH_EQUAL macro. For example:
109+
Another array comparison option is to check that EVERY element of an array is equal to a single expected value.
110+
You do this by specifying the EACH_EQUAL macro.
111+
For example:
110112

111113
TEST_ASSERT_EACH_EQUAL_INT32(expected, actual, elements)
112114

113115
### Numerical Assertions: Bitwise
114116

115117
TEST_ASSERT_BITS(mask, expected, actual)
116118

117-
Use an integer mask to specify which bits should be compared between two other integers. High bits in the mask are compared, low bits ignored.
119+
Use an integer mask to specify which bits should be compared between two other integers.
120+
High bits in the mask are compared, low bits ignored.
118121

119122
TEST_ASSERT_BITS_HIGH(mask, actual)
120123

121-
Use an integer mask to specify which bits should be inspected to determine if they are all set high. High bits in the mask are compared, low bits ignored.
124+
Use an integer mask to specify which bits should be inspected to determine if they are all set high.
125+
High bits in the mask are compared, low bits ignored.
122126

123127
TEST_ASSERT_BITS_LOW(mask, actual)
124128

125-
Use an integer mask to specify which bits should be inspected to determine if they are all set low. High bits in the mask are compared, low bits ignored.
129+
Use an integer mask to specify which bits should be inspected to determine if they are all set low.
130+
High bits in the mask are compared, low bits ignored.
126131

127132
TEST_ASSERT_BIT_HIGH(bit, actual)
128133

129-
Test a single bit and verify that it is high. The bit is specified 0-31 for a 32-bit integer.
134+
Test a single bit and verify that it is high.
135+
The bit is specified 0-31 for a 32-bit integer.
130136

131137
TEST_ASSERT_BIT_LOW(bit, actual)
132138

133-
Test a single bit and verify that it is low. The bit is specified 0-31 for a 32-bit integer.
139+
Test a single bit and verify that it is low.
140+
The bit is specified 0-31 for a 32-bit integer.
134141

135142
### Numerical Assertions: Floats
136143

@@ -147,23 +154,30 @@ Asserts that two floating point values are "equal" within a small % delta of the
147154

148155
TEST_ASSERT_EQUAL_STRING(expected, actual)
149156

150-
Compare two null-terminate strings. Fail if any character is different or if the lengths are different.
157+
Compare two null-terminate strings.
158+
Fail if any character is different or if the lengths are different.
151159

152160
TEST_ASSERT_EQUAL_STRING_LEN(expected, actual, len)
153161

154-
Compare two strings. Fail if any character is different, stop comparing after len characters.
162+
Compare two strings.
163+
Fail if any character is different, stop comparing after len characters.
155164

156165
TEST_ASSERT_EQUAL_STRING_MESSAGE(expected, actual, message)
157166

158-
Compare two null-terminate strings. Fail if any character is different or if the lengths are different. Output a custom message on failure.
167+
Compare two null-terminate strings.
168+
Fail if any character is different or if the lengths are different.
169+
Output a custom message on failure.
159170

160171
TEST_ASSERT_EQUAL_STRING_LEN_MESSAGE(expected, actual, len, message)
161172

162-
Compare two strings. Fail if any character is different, stop comparing after len characters. Output a custom message on failure.
173+
Compare two strings.
174+
Fail if any character is different, stop comparing after len characters.
175+
Output a custom message on failure.
163176

164177
### Pointer Assertions
165178

166-
Most pointer operations can be performed by simply using the integer comparisons above. However, a couple of special cases are added for clarity.
179+
Most pointer operations can be performed by simply using the integer comparisons above.
180+
However, a couple of special cases are added for clarity.
167181

168182
TEST_ASSERT_NULL(pointer)
169183

@@ -177,14 +191,14 @@ Fails if the pointer is equal to NULL
177191

178192
TEST_ASSERT_EQUAL_MEMORY(expected, actual, len)
179193

180-
Compare two blocks of memory. This is a good generic assertion for types that can't be coerced into acting like
181-
standard types... but since it's a memory compare, you have to be careful that your data types are packed.
194+
Compare two blocks of memory.
195+
This is a good generic assertion for types that can't be coerced into acting like standard types... but since it's a memory compare, you have to be careful that your data types are packed.
182196

183197
### \_MESSAGE
184198

185-
you can append `\_MESSAGE` to any of the macros to make them take an additional argument. This argument
186-
is a string that will be printed at the end of the failure strings. This is useful for specifying more
187-
information about the problem.
199+
You can append `\_MESSAGE` to any of the macros to make them take an additional argument.
200+
This argument is a string that will be printed at the end of the failure strings.
201+
This is useful for specifying more information about the problem.
188202

189203
[CI]: https://github.com/ThrowTheSwitch/Unity/workflows/CI/badge.svg
190204
[getting started guide]: docs/UnityGettingStartedGuide.md

0 commit comments

Comments
 (0)