mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-29 17:22:56 +08:00
content tested ok
This commit is contained in:
parent
35e979dd52
commit
eb60efc293
@ -1 +1 @@
|
||||
Subproject commit 34fe79a0fa67e429e80325b31191afcb9397e2d3
|
||||
Subproject commit d2635e078010f97112655a0e27844823fc8c555d
|
@ -47,8 +47,8 @@ TEST(content, get)
|
||||
ASSERT_EQ(content[3], 4);
|
||||
ASSERT_EQ(totleSize, 16);
|
||||
|
||||
ASSERT_STREQ("name", name);
|
||||
ASSERT_STREQ("type", type);
|
||||
ASSERT_STREQ((char *)"name", name);
|
||||
ASSERT_STREQ((char *)"type", type);
|
||||
|
||||
content_deinit(self);
|
||||
EXPECT_EQ(pikaMemNow(), 0);
|
||||
@ -62,7 +62,7 @@ TEST(content, init)
|
||||
contentIn[2] = 3;
|
||||
contentIn[3] = 4;
|
||||
uint16_t sizeIn = 4;
|
||||
uint8_t *self = content_init("name", "type", contentIn, 4);
|
||||
uint8_t *self = content_init((char *)"name", (char *)"type", contentIn, 4);
|
||||
|
||||
uint16_t typeOffset = content_typeOffset(self);
|
||||
uint16_t sizeOffset = content_sizeOffset(self);
|
||||
@ -84,8 +84,8 @@ TEST(content, init)
|
||||
ASSERT_EQ(content[3], 4);
|
||||
ASSERT_EQ(totleSize, 16);
|
||||
|
||||
ASSERT_STREQ("name", name);
|
||||
ASSERT_STREQ("type", type);
|
||||
ASSERT_STREQ((char *)"name", name);
|
||||
ASSERT_STREQ((char *)"type", type);
|
||||
|
||||
content_deinit(self);
|
||||
EXPECT_EQ(pikaMemNow(), 0);
|
||||
@ -98,9 +98,9 @@ TEST(content, set)
|
||||
contentIn[1] = 2;
|
||||
contentIn[2] = 3;
|
||||
contentIn[3] = 4;
|
||||
uint8_t *self = content_init("", "", NULL, 0);
|
||||
self = content_setName(self, "name");
|
||||
self = content_setType(self, "type");
|
||||
uint8_t *self = content_init((char *)"", (char *)"", NULL, 0);
|
||||
self = content_setName(self, (char *)"name");
|
||||
self = content_setType(self, (char *)"type");
|
||||
self = content_setContent(self, contentIn, 4);
|
||||
|
||||
uint16_t typeOffset = content_typeOffset(self);
|
||||
|
Loading…
x
Reference in New Issue
Block a user