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

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     1 # Printing JSStrings.
     3 assert_subprinter_registered('SpiderMonkey', 'ptr-to-JSString')
     4 run_fragment('JSString.simple')
     6 assert_pretty('empty', '""')
     7 assert_pretty('x', '"x"')
     8 assert_pretty('z', '"z"')
     9 assert_pretty('xz', '"xz"')
    11 stars = gdb.parse_and_eval('stars')
    12 assert_eq(str(stars), "'*' <repeats 100 times>")
    14 doubleStars = gdb.parse_and_eval('doubleStars')
    15 assert_eq(str(doubleStars), "'*' <repeats 200 times>")
    17 assert_pretty('xRaw', '"x"')
    19 # JSAtom *
    21 run_fragment('JSString.atom')
    23 assert_pretty('molybdenum', '"molybdenum"')

mercurial