From 6aa5c324303a41466a6452d93362d9ef9f4b3550 Mon Sep 17 00:00:00 2001 From: Erick Ahmed Date: Wed, 12 Nov 2025 09:55:49 +0100 Subject: [PATCH] test: improve precision in benchmarking operations --- test/occt/point-test.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/test/occt/point-test.cpp b/test/occt/point-test.cpp index 5a58301..3d63035 100644 --- a/test/occt/point-test.cpp +++ b/test/occt/point-test.cpp @@ -146,27 +146,27 @@ TEST_CASE("Test point creation, query and deletion behaviour", "[point]") { TEST_CASE("Benchmark point operations") { SECTION("make_point performance") { point_shape_t* p = nullptr; - BENCHMARK("create point") { + BENCHMARK("Create point") { return p = make_point(1.0, 2.0, 3.0); }; delete_point(p); } SECTION("coord_point performance") { - point_shape_t* point = make_point(1.0, 2.0, 3.0); + point_shape_t* p = make_point(1.0, 2.0, 3.0); double x, y, z; - BENCHMARK("extract coordinates") { - coord_point(point, &x, &y, &z); + BENCHMARK("Extract coordinates") { + coord_point(p, &x, &y, &z); }; - delete_point(point); + delete_point(p); } SECTION("delete_point performance") { - BENCHMARK("create and delete point") { - point_shape_t* point = make_point(1.0, 2.0, 3.0); - delete_point(point); - return point; + point_shape_t* p = make_point(1.0, 2.0, 3.0); + BENCHMARK("Delete point") { + delete_point(p); + return p; }; } }