|
BSL v1.1.1 - 39.g9f43410
AMMOS Bundle Protocol Security Library (BSL)
|
#include "DefaultScUtils.h"#include <bsl/BPSecLib_Private.h>#include <bsl/mock_bpa/agent.h>#include <bsl/mock_bpa/decode.h>#include <bsl/mock_bpa/encode.h>#include <bsl/mock_bpa/log.h>#include <inttypes.h>#include <unity.h>
Include dependency graph for test_MockBPA_Codecs.c:Functions | |
| void | suiteSetUp (void) |
| int | suiteTearDown (int failures) |
| void | setUp (void) |
| void | tearDown (void) |
| void | test_bsl_mock_encode_primary (uint64_t crc_type, const char *expecthex) |
| void | test_bsl_mock_encode_canonical (uint64_t crc_type, const char *expecthex) |
| void | test_bsl_mock_encode_bundle (void) |
| void | test_bsl_loopback_eid (const char *hexdata) |
| TEST_CASE ("9f890700028201692f2f6473742f7376638201692f2f7372632f7376638201662f2f7372632f821b000000bd51281400001a000f4240" "4482a081c98601010002466568656c6c6f444ec359d2ff") | |
Variables | |
| static BSL_LibCtx_t | bsl |
| void setUp | ( | void | ) |
References bsl, BSL_API_InitLib(), and TEST_ASSERT_EQUAL().
| void suiteSetUp | ( | void | ) |
References BSL_HostDescriptors_Set(), mock_bpa_LogOpen(), and MockBPA_Agent_Descriptors().
| int suiteTearDown | ( | int | failures | ) |
References BSL_HostDescriptors_Clear(), and mock_bpa_LogClose().
| void tearDown | ( | void | ) |
References bsl, BSL_API_DeinitLib(), and TEST_ASSERT_EQUAL().
| void test_bsl_loopback_eid | ( | const char * | hexdata | ) |
| void test_bsl_mock_encode_bundle | ( | void | ) |
References MockBPA_CanonicalBlock_t::blk_num, MockBPA_CanonicalBlock_t::blk_type, MockBPA_Bundle_t::blocks, BSL_calloc(), BSL_CBOR_Encode_Twopass(), BSL_Data_Deinit(), BSL_Data_Init(), BSL_HostEID_DecodeFromText(), bsl_mock_encode_bundle(), BSL_SUCCESS, BSL_TestUtils_IsB16StrEqualTo(), MockBPA_CanonicalBlock_t::btsd, MockBPA_CanonicalBlock_t::btsd_len, MockBPA_CreationTimestamp_t::bundle_creation_time, MockBPA_CanonicalBlock_t::crc_type, MockBPA_PrimaryBlock_t::dest_eid, MockBPA_CanonicalBlock_t::flags, MockBPA_Bundle_Deinit(), MockBPA_Bundle_Init(), MockBPA_Bundle_t::primary_block, MockBPA_PrimaryBlock_t::report_to_eid, MockBPA_CreationTimestamp_t::seq_num, MockBPA_PrimaryBlock_t::src_node_id, TEST_ASSERT_TRUE(), MockBPA_PrimaryBlock_t::timestamp, and MockBPA_PrimaryBlock_t::version.
| void test_bsl_mock_encode_canonical | ( | uint64_t | crc_type, |
| const char * | expecthex | ||
| ) |
| void test_bsl_mock_encode_primary | ( | uint64_t | crc_type, |
| const char * | expecthex | ||
| ) |
References BSL_CBOR_Encode_Twopass(), BSL_Data_Deinit(), BSL_Data_Init(), BSL_HostEID_DecodeFromText(), BSL_HostEID_Deinit(), BSL_HostEID_Init(), BSL_HOSTEID_INIT_INVALID, bsl_mock_encode_primary(), BSL_SUCCESS, BSL_TestUtils_IsB16StrEqualTo(), MockBPA_PrimaryBlock_t::dest_eid, MockBPA_PrimaryBlock_t::report_to_eid, MockBPA_PrimaryBlock_t::src_node_id, TEST_ASSERT_TRUE(), and MockBPA_PrimaryBlock_t::version.
| TEST_CASE | ( | "9f890700028201692f2f6473742f7376638201692f2f7372632f7376638201662f2f7372632f821b000000bd51281400001a000f4240" "4482a081c98601010002466568656c6c6f444ec359d2ff" | ) |
References BSL_Data_Deinit(), BSL_Data_Init(), BSL_Data_Resize(), bsl_mock_decode_bundle(), bsl_mock_encode_bundle(), BSL_TestUtils_DecodeBase16_cstr(), BSL_TestUtils_IsB16StrEqualTo(), BSL_Data_t::len, MockBPA_Bundle_Deinit(), MockBPA_Bundle_Init(), BSL_Data_t::ptr, TEST_ASSERT_EQUAL_INT_MESSAGE(), and TEST_ASSERT_TRUE().
|
static |
Referenced by setUp(), and tearDown().