10 #include "CUnit/CUnit.h"
28 char *Sin =
"hello name=larry, very good";
34 char *predictValue =
"name=larry, very good";
37 CU_ASSERT_TRUE(!strcmp(
Result, predictValue));
55 char *predictValue = NULL;
58 CU_ASSERT_EQUAL(
Result, predictValue);
70 char *Sin =
"name=larry, very good";
75 char *predictField =
"name";
76 char *predictValue =
"=larry, very good";
77 char Separator =
'\0';
80 CU_ASSERT_TRUE(!strcmp(
Result, predictValue));
81 CU_ASSERT_TRUE(!strcmp(Field, predictField));
char * GetFieldValue(char *Sin, char *Field, int FieldMax, char *Value, int ValueMax)
Given a string that contains field='value' pairs, save the items.
void test_GetFieldValue_sin_is_null()
test case for input parameter is NULL
void test_GetFieldValue_noseparator()
test case for don't set input separator
void test_GetFieldValue_normal()
test case for input parameter is normal
CU_TestInfo testcases_GetFieldValue[]
testcases for function GetFieldValue
static int Result
Result of calls.