From 165416f73b85d4c2ce1111e9b6edad3423167b3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 9 Feb 2023 00:21:55 +0100 Subject: [PATCH] python: add code coverage markers for trade bindings. Not desirable to test all possible types, and some unreachable parts are indeed unreachable. --- src/python/magnum/trade.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/python/magnum/trade.cpp b/src/python/magnum/trade.cpp index 9d68938..ff976e8 100644 --- a/src/python/magnum/trade.cpp +++ b/src/python/magnum/trade.cpp @@ -432,13 +432,15 @@ Containers::Triple(item) = py::cast(object); \ }}; + /* LCOV_EXCL_START */ _c(UnsignedByte, "B") _c(UnsignedShort, "H") _c(UnsignedInt, "I") + /* LCOV_EXCL_STOP */ #undef _c } - return {}; + CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */ } Containers::Triple accessorsForVertexFormat(const VertexFormat format) { @@ -463,6 +465,7 @@ Containers::Triple(item) = format(py::cast(object)); \ }}; + /* LCOV_EXCL_START */ _c(Float, "f") _c(Double, "d") _cc(UnsignedByte, UnsignedInt, "B") @@ -498,6 +501,7 @@ Containers::Triple Containers::PyArrayViewHolder> meshIndicesView(Trade::MeshData& mesh, const Containers::StridedArrayView2D& data) {