js/src/gdb/tests/test-JSObject.py

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/src/gdb/tests/test-JSObject.py	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,20 @@
     1.4 +# Printing JSObjects.
     1.5 +
     1.6 +assert_subprinter_registered('SpiderMonkey', 'ptr-to-JSObject')
     1.7 +assert_subprinter_registered('SpiderMonkey', 'ref-to-JSObject')
     1.8 +
     1.9 +run_fragment('JSObject.simple')
    1.10 +
    1.11 +# These patterns look a little strange because of prolog.py's 'set print
    1.12 +# address off', which avoids putting varying addresses in the output. After
    1.13 +# the '(JSObject *) ', there is a 'void *' value printing as the empty
    1.14 +# string.
    1.15 +
    1.16 +assert_pretty('glob', '(JSObject *)  [object global] delegate')
    1.17 +assert_pretty('plain', '(JSObject *)  [object Object]')
    1.18 +assert_pretty('func', '(JSObject *)  [object Function "dys"]')
    1.19 +assert_pretty('anon', '(JSObject *)  [object Function <unnamed>]')
    1.20 +assert_pretty('funcPtr', '(JSFunction *)  [object Function "formFollows"]')
    1.21 +
    1.22 +assert_pretty('plainRef', '(JSObject &) @ [object Object]')
    1.23 +assert_pretty('funcRef', '(JSFunction &) @ [object Function "formFollows"]')

mercurial