Skip to content

Commit ca9eeba

Browse files
committed
Update tests/
1 parent d716197 commit ca9eeba

File tree

8 files changed

+7
-14
lines changed

8 files changed

+7
-14
lines changed

tests/test_bulletproof_agg.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
/* ---- Benchmark parameters ---- */
1616
#define VERIFY_RUNS 5
1717

18-
/* ---- Safety Macro for Release Mode ---- */
19-
/* This ensures checks run even when NDEBUG is defined (Release builds) */
18+
/* --- Macro: Persistent Assertion --- */
2019
#define EXPECT(cond, msg) do { \
2120
if (!(cond)) { \
2221
fprintf(stderr, "CRITICAL FAILURE: %s\nFile: %s, Line: %d\nCode: %s\n", \
@@ -208,4 +207,4 @@ int main(void) {
208207

209208
printf("[TEST] Aggregated Bulletproof test completed successfully\n");
210209
return 0;
211-
}
210+
}

tests/test_commitments.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
#include <openssl/rand.h>
66

77
/* --- Macro: Persistent Assertion --- */
8-
/* This macro works in both Debug and Release modes.
9-
It guarantees the condition code is executed and checks the result. */
108
#define EXPECT(condition) do { \
119
if (!(condition)) { \
1210
fprintf(stderr, "TEST FAILED: %s at line %d\n", #condition, __LINE__); \

tests/test_elgamal.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
#include "secp256k1_mpt.h"
77

88
/* --- Macro: Persistent Assertion --- */
9-
/* This macro works in both Debug and Release modes.
10-
It guarantees the condition code is executed and checks the result. */
119
#define EXPECT(condition) do { \
1210
if (!(condition)) { \
1311
fprintf(stderr, "TEST FAILED: %s at line %d\n", #condition, __LINE__); \

tests/test_elgamal_verify.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,4 @@ void test_elgamal_verify_encryption() {
7474
int main() {
7575
test_elgamal_verify_encryption();
7676
return 0;
77-
}
77+
}

tests/test_pok_sk.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#include <openssl/rand.h>
77

88
/* --- Macro: Persistent Assertion --- */
9-
/* Ensures checks run in both Debug and Release modes */
109
#define EXPECT(condition) do { \
1110
if (!(condition)) { \
1211
fprintf(stderr, "TEST FAILED: %s at line %d\n", #condition, __LINE__); \

tests/test_same_plaintext.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include <openssl/rand.h>
77
#include "secp256k1_mpt.h"
88

9-
/* IMPROVED MACRO: Robust error checking that works in Release mode */
9+
/* --- Macro: Persistent Assertion --- */
1010
#define EXPECT(cond, msg) do { \
1111
if (!(cond)) { \
1212
fprintf(stderr, "CRITICAL FAILURE: %s\nFile: %s, Line: %d\nCode: %s\n", \
@@ -182,4 +182,4 @@ int main() {
182182

183183
secp256k1_context_destroy(ctx);
184184
return 0;
185-
}
185+
}

tests/test_same_plaintext_multi.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#include "secp256k1_mpt.h"
77

88
/* --- Macro: Persistent Assertion --- */
9-
/* Ensures checks run in both Debug and Release modes */
109
#define EXPECT(condition) do { \
1110
if (!(condition)) { \
1211
fprintf(stderr, "TEST FAILED: %s at line %d\n", #condition, __LINE__); \

tests/test_same_plaintext_multi_shared_r.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include <secp256k1.h>
66
#include "secp256k1_mpt.h"
77

8-
/* IMPROVED MACRO: Robust error checking that works in Release mode */
8+
/* Robust error checking that works in Release mode */
99
#define EXPECT(cond, msg) do { \
1010
if (!(cond)) { \
1111
fprintf(stderr, "CRITICAL FAILURE: %s\nFile: %s, Line: %d\nCode: %s\n", \
@@ -123,4 +123,4 @@ int main() {
123123
printf("Test passed!\n");
124124
secp256k1_context_destroy(ctx);
125125
return 0;
126-
}
126+
}

0 commit comments

Comments
 (0)