Revisão | e54a397d6b68b9fa1e9789da5f0af2e84aec6d0b (tree) |
---|---|
Hora | 2018-06-05 23:04:31 |
Autor | dhrname <dhrname@user...> |
Commiter | dhrname |
Modify the startest
@@ -345,14 +345,15 @@ int main(int argc, char **argv) | ||
345 | 345 | init_token_length(tokens5, length); |
346 | 346 | varlist = ST_tokenize(u8"「「謎」(謎)愛」(愛)", tokens5); |
347 | 347 | btr = ST_parse(tokens5, length, varlist); |
348 | - assert(ST_getBoundVariable(ST_getListItem(btr, 0)) == ST_getItem(varlist, 0) ); | |
349 | - assert(ST_getBoundVariable(ST_getListItem(btr, 1)) == ST_getItem(varlist, 2) ); | |
350 | - lastvar = ST_getSecondTree(ST_getListItem(btr, 0)); | |
351 | - assert(ST_first(lastvar) == ST_getItem(varlist, 3) ); | |
352 | - assert(lastvar == ST_setChurchNumber(3, ST_second, varlist)); | |
353 | - lastvar = ST_getSecondTree(ST_getListItem(btr, 1)); | |
354 | - assert(ST_first(lastvar) == ST_getItem(varlist, 3) ); | |
355 | - assert(lastvar == ST_setChurchNumber(3, ST_second, varlist)); | |
348 | + assert( ST_isEmpty(ST_getPreviousNode(btr)) ); | |
349 | + assert( ST_isEmpty(ST_getPreviousNode(ST_getPreviousNode(ST_getLastChild(btr)))) ); | |
350 | + assert( ST_getBoundVariable(ST_getNodeValue(btr)) == ST_getItem(varlist, 0)); | |
351 | + | |
352 | + lastvar = ST_getLastChild(btr); | |
353 | + assert( ST_first(ST_getNodeValue(lastvar)) == ST_getItem(varlist, 1) ); | |
354 | + assert( ST_first(ST_getNodeValue(lastvar)) == ST_getItem(varlist, 0) ); | |
355 | + assert( ST_getBoundVariable(ST_getNodeValue(ST_getPreviousNode(lastvar))) == ST_getItem(varlist, 2) ); | |
356 | + assert( ST_first(ST_getNodeValue(ST_getLastChild(ST_getPreviousNode(lastvar)))) == ST_getItem(varlist, 3) ); | |
356 | 357 | ST_freetree(btr); |
357 | 358 | ST_freelist(varlist); |
358 | 359 |