重构代码的架构设计,增加测试单元,提高代码可靠性
This commit is contained in:
14
tests/test_p0_utf8_hz12_get.c
Normal file
14
tests/test_p0_utf8_hz12_get.c
Normal file
@@ -0,0 +1,14 @@
|
||||
#include "../src/Drv/lcd/ascii.h"
|
||||
#include "test_common.h"
|
||||
|
||||
int main(void)
|
||||
{
|
||||
const uint8_t* hit = utf8_hz12_get(0x4F60u); /* 你 */
|
||||
const uint8_t* miss_low = utf8_hz12_get(0x0001u);
|
||||
const uint8_t* miss_high = utf8_hz12_get(0x10FFFFu);
|
||||
|
||||
ASSERT_TRUE(hit != NULL);
|
||||
ASSERT_TRUE(miss_low == NULL);
|
||||
ASSERT_TRUE(miss_high == NULL);
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user