• Home
  • Raw
  • Download

Lines Matching +full:- +full:error +full:- +full:asserts

7 - An assertion establishes truth (i.e. boolean True) for a single condition.
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:
14 - Come in many, many flavors to handle different C types and assertion cases.
15 - Use context to provide detailed and helpful failure messages.
16 - Document types, expected values, and basic behavior in your source code for
30 At their core, assertions are an establishment of truth - boolean truth. Was this
31 thing equal to that thing? Does that code doohickey have such-and-such property
35 execution and reports an error through some appropriate I/O channel (e.g.
41 department. C's `assert()` is pretty dumb as-is and is particularly poor for
53 readable, bit-level feedback when an assertion fails?
55 That's what Unity's collection of assertions do - capture context to give you
59 tests pass, you have a detailed, up-to-date view of the intent and mechanisms in
60 your source code. And due to a wondrous mystery, well-tested code usually tends
112 with the `_MESSAGE`variants of Unity's Asserts in that for pretty much any Unity
123 - The `_MESSAGE` variant convention still applies here to array assertions. The
126 - Assertions for handling arrays of floating point values are grouped with float
135 variants of Unity's Asserts in that for pretty much any Unity type assertion you
146 - The `_MESSAGE` variant convention still applies here to Each Equal assertions.
147 - Assertions for handling Each Equal of floating point values are grouped with
181 - Executing a state machine multiple times that increments a counter your test
183 - Triggering an exception and verifying it (as in Try / Catch / Throw - see the
263 ### Masked and Bit-level Assertions
265 Masked and bit-level assertions produce output formatted in hexadecimal. Unity
276 Asserts the masked bits of the `actual` parameter are high.
281 Asserts the masked bits of the `actual` parameter are low.
286 Asserts the specified bit of the `actual` parameter is high.
291 Asserts the specified bit of the `actual` parameter is low.
350 These assertions verify that the `expected` parameter is within +/- `delta`
353 of 7 - 13.
390 Asserts that the pointers point to the same memory location.
395 Asserts that the null terminated (`'\0'`)strings are identical. If strings are
403 Asserts that the contents of the memory specified by the `expected` and `actual`
515 Asserts that the `actual` value is within +/- `delta` of the `expected` value.
522 Asserts that the ?actual?value is "close enough to be considered equal" to the
524 Asserting section for more details on this. Omitting a user-specified delta in a
533 specified delta comparison values requires a custom-implemented floating point
539 Asserts that `actual` parameter is equivalent to positive infinity floating
545 Asserts that `actual` parameter is equivalent to negative infinity floating
551 Asserts that `actual` parameter is a Not A Number floating point representation.
556 Asserts that ?actual?parameter is a floating point representation usable for
563 Asserts that `actual` parameter is a value other than positive infinity floating
569 Asserts that `actual` parameter is a value other than negative infinity floating
575 Asserts that `actual` parameter is a value other than Not A Number floating
581 Asserts that `actual` parameter is not usable for mathematical operations. That
590 Asserts that the `actual` value is within +/- `delta` of the `expected` value.
597 Asserts that the `actual` value is "close enough to be considered equal" to the
599 Asserting section for more details. Omitting a user-specified delta in a
614 Asserts that `actual` parameter is equivalent to positive infinity floating
620 Asserts that `actual` parameter is equivalent to negative infinity floating point
626 Asserts that `actual` parameter is a Not A Number floating point representation.
631 Asserts that `actual` parameter is a floating point representation usable for
638 Asserts that `actual` parameter is a value other than positive infinity floating
644 Asserts that `actual` parameter is a value other than negative infinity floating
650 Asserts that `actual` parameter is a value other than Not A Number floating
656 Asserts that `actual` parameter is not usable for mathematical operations. That
665 the under-the-hood details of Unity's assertion mechanisms. If you're one of
673 pair of doubles is sloppy at best and an outright no-no at worst. Floating point
677 mathematical operations might result in a representation of 8 x 2-2
691 works out to be roughly a single bit of range for a single-precision number, and
695 So what happens when it's zero? Zero - even more than other floating point
696 values - can be represented many different ways. It doesn't matter if you have
703 approximating a single bit of error.
711 ### How do we deal with targets with non-standard int sizes?
715 natural register size, and it should be at least 16-bits and a multiple of a
722 Most often, `int` is 32-bits. In many cases in the embedded world, `int` is
723 16-bits. There are rare microcontrollers out there that have 24-bit integers,
727 that have a hard choice to make. What if their natural register size is 10-bits
728 or 12-bits? Clearly they can't fulfill _both_ the requirement to be at least
729 16-bits AND the requirement to match the natural register size. In these
740 When the C99 standard rolled around, it introduced alternate standard-size types.
757 24-bit `int`? The simplest solution is to use the next size up. If you have a
758 24-bit `int`, configure Unity to use 32-bit integers. If you have a 12-bit