25 lines
444 B
C++
25 lines
444 B
C++
#include <stdio.h>
|
|
#include <stdint.h>
|
|
#include <string.h>
|
|
|
|
#include <gtest/gtest.h>
|
|
|
|
#include <di/drv/hl854x.h>
|
|
extern "C" {
|
|
#include "drv/hl854x/con.c"
|
|
}
|
|
|
|
TEST(drv_hl854x_con, cb_kcnx_ind) {
|
|
struct di_drv_hl854x_ctx ctx;
|
|
char kcnx_ind[] = "1,4";
|
|
|
|
di_drv_hl854x_init(&ctx);
|
|
|
|
ctx.me.cfg.private_data = &ctx;
|
|
ctx.me.match.str = kcnx_ind;
|
|
|
|
di_drv_hl854x_con_cb_kcnx_ind(&ctx.me);
|
|
|
|
EXPECT_EQ(ctx.con.state, HL854X_CON_STATE_CONNECTING);
|
|
}
|