use str(b) instead of 'test' + b

This commit is contained in:
lyon 2022-01-09 00:16:01 +08:00
parent 659d92c377
commit fa799bd361

View File

@ -541,8 +541,8 @@ TEST(pikaMain, str_add) {
"c = a + b\n" "c = a + b\n"
"d = 1\n" "d = 1\n"
"e = 1.2\n" "e = 1.2\n"
"g = c + d\n" "g = c + str(d)\n"
"h = (c + d) + e\n" "h = c + str(d) + str(e)\n"
"\n" "\n"
); );
/* collect */ /* collect */
@ -564,7 +564,7 @@ TEST(pikaMain, str_add_print) {
PikaObj* pikaMain = newRootObj((char*)"pikaMain", New_PikaMain); PikaObj* pikaMain = newRootObj((char*)"pikaMain", New_PikaMain);
/* run */ /* run */
obj_run(pikaMain, (char*) obj_run(pikaMain, (char*)
"print('test: ' + 2233)\n" "print('test: ' + str(2233))\n"
"\n" "\n"
); );
/* collect */ /* collect */