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