diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-11-01 15:29:38 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-11-02 19:01:18 +0100 |
commit | f7c611ab71d292d64a6d4db8db8e36aaf0e2330b (patch) | |
tree | 2521af5ba64af64c9f5c667b419ff66fc1324f60 /tests | |
parent | 39cece382d1c0f9f89eaa469a93497c50b516686 (diff) |
Style: Misc docs and comment style and language fixes
- Removed empty paragraphs in XML.
- Consistently use bold style for "Example:", on a new line.
- Fix usage of `[code]` when hyperlinks could be used (`[member]`, `[constant]`).
- Fix invalid usage of backticks for inline code in BBCode.
- Fix some American/British English spelling inconsistencies.
- Other minor fixes spotted along the way, including typo fixes with codespell.
- Don't specify `@GlobalScope` for `enum` and `constant`.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/core/input/test_input_event_key.h | 2 | ||||
-rw-r--r-- | tests/core/math/test_geometry_2d.h | 2 | ||||
-rw-r--r-- | tests/core/math/test_vector2.h | 6 | ||||
-rw-r--r-- | tests/core/math/test_vector3.h | 6 | ||||
-rw-r--r-- | tests/scene/test_bit_map.h | 10 | ||||
-rw-r--r-- | tests/scene/test_text_edit.h | 4 |
6 files changed, 15 insertions, 15 deletions
diff --git a/tests/core/input/test_input_event_key.h b/tests/core/input/test_input_event_key.h index ef0a656b18..b852f3ccb9 100644 --- a/tests/core/input/test_input_event_key.h +++ b/tests/core/input/test_input_event_key.h @@ -102,7 +102,7 @@ TEST_CASE("[InputEventKey] Key correctly converts itself to text") { // as text. These cases are a bit weird, since None has no textual representation // (find_keycode_name(Key::NONE) results in a nullptr). Thus, these tests look weird // with only (Physical) or a lonely modifier with (Physical) but (as far as I - // understand the code, that is intended behaviour. + // understand the code, that is intended behavior. // Key is None without a physical key. none_key.set_keycode(Key::NONE); diff --git a/tests/core/math/test_geometry_2d.h b/tests/core/math/test_geometry_2d.h index db4e6e2177..54893a0b87 100644 --- a/tests/core/math/test_geometry_2d.h +++ b/tests/core/math/test_geometry_2d.h @@ -64,7 +64,7 @@ TEST_CASE("[Geometry2D] Point in triangle") { // This tests points on the edge of the triangle. They are treated as being outside the triangle. // In `is_point_in_circle` and `is_point_in_polygon` they are treated as being inside, so in order the make - // the behaviour consistent this may change in the future (see issue #44717 and PR #44274). + // the behavior consistent this may change in the future (see issue #44717 and PR #44274). CHECK_FALSE(Geometry2D::is_point_in_triangle(Vector2(1, 1), Vector2(-1, 1), Vector2(0, -1), Vector2(1, 1))); CHECK_FALSE(Geometry2D::is_point_in_triangle(Vector2(0, 1), Vector2(-1, 1), Vector2(0, -1), Vector2(1, 1))); } diff --git a/tests/core/math/test_vector2.h b/tests/core/math/test_vector2.h index a87b9ffc02..f7e9259329 100644 --- a/tests/core/math/test_vector2.h +++ b/tests/core/math/test_vector2.h @@ -382,13 +382,13 @@ TEST_CASE("[Vector2] Plane methods") { ERR_PRINT_OFF; CHECK_MESSAGE( vector.bounce(vector_non_normal).is_equal_approx(Vector2()), - "Vector2 bounce should return empty Vector2 with non-normalised input."); + "Vector2 bounce should return empty Vector2 with non-normalized input."); CHECK_MESSAGE( vector.reflect(vector_non_normal).is_equal_approx(Vector2()), - "Vector2 reflect should return empty Vector2 with non-normalised input."); + "Vector2 reflect should return empty Vector2 with non-normalized input."); CHECK_MESSAGE( vector.slide(vector_non_normal).is_equal_approx(Vector2()), - "Vector2 slide should return empty Vector2 with non-normalised input."); + "Vector2 slide should return empty Vector2 with non-normalized input."); ERR_PRINT_ON; } diff --git a/tests/core/math/test_vector3.h b/tests/core/math/test_vector3.h index 4932cd04db..77d3a9d93c 100644 --- a/tests/core/math/test_vector3.h +++ b/tests/core/math/test_vector3.h @@ -389,13 +389,13 @@ TEST_CASE("[Vector3] Plane methods") { ERR_PRINT_OFF; CHECK_MESSAGE( vector.bounce(vector_non_normal).is_equal_approx(Vector3()), - "Vector3 bounce should return empty Vector3 with non-normalised input."); + "Vector3 bounce should return empty Vector3 with non-normalized input."); CHECK_MESSAGE( vector.reflect(vector_non_normal).is_equal_approx(Vector3()), - "Vector3 reflect should return empty Vector3 with non-normalised input."); + "Vector3 reflect should return empty Vector3 with non-normalized input."); CHECK_MESSAGE( vector.slide(vector_non_normal).is_equal_approx(Vector3()), - "Vector3 slide should return empty Vector3 with non-normalised input."); + "Vector3 slide should return empty Vector3 with non-normalized input."); ERR_PRINT_ON; } diff --git a/tests/scene/test_bit_map.h b/tests/scene/test_bit_map.h index a102f40725..aca7e5fe22 100644 --- a/tests/scene/test_bit_map.h +++ b/tests/scene/test_bit_map.h @@ -234,7 +234,7 @@ TEST_CASE("[BitMap] Resize") { TEST_CASE("[BitMap] Grow and shrink mask") { const Size2i dim{ 256, 256 }; BitMap bit_map{}; - bit_map.grow_mask(100, Rect2i(0, 0, 128, 128)); // Check if method does not crash when working with an uninitialised bit map. + bit_map.grow_mask(100, Rect2i(0, 0, 128, 128)); // Check if method does not crash when working with an uninitialized bit map. CHECK_MESSAGE(bit_map.get_size() == Size2i(0, 0), "Size should still be equal to 0x0"); bit_map.create(dim); @@ -335,21 +335,21 @@ TEST_CASE("[BitMap] Blit") { blit_bit_map.instantiate(); - // Testing if uninitialised blit bit map and uninitialised bit map does not crash + // Testing if uninitialized blit bit map and uninitialized bit map does not crash bit_map.blit(blit_pos, blit_bit_map); - // Testing if uninitialised bit map does not crash + // Testing if uninitialized bit map does not crash blit_bit_map->create(blit_size); bit_map.blit(blit_pos, blit_bit_map); - // Testing if uninitialised bit map does not crash + // Testing if uninitialized bit map does not crash blit_bit_map.unref(); blit_bit_map.instantiate(); CHECK_MESSAGE(blit_bit_map->get_size() == Point2i(0, 0), "Size should be cleared by unref and instance calls."); bit_map.create(bit_map_size); bit_map.blit(Point2i(128, 128), blit_bit_map); - // Testing if both initialised does not crash. + // Testing if both initialized does not crash. blit_bit_map->create(blit_size); bit_map.blit(blit_pos, blit_bit_map); diff --git a/tests/scene/test_text_edit.h b/tests/scene/test_text_edit.h index 652cbed6e8..e34f2970d4 100644 --- a/tests/scene/test_text_edit.h +++ b/tests/scene/test_text_edit.h @@ -2337,7 +2337,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { SIGNAL_DISCARD("lines_edited_from"); SIGNAL_DISCARD("caret_changed"); - // Normal left shoud deselect and place at selection start. + // Normal left should deselect and place at selection start. SEND_GUI_ACTION(text_edit, "ui_text_caret_left"); CHECK(text_edit->get_viewport()->is_input_handled()); @@ -2497,7 +2497,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") { SIGNAL_DISCARD("lines_edited_from"); SIGNAL_DISCARD("caret_changed"); - // Normal right shoud deselect and place at selection start. + // Normal right should deselect and place at selection start. SEND_GUI_ACTION(text_edit, "ui_text_caret_right"); CHECK(text_edit->get_viewport()->is_input_handled()); CHECK(text_edit->get_caret_line() == 0); |