ObjLitGetSet.baseline 1.3 KB

1234567891011121314151617181920212223242526
  1. ES 5 Object Literal grammer
  2. (test 1): Object literal get set property
  3. Success: Expected o.foo getter = In getter, got In getter
  4. Success: Expected o.foo setter = Modified by setter, got Modified by setter
  5. PASS
  6. (test 2): Object literal only get or set property
  7. Success: Expected o.foo getter = 20, got 20
  8. Success: Expected b.foo = Modified by setter, got Modified by setter
  9. PASS
  10. (test 3): Object literal multiple setget property
  11. Success: Expected o.foo get after set = 4, got 4
  12. Success: Expected o.foo get after set = 6, got 6
  13. Success: Expected o.bar get after set = 8, got 8
  14. Success: Expected o.bar get after set = 18, got 18
  15. PASS
  16. (test 4): Object literal parse error check
  17. Success: Expected get property accessor in object literal must not accept any args = true, got true
  18. Success: Expected set property accessor in object literal must accept only one args = true, got true
  19. Success: Expected Throw parse error in multiple property name = true, got true
  20. Success: Expected invalid syntax if set keyword is a string (then it is just a normal property name) = true, got true
  21. Success: Expected invalid syntax if get keyword is a string (then it is just a normal property name) = true, got true
  22. PASS
  23. (test 5): Object literal get set function toString
  24. function foo() { return _foo; }
  25. function foo(value) { _foo = value; }
  26. PASS