michael@0: # Printing JSObjects. michael@0: michael@0: assert_subprinter_registered('SpiderMonkey', 'ptr-to-JSObject') michael@0: assert_subprinter_registered('SpiderMonkey', 'ref-to-JSObject') michael@0: michael@0: run_fragment('JSObject.simple') michael@0: michael@0: # These patterns look a little strange because of prolog.py's 'set print michael@0: # address off', which avoids putting varying addresses in the output. After michael@0: # the '(JSObject *) ', there is a 'void *' value printing as the empty michael@0: # string. michael@0: michael@0: assert_pretty('glob', '(JSObject *) [object global] delegate') michael@0: assert_pretty('plain', '(JSObject *) [object Object]') michael@0: assert_pretty('func', '(JSObject *) [object Function "dys"]') michael@0: assert_pretty('anon', '(JSObject *) [object Function ]') michael@0: assert_pretty('funcPtr', '(JSFunction *) [object Function "formFollows"]') michael@0: michael@0: assert_pretty('plainRef', '(JSObject &) @ [object Object]') michael@0: assert_pretty('funcRef', '(JSFunction &) @ [object Function "formFollows"]')