def test_dataclass_passthrough_default(self):
        """
        dumps() dataclass passes to default with OPT_PASSTHROUGH_DATACLASS
        """
        obj = Dataclass1("a", 1, None)
        assert (
            orjson.dumps(obj, option=orjson.OPT_PASSTHROUGH_DATACLASS, default=asdict)
            == b'{"name":"a","number":1,"sub":null}'
        )

        def default(obj):
            if isinstance(obj, Dataclass1):
                return {"name": obj.name, "number": obj.number}
            raise TypeError

        assert (
            orjson.dumps(obj, option=orjson.OPT_PASSTHROUGH_DATACLASS, default=default)
            == b'{"name":"a","number":1}'
        )

        dumps() dataclass passes to default with OPT_PASSTHROUGH_DATACLASS
        
test/test_dataclass.py