Results for ysh-object.test.sh

statusysh
pass 13
FAIL 2
total15
caseyshdescription
0pass New Obj API
1pass Object() creates prototype chain
2pass prototype()
3pass propView()
4pass Mutating method lookup with ->
5pass Mutating method must be up the prototype chain, not on the object
6pass Copy to Dict with dict(), and mutate
7pass setvar obj.attr = and += and ...
8pass obj['attr'] not allowed (for now)
9FAIL setvar obj['attr'] = 3 ?
details
10pass can't encode objects as JSON
11pass Can all builtin methods with s.upper()
12pass invokable Obj must be have prototype containing __invoke__ of value.Proc - type -t
13pass Object with longer prototype chain
14FAIL __readonly__ in prototype makes objects readonly
details
13 passed, 0 OK, 0 not implemented, 0 BUG, 2 failed, 0 timeouts, 0 cases skipped
2 failed under osh

Details on runs that didn't PASS

ysh9 setvar obj['attr'] = 3 ?

[ysh stdout] Expected '', got '(Obj) ("x":99,"y":4)\n'
[ysh status] Expected 3, got 0

stdout:
(Obj)   ("x":99,"y":4)
stderr:
ysh14 __readonly__ in prototype makes objects readonly

[ysh stdout] Expected '', got '(Obj) (__readonly__: true)\n(Int) 140378339862320\n(Int) 140378339862800\n(Obj) (x: 198) --> (__readonly__: true)\n(Int) 140378339863280\n(Int) 198\n'
[ysh status] Expected 0, got 3

stdout:
(Obj)   (__readonly__: true)
(Int)   140378339862320
(Int)   140378339862800
(Obj)   (x: 198) --> (__readonly__: true)
(Int)   140378339863280
(Int)   198
stderr:
  = keys(obj)
         ^~~
[ stdin ]:22: fatal: Arg 1 should be a Dict, got Obj