DTNMA Reference Tools v2.0.0 - 9.gaff6489
Delay-Tolerant Networking Management Architecture (DTNMA) Tool Suite
|
Test the cace_ari_cbor.h interfaces. More...
#include <cace/ari/cbor.h>
#include <cace/ari/text.h>
#include <cace/ari/text_util.h>
#include <cace/amm/typing.h>
#include <cace/util/logging.h>
#include <unity.h>
Macros | |
#define | TEST_CASE(...) |
Functions | |
void | suiteSetUp (void) |
int | suiteTearDown (int failures) |
void | tearDown (void) |
static void | check_encoding (const cace_ari_t *ari, const char *expect_hex) |
void | test_cace_ari_cbor_encode_lit_prim_undef (void) |
void | test_cace_ari_cbor_encode_lit_prim_null (void) |
void | test_cace_ari_cbor_encode_lit_prim_uint (void) |
void | test_cace_ari_cbor_encode_lit_prim_text_nocopy (void) |
void | test_cace_ari_cbor_encode_lit_prim_text_copy (void) |
void | test_cace_ari_cbor_encode_lit_typed_tp (void) |
void | test_cace_ari_cbor_encode_lit_typed_td (void) |
void | test_cace_ari_cbor_encode_lit_typed_ac_empty (void) |
void | test_cace_ari_cbor_encode_lit_typed_ac_1item (void) |
TEST_CASE ("example", "adm-a", "2024-06-25", false, 0, NULL, "85676578616D706C656561646D2D61D903EC6A323032342D30362D3235F6F6") | |
void | test_cace_ari_cbor_encode_objref_path_int (bool has_org, cace_ari_int_id_t org_id, bool has_model, cace_ari_int_id_t model_id, bool has_type, cace_ari_type_t type_id, bool has_obj, cace_ari_int_id_t obj_id, const char *expect_hex) |
static void | check_decoding (cace_ari_t *ari, const char *inhex) |
TEST_CASE ("84676578616D706C656361646D21626869", "example", "adm", NULL, CACE_ARI_TYPE_CONST, "hi") | |
void | test_cace_ari_cbor_decode_objref_path_int (const char *hexval, cace_ari_int_id_t org_id, cace_ari_int_id_t model_id, cace_ari_type_t type_id, cace_ari_int_id_t obj_id) |
void | test_cace_ari_cbor_decode_rptset (const char *hexval, int expect_nonce, time_t expect_tv_sec, long expect_tv_nsec, int expect_reports) |
void | test_cace_ari_cbor_encode_rptset (const char *expect_hexval, int nonce, time_t tv_sec, long tv_nsec) |
void | test_cace_ari_cbor_decode_lit_prim_undef (void) |
void | test_cace_ari_cbor_decode_lit_prim_null (void) |
void | test_cace_ari_cbor_decode_lit_prim_bool (const char *inhex, bool expect) |
void | test_cace_ari_cbor_decode_lit_prim_int64 (const char *inhex, int64_t expect) |
void | test_cace_ari_cbor_decode_lit_prim_uint64 (const char *inhex, uint64_t expect) |
void | test_cace_ari_cbor_decode_lit_prim_float32 (const char *inhex, cace_ari_real32 expect) |
void | test_cace_ari_cbor_decode_lit_prim_float64 (const char *inhex, cace_ari_real64 expect) |
void | test_cace_ari_cbor_decode_lit_prim_tstr (const char *inhex, const char *expect) |
void | test_cace_ari_cbor_decode_lit_prim_bstr (const char *inhex, const char *expect, size_t expect_len) |
void | test_cace_ari_cbor_decode_lit_typed_null (void) |
void | test_cace_ari_cbor_decode_lit_typed_bool (const char *inhex, bool expect) |
void | test_cace_ari_cbor_decode_lit_typed_int64 (const char *inhex, cace_ari_type_t typ, int64_t expect) |
void | test_cace_ari_cbor_decode_lit_typed_real64 (const char *inhex, bool expect) |
void | test_cace_ari_cbor_decode_tp (const char *inhex, time_t expect_sec, long expect_nsec) |
TEST_CASE ("8214841904d28519ffff01220c8af7f7f58214841904d28519ff2e01220c" "8af7f6f40d8225040a29fa497a247e006009f92b1540820960f97e841904" "d28519ffff01220c8af7f7f5f40a8214841904d28519ffff01220c8af7f7" "f58214841904d28519ff2e01220caaf7f6f40d8225040a29fa497a247e00" "6009f92b1540820960f97e841904d28519ffff01220c8af7f7f5f40a29fa" "820d822582148419044060f97ef92b0440820960f97e008209f92b29fa82" "0d822582148419044060f97ef92b0440820960f97e008209f92b15") | |
void | test_cace_ari_cbor_decode_partial (const char *inhex) |
void | test_cace_ari_cbor_decode_invalid (const char *inhex) |
TEST_CASE ("82148342686984676578616D706C6564746573742262686984676578616D706C65647465737422626568") | |
Variables | |
static char * | errm = NULL |
Resource cleanup for failure messages. | |
Test the cace_ari_cbor.h interfaces.
As a shortcut to producing expected binary contents, use commands similar to: