From 4ffafce309afca95ab98863851a801e49ce838df Mon Sep 17 00:00:00 2001 From: Mark VanderVoord Date: Sun, 26 Mar 2017 17:58:46 -0400 Subject: [PATCH] Finish updating documentation to match --- README.md | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 11759c8..17ab574 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Unity Test API ============== [![Unity Build Status](https://api.travis-ci.org/ThrowTheSwitch/Unity.png?branch=master)](https://travis-ci.org/ThrowTheSwitch/Unity) -__Copyright (c) 2007 - 2014 Unity Project by Mike Karlesky, Mark VanderVoord, and Greg Williams__ +__Copyright (c) 2007 - 2017 Unity Project by Mike Karlesky, Mark VanderVoord, and Greg Williams__ Running Tests ------------- @@ -109,6 +109,18 @@ Compares two integers for equality and display errors as hexadecimal. Like the you can specify the size... here the size will also effect how many nibbles are shown (for example, `HEX16` will show 4 nibbles). + TEST_ASSERT_EQUAL(expected, actual) + +Another way of calling TEST_ASSERT_EQUAL_INT + + TEST_ASSERT_INT_WITHIN(delta, expected, actual) + +Asserts that the actual value is within plus or minus delta of the expected value. This also comes in +size specific variants. + +Arrays +------ + _ARRAY You can append `_ARRAY` to any of these macros to make an array comparison of that type. Here you will @@ -117,15 +129,12 @@ additional argument which is the number of elements to compare. For example: TEST_ASSERT_EQUAL_HEX8_ARRAY(expected, actual, elements) - TEST_ASSERT_EQUAL(expected, actual) - -Another way of calling TEST_ASSERT_EQUAL_INT - - TEST_ASSERT_INT_WITHIN(delta, expected, actual) + _EACH_EQUAL -Asserts that the actual value is within plus or minus delta of the expected value. This also comes in -size specific variants. +Another array comparison option is to check that EVERY element of an array is equal to a single expected +value. You do this by specifying the EACH_EQUAL macro. For example: + TEST_ASSERT_EACH_EQUAL_INT32(expected, actual, elements) Numerical Assertions: Bitwise ----------------------------- -- GitLab