OCT 1.增加add接口规范 2.修正测试代码中的未初始化
This commit is contained in:
parent
760a6eb14a
commit
f55b4b5647
|
@ -55,8 +55,12 @@ typedef struct {
|
|||
|
||||
static JSON_POST_CTX g_add_msg[] = {
|
||||
{R"({"type":"object","required":["rangeSet"]})", "Missing required field [rangeSet]"},
|
||||
{R"({"properties":{"rangeSet":{"type":"array","minItems":1}}})", "No content in field [rangeSet]"},
|
||||
{R"({"properties":{"rangeSet":{"type":"array","minItems":1}}})", "No content in array [rangeSet]"},
|
||||
{R"({"properties":{"rangeSet":{"items":{"type":"object","required":["dhcpRange"]}}}})", "Missing required field [dhcpRange]"},
|
||||
{R"({"properties":{"rangeSet":{"items":{"properties":{"netmask":{"type":"string"}}}}}})", "[netmask] should be a string value"},
|
||||
{R"({"properties":{"rangeSet":{"items":{"properties":{"domainServer":{"type":"string"}}}}}})", "[domainServer] should be a string value"},
|
||||
{R"({"properties":{"rangeSet":{"items":{"properties":{"gateway":{"type":"string"}}}}}})", "[gateway] should be a string value"},
|
||||
{R"({"properties":{"rangeSet":{"items":{"properties":{"leaseTime":{"type":"integer"}}}}}})", "[leaseTime] should be an integer value"},
|
||||
// {R"({"properties":{"rangeSet":{"items":{"properties":{"dhcpRange":{"type":"string","minLength":15}}}}}})", "Error in field [dhcpRange]"}
|
||||
};
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
TEST_SUITE("Hardware functions") {
|
||||
TEST_CASE("CPU") {
|
||||
PCPU_INFO cpuInfo;
|
||||
memset(cpuInfo, 0, sizeof(CPU_INFO));
|
||||
memset(&cpuInfo, 0, sizeof(PCPU_INFO));
|
||||
|
||||
cpu_watch_init();
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ TEST_SUITE("UTArray") {
|
|||
|
||||
TEST_CASE("PUSH") {
|
||||
PCOMBO p_combo;
|
||||
memset(&p_combo, 0, sizeof(PCOMBO));
|
||||
|
||||
utarray_new(nums, &ut_combo_icd);
|
||||
|
||||
|
@ -37,6 +38,7 @@ TEST_SUITE("UTArray") {
|
|||
|
||||
TEST_CASE("POP") {
|
||||
PCOMBO p_combo;
|
||||
memset(&p_combo, 0, sizeof(PCOMBO));
|
||||
MESSAGE("original len: ", utarray_len(nums));
|
||||
while(utarray_len(nums) != 0) {
|
||||
p_combo = (PCOMBO)utarray_next(nums, p_combo);
|
||||
|
|
Loading…
Reference in New Issue