mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-15 17:02:53 +08:00
add a[b[x]] test
This commit is contained in:
parent
9256a87258
commit
06a77caca9
@ -3516,4 +3516,25 @@ TEST(parser, branket_issue3) {
|
||||
args_deinit(buffs);
|
||||
EXPECT_EQ(pikaMemNow(), 0);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if PIKA_SYNTAX_SLICE_ENABLE
|
||||
TEST(parser, branket_issue4) {
|
||||
pikaMemInfo.heapUsedMax = 0;
|
||||
Args* buffs = New_strBuff();
|
||||
char* lines = "a = b[c[y]]\n";
|
||||
__platform_printf("%s\n", lines);
|
||||
char* pikaAsm = Parser_multiLineToAsm(buffs, lines);
|
||||
__platform_printf("%s", pikaAsm);
|
||||
EXPECT_STREQ(pikaAsm,
|
||||
"B0\n"
|
||||
"1 REF b\n"
|
||||
"2 REF c\n"
|
||||
"2 REF y\n"
|
||||
"1 SLC \n"
|
||||
"0 SLC \n"
|
||||
"0 OUT a\n");
|
||||
args_deinit(buffs);
|
||||
EXPECT_EQ(pikaMemNow(), 0);
|
||||
}
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user