source: java2python/core/test/testcode/PrintStreamExample.py@ 502

Last change on this file since 502 was 498, checked in by wouter, 19 months ago

add random test to Math

File size: 590 bytes
Line 
1import sys
2from typing import List
3
4
5class PrintStreamExample:
6 '''
7 Test for PrintStream. Uses several variants of print/println TODO also test
8 the other functions: write, append, printf, format etc
9 '''
10 @staticmethod
11 def main(args:List[str]) -> None:
12 '''
13
14 @param args the arguments of the call.
15 '''
16 sys.stdout.write("H")
17 sys.stdout.write("e")
18 sys.stdout.write(str(1))
19 sys.stdout.write(str(1.0))
20 sys.stdout.write(str(True))
21 sys.stdout.write('\n')
22 sys.stdout.write( (''.join(["b","y","e"]))+'\n')
23
24if __name__ == "__main__":
25 PrintStreamExample.main(sys.argv[1:])
Note: See TracBrowser for help on using the repository browser.