From ec3f0561997ac0248b458f7a1fd8d9213bb21b85 Mon Sep 17 00:00:00 2001 From: Ryan Pavlik Date: Tue, 17 May 2022 15:29:24 -0500 Subject: [PATCH] tests: Word choice/clarity --- tests/tests_input_transform.cpp | 28 ++++++++++++++-------------- tests/tests_json.cpp | 2 +- tests/time_utils.hpp | 2 +- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/tests/tests_input_transform.cpp b/tests/tests_input_transform.cpp index b0e3da583..c302029f3 100644 --- a/tests/tests_input_transform.cpp +++ b/tests/tests_input_transform.cpp @@ -37,7 +37,7 @@ TEST_CASE("input_transform") input.type = XRT_INPUT_TYPE_VEC1_MINUS_ONE_TO_ONE; CHECK(oxr_input_transform_create_chain(&log, &slog, input.type, action_type, "float_action", - "/dummy_float", &transforms, &transform_count)); + "/mock_float", &transforms, &transform_count)); // Just identity CHECK(transform_count == 1); @@ -58,7 +58,7 @@ TEST_CASE("input_transform") input.type = XRT_INPUT_TYPE_VEC1_ZERO_TO_ONE; CHECK(oxr_input_transform_create_chain(&log, &slog, input.type, action_type, "float_action", - "/dummy_float", &transforms, &transform_count)); + "/mock_float", &transforms, &transform_count)); // Just identity CHECK(transform_count == 1); @@ -83,7 +83,7 @@ TEST_CASE("input_transform") SECTION("path component x") { CHECK(oxr_input_transform_create_chain(&log, &slog, input.type, action_type, - "float_action", "/dummy_vec2/x", &transforms, + "float_action", "/mock_vec2/x", &transforms, &transform_count)); // A get-x @@ -97,7 +97,7 @@ TEST_CASE("input_transform") SECTION("path component y") { CHECK(oxr_input_transform_create_chain(&log, &slog, input.type, action_type, - "float_action", "/dummy_vec2/y", &transforms, + "float_action", "/mock_vec2/y", &transforms, &transform_count)); // A get-y @@ -111,7 +111,7 @@ TEST_CASE("input_transform") SECTION("no component") { CHECK_FALSE(oxr_input_transform_create_chain(&log, &slog, input.type, action_type, - "float_action", "/dummy_vec2", &transforms, + "float_action", "/mock_vec2", &transforms, &transform_count)); // Shouldn't make a transform, not possible @@ -127,7 +127,7 @@ TEST_CASE("input_transform") { input.type = XRT_INPUT_TYPE_BOOLEAN; CHECK(oxr_input_transform_create_chain(&log, &slog, input.type, action_type, "float_action", - "/dummy_bool", &transforms, &transform_count)); + "/mock_bool", &transforms, &transform_count)); // A bool-to-float CHECK(transform_count == 1); @@ -159,7 +159,7 @@ TEST_CASE("input_transform") input.type = XRT_INPUT_TYPE_BOOLEAN; CHECK(oxr_input_transform_create_chain(&log, &slog, input.type, action_type, "bool_action", - "/dummy_bool", &transforms, &transform_count)); + "/mock_bool", &transforms, &transform_count)); CHECK(transform_count == 1); CHECK(transforms != nullptr); @@ -177,7 +177,7 @@ TEST_CASE("input_transform") input.type = XRT_INPUT_TYPE_VEC1_MINUS_ONE_TO_ONE; CHECK(oxr_input_transform_create_chain(&log, &slog, input.type, action_type, "bool_action", - "/dummy_float", &transforms, &transform_count)); + "/mock_float", &transforms, &transform_count)); CHECK(transform_count == 1); CHECK(transforms != nullptr); @@ -205,7 +205,7 @@ TEST_CASE("input_transform") input.type = XRT_INPUT_TYPE_VEC1_ZERO_TO_ONE; CHECK(oxr_input_transform_create_chain(&log, &slog, input.type, action_type, "bool_action", - "/dummy_float", &transforms, &transform_count)); + "/mock_float", &transforms, &transform_count)); // A bool to float CHECK(transform_count == 1); CHECK(transforms != nullptr); @@ -238,7 +238,7 @@ TEST_CASE("input_transform") SECTION("x") { CHECK(oxr_input_transform_create_chain(&log, &slog, input.type, action_type, - "float_action", "/dummy_vec2/x", &transforms, + "float_action", "/mock_vec2/x", &transforms, &transform_count)); CHECK(transform_count == 2); CHECK(transforms != nullptr); @@ -250,7 +250,7 @@ TEST_CASE("input_transform") SECTION("y") { CHECK(oxr_input_transform_create_chain(&log, &slog, input.type, action_type, - "float_action", "/dummy_vec2/y", &transforms, + "float_action", "/mock_vec2/y", &transforms, &transform_count)); CHECK(transform_count == 2); CHECK(transforms != nullptr); @@ -262,7 +262,7 @@ TEST_CASE("input_transform") SECTION("no component") { CHECK_FALSE(oxr_input_transform_create_chain(&log, &slog, input.type, action_type, - "float_action", "/dummy", &transforms, + "float_action", "/mock", &transforms, &transform_count)); // Shouldn't make a transform, not possible @@ -283,7 +283,7 @@ TEST_CASE("input_transform") { input.type = XRT_INPUT_TYPE_POSE; CHECK(oxr_input_transform_create_chain(&log, &slog, input.type, action_type, "pose_action", - "/dummy_pose", &transforms, &transform_count)); + "/mock_pose", &transforms, &transform_count)); // Identity, just so this binding doesn't get culled. CHECK(transform_count == 1); } @@ -302,7 +302,7 @@ TEST_CASE("input_transform") input.type = input_type; CHECK_FALSE(oxr_input_transform_create_chain(&log, &slog, input.type, action_type, - "pose_action", "/dummy", &transforms, + "pose_action", "/mock", &transforms, &transform_count)); // not possible diff --git a/tests/tests_json.cpp b/tests/tests_json.cpp index 2e3d4c143..4e20b90a0 100644 --- a/tests/tests_json.cpp +++ b/tests/tests_json.cpp @@ -124,7 +124,7 @@ TEST_CASE("u_json") CHECK(json_node.toString(false) == loaded.toString(false)); } - SECTION("Access methods work") + SECTION("Read methods work") { CHECK(json_node["eta"].asString() == "theta"); CHECK(json_node["eta"].asDouble(3.14) == 3.14); diff --git a/tests/time_utils.hpp b/tests/time_utils.hpp index 9ef5a26d6..eb8e1bfef 100644 --- a/tests/time_utils.hpp +++ b/tests/time_utils.hpp @@ -61,7 +61,7 @@ stringifyTimePoint(std::chrono::steady_clock::time_point tp) using three_commas = std::ratio_multiply, std::ratio_multiply, std::ratio<1, 1000>>>; static_assert(std::ratio_equal::value); - // 9 because of the static assert above: there's no compile-time rational log10? :-O + // 9 because of the preceding static assert: there's no compile-time rational log10? :-O oss << std::setfill('0') << std::setw(9); oss << dur.count(); return oss.str();