2015-09-15 07:46:09 -07:00
|
|
|
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
|
2013-11-05 09:57:57 -08:00
|
|
|
|
|
|
|
|
// Not equal to other types.
|
2015-09-15 07:46:09 -07:00
|
|
|
System.print("1" == 1) // expect: false
|
|
|
|
|
System.print("true" == true) // expect: false
|
2013-11-05 09:57:57 -08:00
|
|
|
|
2015-09-15 07:46:09 -07:00
|
|
|
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
|
2013-11-05 09:57:57 -08:00
|
|
|
|
|
|
|
|
// Not equal to other types.
|
2015-09-15 07:46:09 -07:00
|
|
|
System.print("1" != 1) // expect: true
|
|
|
|
|
System.print("true" != true) // expect: true
|
2015-01-22 15:28:54 -08:00
|
|
|
|
|
|
|
|
// Non-ASCII.
|
2015-09-15 07:46:09 -07:00
|
|
|
System.print("vålue" == "value") // expect: false
|
|
|
|
|
System.print("vålue" == "vålue") // expect: true
|
2015-02-04 13:58:16 +01:00
|
|
|
|
2015-02-04 20:26:29 -08:00
|
|
|
// 8-bit clean.
|
2015-09-15 07:46:09 -07:00
|
|
|
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
|