michael@0: # Printing JSStrings. michael@0: michael@0: assert_subprinter_registered('SpiderMonkey', 'ptr-to-JSString') michael@0: run_fragment('JSString.simple') michael@0: michael@0: assert_pretty('empty', '""') michael@0: assert_pretty('x', '"x"') michael@0: assert_pretty('z', '"z"') michael@0: assert_pretty('xz', '"xz"') michael@0: michael@0: stars = gdb.parse_and_eval('stars') michael@0: assert_eq(str(stars), "'*' ") michael@0: michael@0: doubleStars = gdb.parse_and_eval('doubleStars') michael@0: assert_eq(str(doubleStars), "'*' ") michael@0: michael@0: assert_pretty('xRaw', '"x"') michael@0: michael@0: # JSAtom * michael@0: michael@0: run_fragment('JSString.atom') michael@0: michael@0: assert_pretty('molybdenum', '"molybdenum"')