From 69478185a3c909113d2ca032a3f5c14cd2f160ba Mon Sep 17 00:00:00 2001 From: yahyayozo Date: Sat, 19 Apr 2025 18:54:28 +0100 Subject: [PATCH] [Docs] Fix typos in docs files --- README.md | 2 +- docs/UnityConfigurationGuide.md | 2 +- docs/UnityHelperScriptsGuide.md | 24 ++++++++++++------------ src/unity.h | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 2ebf988..6be02aa 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ Like INT, there are variants for different sizes also. Compares two integers for equality and display errors as hexadecimal. 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). +here the size will also affect how many nibbles are shown (for example, `HEX16` will show 4 nibbles). TEST_ASSERT_EQUAL(expected, actual) diff --git a/docs/UnityConfigurationGuide.md b/docs/UnityConfigurationGuide.md index 0b735f7..c2027fc 100644 --- a/docs/UnityConfigurationGuide.md +++ b/docs/UnityConfigurationGuide.md @@ -33,7 +33,7 @@ In either case, you've got a couple choices for configuring these options: Unfortunately, it doesn't usually work well to just #define these things in the test itself. These defines need to take effect where ever unity.h is included. -This would be test test, the test runner (if you're generating one), and from unity.c when it's compiled. +This would be the test, the test runner (if you're generating one), and from unity.c when it's compiled. ## The Options diff --git a/docs/UnityHelperScriptsGuide.md b/docs/UnityHelperScriptsGuide.md index 9a8941c..30841cf 100644 --- a/docs/UnityHelperScriptsGuide.md +++ b/docs/UnityHelperScriptsGuide.md @@ -94,12 +94,12 @@ UnityTestRunnerGenerator.new.run(testfile, runner_name, options) ``` If you have multiple files to generate in a build script (such as a Rakefile), you might want to instantiate a generator object with your options and call it to generate each runner afterwards. -Like thus: +Like this: ```Ruby gen = UnityTestRunnerGenerator.new(options) test_files.each do |f| - gen.run(f, File.basename(f,'.c')+"Runner.c" + gen.run(f, File.basename(f,'.c')+"Runner.c") end ``` @@ -205,7 +205,7 @@ Few usage examples can be found in `/test/tests/test_unity_parameterized.c` file You should define `UNITY_SUPPORT_TEST_CASES` macro for tests success compiling, if you enable current option. -You can see list of supported macros list in the +You can see a list of supported macros in the [Parameterized tests provided macros](#parameterized-tests-provided-macros) section that follows. @@ -299,7 +299,7 @@ Unity provides support for few param tests generators, that can be combined with each other. You must define test function as usual C function with usual C arguments, and test generator will pass what you tell as a list of arguments. -Let's show how all of them works on the following test function definitions: +Let's show how all of them work on the following test function definitions: ```C /* Place your test generators here, usually one generator per one or few lines */ @@ -401,17 +401,17 @@ TEST_CASE(4, 6, 30) Test matix is an advanced generator. It single call can be converted to zero, one or few `TEST_CASE` equivalent commands. -That generator will create tests for all cobinations of the provided list. Each argument has to be given as a list of one or more elements in the format `[, , ..., , ]`. +That generator will create tests for all combinations of the provided list. Each argument has to be given as a list of one or more elements in the format `[, , ..., , ]`. -All parameters supported by the `TEST_CASE` is supported as arguments: +All parameters supported by the `TEST_CASE` are supported as arguments: - Numbers incl type specifiers e.g. `<1>`, `<1u>`, `<1l>`, `<2.3>`, or `<2.3f>` -- Strings incl string concatianion e.g. `<"string">`, or `<"partial" "string">` +- Strings incl string concatenation e.g. `<"string">`, or `<"partial" "string">` - Chars e.g. `<'c'>` - Enums e.g. `` - Elements of arrays e.g. `` -Let's use our `test_demoParamFunction` test for checking, what ranges -will be generated for our single `TEST_RANGE` row: +Let's use our `test_demoParamFunction` test for checking what ranges +will be generated for our single `TEST_MATRIX` row: ```C TEST_MATRIX([3, 4, 7], [10, 8, 2, 1],[30u, 20.0f]) @@ -450,11 +450,11 @@ As we can see: | Parameter | Format | Count of values | |---|---|---| -| `a` | `[3, 4, 7]` | 2 | +| `a` | `[3, 4, 7]` | 3 | | `b` | `[10, 8, 2, 1]` | 4 | | `c` | `[30u, 20.0f]` | 2 | -We totally have 2 * 4 * 2 = 16 equal test cases, that can be written as following: +We totally have 3 * 4 * 2 = 24 equal test cases, that can be written as following: ```C TEST_CASE(3, 10, 30u) @@ -516,7 +516,7 @@ ruby unity_test_summary.rb build/test/ ~/projects/myproject/ Or, if you're more of a Windows sort of person: ```Shell -ruby unity_test_summary.rb build\teat\ C:\projects\myproject\ +ruby unity_test_summary.rb build\test\ C:\projects\myproject\ ``` When configured correctly, you'll see a final summary, like so: diff --git a/src/unity.h b/src/unity.h index 9e2a97b..3d176da 100644 --- a/src/unity.h +++ b/src/unity.h @@ -45,7 +45,7 @@ int suiteTearDown(int num_failures); * Test Reset and Verify *-------------------------------------------------------*/ -/* These functions are intended to be called before during tests in order +/* These functions are intended to be called before or during tests in order * to support complex test loops, etc. Both are NOT built into Unity. Instead * the test runner generator will create them. resetTest will run teardown and * setup again, verifying any end-of-test needs between. verifyTest will only