diff options
| author | Your Name <you@example.com> | 2026-05-23 23:24:07 +0530 |
|---|---|---|
| committer | Your Name <you@example.com> | 2026-05-23 23:24:07 +0530 |
| commit | e40645e07e4076610abc8270fba421dbdd8fc217 (patch) | |
| tree | 81dc395d5983461d44e032da50dece540831e8f0 /tests/unit/Makefile | |
| parent | bf8e095b94fe500a9c35d7f2f616eb85569dbe5e (diff) | |
test: add relay_types, sub_manager, deletion unit tests
- test_relay_types: hex_to_bytes/bytes_to_hex with known vectors,
roundtrip, edge cases (17 assertions)
- test_sub_manager: hex_prefix_match, filter_matches_event for
NIP-01 kind/author/since/until filtering (23 assertions)
- test_deletion: extract_event_id_field, extract_pubkey_hex with
valid/invalid JSON vectors (14 assertions)
- All 28 test files pass, 0 failures
Diffstat (limited to 'tests/unit/Makefile')
| -rw-r--r-- | tests/unit/Makefile | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/unit/Makefile b/tests/unit/Makefile index 591ec0f..2d89859 100644 --- a/tests/unit/Makefile +++ b/tests/unit/Makefile | |||
| @@ -26,7 +26,7 @@ LDFLAGS := -lmbedcrypto -lcjson -lm | |||
| 26 | 26 | ||
| 27 | SECP256K1_OBJ := secp256k1.o precomputed_ecmult.o precomputed_ecmult_gen.o | 27 | SECP256K1_OBJ := secp256k1.o precomputed_ecmult.o precomputed_ecmult_gen.o |
| 28 | 28 | ||
| 29 | TESTS := test_geohash test_identity test_nostr_event test_cashu test_session test_tollgate_client test_lnurl_pay test_lightning_payout test_mcp_handler test_nip04 test_cvm_server test_beacon_price test_market test_mint_health test_mining_payment test_stratum_proxy test_session_payment_method test_tollgate_client_mining test_firewall_sandbox test_relay_selector test_relay_validator test_portal test_stratum_client test_mint_health_core test_client_core | 29 | TESTS := test_geohash test_identity test_nostr_event test_cashu test_session test_tollgate_client test_lnurl_pay test_lightning_payout test_mcp_handler test_nip04 test_cvm_server test_beacon_price test_market test_mint_health test_mining_payment test_stratum_proxy test_session_payment_method test_tollgate_client_mining test_firewall_sandbox test_relay_selector test_relay_validator test_portal test_stratum_client test_mint_health_core test_client_core test_relay_types test_sub_manager test_deletion |
| 30 | 30 | ||
| 31 | .PHONY: all test clean $(TESTS) | 31 | .PHONY: all test clean $(TESTS) |
| 32 | 32 | ||
| @@ -129,5 +129,14 @@ test_mint_health_core: test_mint_health_core.c $(TG_CORE_SRC)/tollgate_core_mint | |||
| 129 | test_client_core: test_client_core.c $(TG_CORE_SRC)/tollgate_core_client.c | 129 | test_client_core: test_client_core.c $(TG_CORE_SRC)/tollgate_core_client.c |
| 130 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) | 130 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) |
| 131 | 131 | ||
| 132 | test_relay_types: test_relay_types.c $(REPO_ROOT)/components/wisp_relay/relay_types.c | ||
| 133 | $(CC) $(CFLAGS) -I $(REPO_ROOT)/components/wisp_relay $^ -o $@ $(LDFLAGS) | ||
| 134 | |||
| 135 | test_sub_manager: test_sub_manager.c | ||
| 136 | $(CC) $(CFLAGS) $< -o $@ $(LDFLAGS) | ||
| 137 | |||
| 138 | test_deletion: test_deletion.c $(REPO_ROOT)/components/wisp_relay/relay_types.c | ||
| 139 | $(CC) $(CFLAGS) -I $(REPO_ROOT)/components/wisp_relay $^ -o $@ $(LDFLAGS) | ||
| 140 | |||
| 132 | clean: | 141 | clean: |
| 133 | rm -f $(TESTS) $(SECP256K1_OBJ) | 142 | rm -f $(TESTS) $(SECP256K1_OBJ) |