Skip to content

Commit aed4c1d

Browse files
add more tests
1 parent 417fa73 commit aed4c1d

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

mypyc/test-data/irbuild-str.test

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -614,14 +614,34 @@ floating: Final = 3.14
614614
boolean: Final = True
615615

616616
def test(x: str) -> str:
617+
return f"{string}{integer}{floating}{boolean}{x}{boolean}{floating}{integer}{string}{x}{string}{integer}{floating}{boolean}"
618+
def test2(x: str) -> str:
617619
return f"{string}{integer}{floating}{boolean}{x}{boolean}{floating}{integer}{string}{x}{string}{integer}{floating}{boolean}{x}"
620+
def test3(x: str) -> str:
621+
return f"{x}{string}{integer}{floating}{boolean}{x}{boolean}{floating}{integer}{string}{x}{string}{integer}{floating}{boolean}{x}"
618622

619623
[out]
620624
def test(x):
621625
x, r0, r1, r2, r3 :: str
626+
L0:
627+
r0 = 'abc1233.14True'
628+
r1 = 'True3.14123abc'
629+
r2 = 'abc1233.14True'
630+
r3 = CPyStr_Build(5, r0, x, r1, x, r2)
631+
return r3
632+
def test2(x):
633+
x, r0, r1, r2, r3 :: str
622634
L0:
623635
r0 = 'abc1233.14True'
624636
r1 = 'True3.14123abc'
625637
r2 = 'abc1233.14True'
626638
r3 = CPyStr_Build(6, r0, x, r1, x, r2, x)
627639
return r3
640+
def test3(x):
641+
x, r0, r1, r2, r3 :: str
642+
L0:
643+
r0 = 'abc1233.14True'
644+
r1 = 'True3.14123abc'
645+
r2 = 'abc1233.14True'
646+
r3 = CPyStr_Build(7, x, r0, x, r1, x, r2, x)
647+
return r3

0 commit comments

Comments
 (0)