mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-15 17:02:53 +08:00
add test for block assert
This commit is contained in:
parent
bbe6845cde
commit
0cadf57c9a
@ -39,9 +39,17 @@ TEST(block, pop)
|
||||
TEST(block, assert1)
|
||||
{
|
||||
PikaObj *block = block_init();
|
||||
block_setAssert(block, (char *)"1");
|
||||
int res = block_checkAssert(block);
|
||||
ASSERT_EQ(1, res);
|
||||
{
|
||||
block_setAssert(block, (char *)"1");
|
||||
int res = block_checkAssert(block);
|
||||
ASSERT_EQ(1, res);
|
||||
}
|
||||
|
||||
{
|
||||
block_setAssert(block, (char *)"0");
|
||||
int res = block_checkAssert(block);
|
||||
ASSERT_EQ(0, res);
|
||||
}
|
||||
block_deinit(block);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user