summaryrefslogtreecommitdiffstats
path: root/js/src/gdb/tests/typedef-printers.py
blob: 888379ee63780771782f2b403117009ecec998d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Test that we can find pretty-printers for typedef names, not just for
# struct types and templates.
# flake8: noqa: F821

import mozilla.prettyprinters


@mozilla.prettyprinters.pretty_printer("my_typedef")
class my_typedef(object):
    def __init__(self, value, cache):
        pass

    def to_string(self):
        return "huzzah"


run_fragment("typedef_printers.one")
assert_pretty("i", "huzzah")