From a99a55404316cd3662d4499eea8019c1e8dd883b Mon Sep 17 00:00:00 2001 From: Nikolaos Kavvadias Date: Tue, 20 Apr 2021 19:12:12 +0200 Subject: [PATCH 1/2] rtest_ac_exp_pwl.cpp: Report old/actual when both available --- tests/rtest_ac_exp_pwl.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/rtest_ac_exp_pwl.cpp b/tests/rtest_ac_exp_pwl.cpp index 0a36861..f3230da 100644 --- a/tests/rtest_ac_exp_pwl.cpp +++ b/tests/rtest_ac_exp_pwl.cpp @@ -140,8 +140,6 @@ int test_driver( // Update the old value old_output_exp = actual_value_exp; - // Once an old value has been stored, i.e. towards the end of the first iteration, this value is set to true. - compare_exp = true; // same thing as above, but for the natural exponential. if (compare_exp) { @@ -153,6 +151,7 @@ int test_driver( assert(false); // LCOV_EXCL_LINE } } + // Once an old value has been stored, i.e. towards the end of the first iteration, this value is set to true. old_output_exp = actual_value_exp; compare_exp = true; } From 61406e0f47b30fb24500e9f683674e2566da6a75 Mon Sep 17 00:00:00 2001 From: Nikolaos Kavvadias Date: Wed, 5 May 2021 13:51:40 +0200 Subject: [PATCH 2/2] Old value can be updated where we enable the comparison --- tests/rtest_ac_exp_pwl.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/rtest_ac_exp_pwl.cpp b/tests/rtest_ac_exp_pwl.cpp index f3230da..d90dd5d 100644 --- a/tests/rtest_ac_exp_pwl.cpp +++ b/tests/rtest_ac_exp_pwl.cpp @@ -138,9 +138,6 @@ int test_driver( // are testing is an increasing function, and our testbench value keeps incrementing or remains the same (in case of saturation), we expect the // old value to be lesser than or equal to the current one. - // Update the old value - old_output_exp = actual_value_exp; - // same thing as above, but for the natural exponential. if (compare_exp) { if (old_output_exp > actual_value_exp) {