Changeset View
Changeset View
Standalone View
Standalone View
lib/libbsnmp/tests/bsnmpd_test.c
- This file was added.
#include <bsnmp/asn1.h> | |||||
#include <atf-c.h> | |||||
ATF_TC_WITHOUT_HEAD(sa_19_20_bsnmp_test); | |||||
ATF_TC_BODY(sa_19_20_bsnmp_test, tc) | |||||
{ | |||||
struct asn_buf b = {}; | |||||
char test_buf[] = { 0x25, 0x7f }; | |||||
enum asn_err err; | |||||
cem: The explicit length can be dropped to size it correctly automatically, `char test_buf[] = { ... | |||||
asn_len_t len; | |||||
u_char type; | |||||
b.asn_cptr = test_buf; | |||||
b.asn_len = 0x03; | |||||
Not Done Inline Actions2, or sizeof(test_buf) cem: 2, or `sizeof(test_buf)` | |||||
Not Done Inline Actionsthis one was missed? cem: this one was missed? | |||||
err = asn_get_header(&b, &type, &len); | |||||
ATF_CHECK_EQ(ASN_ERR_EOBUF, err); | |||||
} | |||||
ATF_TP_ADD_TCS(tp) | |||||
{ | |||||
ATF_TP_ADD_TC(tp, sa_19_20_bsnmp_test); | |||||
return (atf_no_error()); | |||||
} |
The explicit length can be dropped to size it correctly automatically, char test_buf[] = { ... };