--- parser3/tests/261.html 2014/06/29 06:21:38 1.3
+++ parser3/tests/261.html 2023/09/28 02:03:56 1.6
@@ -8,6 +8,7 @@ $string_methods[^reflection:methods[stri
}
$s[]
+$w[ ]
$v[$void]
Empty string vs void:
@@ -18,18 +19,34 @@ Json (void as null): ^json:string[$s;$.v
Length: ^s.length[] vs ^v.length[]
Double: ^s.double(0) vs ^v.double(0)
Base64: "^s.base64[]" vs "^v.base64[]"
-Hash compatibility: "$s.key" "$v.key"
+Hash compatibility: "$s.key" "$w.key" "$v.key"
+More hash compatibility: "^b[^s.contains[key]]" "^b[^w.contains[key]]" "^b[^w.contains[key]]"
+Methods are visible: "^show[$s.length]" "^show[$w.length]" "^show[$v.length]"
-Non-empty string: ^try{
+Non-empty or whitespace string not hash compatible: ^try-catch{
$s[string]
$s.key
-}{
- $exception.handled(1)
- has no hash compatibility
+}
+Absent method empty string error: ^try-catch{
+ $s[]
+ ^s.something[]
+}
+Absent method void error: ^try-catch{
+ ^v.something[]
+}
+Absent method non-empty string error: ^try-catch{
+ $s[string]
+ ^s.something[]
}
^string_methods.foreach[k;v]{
- ^if(!($v.$k is 'junction')){
+ ^if(!^void_methods.contains[$k]){
String method $k absent in void
}
}
+
+@b[v]{
+^if($v){true}{false}
+
+@show[v]
+$v.CLASS_NAME