Refactor KAT test runner functions, reducing lines of code

Signed-off-by: Anjan Roy <hello@itzmeanjan.in>
This commit is contained in:
Anjan Roy
2024-09-01 23:41:37 +04:00
parent 53c0afa644
commit 5cb46afd16
6 changed files with 126 additions and 170 deletions

View File

@@ -1,4 +1,5 @@
#include "ml_kem/internals/poly/compression.hpp"
#include "ml_kem/internals/utility/force_inline.hpp"
#include <gtest/gtest.h>
// Decompression error that can happen for some given `d` s.t.
@@ -10,7 +11,7 @@
// See eq. 2 of Ml_kem specification
// https://doi.org/10.6028/NIST.FIPS.203.ipd
template<size_t d>
static inline constexpr size_t
forceinline constexpr size_t
compute_error()
{
constexpr double t0 = static_cast<double>(ml_kem_field::Q);