--- parser3/tests/261.html 2010/10/24 21:41:25 1.2 +++ parser3/tests/261.html 2015/10/26 00:41:41 1.4 @@ -1,33 +1,40 @@ -@main[] - -$void_methods[^reflection:methods[void]] -$string_methods[^reflection:methods[string]] - -^if($void_methods != $string_methods){ - String has ^string_methods._count[] while void has ^void_methods._count[]. -} - -$s[] -$v[$void] - -Empty string vs void: - -Json: ^json:string[$s] vs ^json:string[$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" - -Non-empty string: ^try{ - $s[string] - $s.key -}{ - $exception.handled(1) - has no hash compatibility -} - -^string_methods.foreach[k;v]{ - ^if(!($v.$k is 'junction')){ - String method $k absent in void - } -} +@main[] + +$void_methods[^reflection:methods[void]] +$string_methods[^reflection:methods[string]] + +^if($void_methods != $string_methods){ + String has ^string_methods._count[] while void has ^void_methods._count[]. +} + +$s[] +$v[$void] + +Empty string vs void: + +Json: ^json:string[$s] vs ^json:string[$v] +Json (void as string): ^json:string[$s;$.void[string]] vs ^json:string[$v;$.void[string]] +Json (void as null): ^json:string[$s;$.void[null]] vs ^json:string[$v;$.void[null]] +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" + +Non-empty string not hash compatible: ^try-catch{ + $s[string] + $s.key +} +Absent method empty string error: ^try-catch{ + $s[string] + ^s.something[] +} +Absent method non-empty string error: ^try-catch{ + $s[] + ^s.something[] +} + +^string_methods.foreach[k;v]{ + ^if(!($v.$k is 'junction')){ + String method $k absent in void + } +}