diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /js/src/gdb/tests/test-prettyprinters.py | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'js/src/gdb/tests/test-prettyprinters.py')
-rw-r--r-- | js/src/gdb/tests/test-prettyprinters.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/js/src/gdb/tests/test-prettyprinters.py b/js/src/gdb/tests/test-prettyprinters.py new file mode 100644 index 000000000..9c380fdda --- /dev/null +++ b/js/src/gdb/tests/test-prettyprinters.py @@ -0,0 +1,22 @@ +import mozilla.prettyprinters + +run_fragment('prettyprinters.implemented_types') + +def implemented_type_names(expr): + v = gdb.parse_and_eval(expr) + it = mozilla.prettyprinters.implemented_types(v.type) + return [str(_) for _ in it] + +assert_eq(implemented_type_names('i'), ['int']) +assert_eq(implemented_type_names('a'), ['A', 'int']) +assert_eq(implemented_type_names('b'), ['B', 'A', 'int']) +assert_eq(implemented_type_names('c'), ['C']) +assert_eq(implemented_type_names('c_'), ['C_', 'C']) +assert_eq(implemented_type_names('e'), ['E', 'C', 'D']) +assert_eq(implemented_type_names('e_'), ['E_', 'E', 'C', 'D']) +assert_eq(implemented_type_names('f'), ['F', 'C', 'D']) +assert_eq(implemented_type_names('h'), ['H', 'F', 'G', 'C', 'D']) + +# Check that our pretty-printers aren't interfering with printing other types. +assert_pretty('10', '10') +assert_pretty('(void*) 0', '') # Because of 'set print address off' |