feat: replace IO class with System class and remove separate IO module

- Delete wren_io.c, wren_io.h, and io.wren source files
- Remove multi-arity print overloads and IO.read/IO.time methods
- Add System class with print, printAll, write, writeAll methods to core.wren
- Update all documentation examples and README to use System.print instead of IO.print
This commit is contained in:
Bob Nystrom
2015-09-15 14:46:09 +00:00
parent f12581a674
commit aa72900a9e
491 changed files with 3285 additions and 3544 deletions
+19 -19
View File
@@ -1,28 +1,28 @@
IO.print("" == "") // expect: true
IO.print("abcd" == "abcd") // expect: true
IO.print("abcd" == "d") // expect: false
IO.print("e" == "abcd") // expect: false
IO.print("" == "abcd") // expect: false
System.print("" == "") // expect: true
System.print("abcd" == "abcd") // expect: true
System.print("abcd" == "d") // expect: false
System.print("e" == "abcd") // expect: false
System.print("" == "abcd") // expect: false
// Not equal to other types.
IO.print("1" == 1) // expect: false
IO.print("true" == true) // expect: false
System.print("1" == 1) // expect: false
System.print("true" == true) // expect: false
IO.print("" != "") // expect: false
IO.print("abcd" != "abcd") // expect: false
IO.print("abcd" != "d") // expect: true
IO.print("e" != "abcd") // expect: true
IO.print("" != "abcd") // expect: true
System.print("" != "") // expect: false
System.print("abcd" != "abcd") // expect: false
System.print("abcd" != "d") // expect: true
System.print("e" != "abcd") // expect: true
System.print("" != "abcd") // expect: true
// Not equal to other types.
IO.print("1" != 1) // expect: true
IO.print("true" != true) // expect: true
System.print("1" != 1) // expect: true
System.print("true" != true) // expect: true
// Non-ASCII.
IO.print("vålue" == "value") // expect: false
IO.print("vålue" == "vålue") // expect: true
System.print("vålue" == "value") // expect: false
System.print("vålue" == "vålue") // expect: true
// 8-bit clean.
IO.print("a\0b\0c" == "a") // expect: false
IO.print("a\0b\0c" == "abc") // expect: false
IO.print("a\0b\0c" == "a\0b\0c") // expect: true
System.print("a\0b\0c" == "a") // expect: false
System.print("a\0b\0c" == "abc") // expect: false
System.print("a\0b\0c" == "a\0b\0c") // expect: true