Unit test for the registry introspection and serialization APIs.
This test file validates the new APIs for inspecting and dumping the contents of a named type registry. It ensures that developers can accurately debug and serialize the types they have defined.
The test covers:
- infix_registry_print:
- Verifies that all defined types are serialized into a single string.
- Confirms that undefined forward declarations are explicitly listed as incomplete types.
- Checks that the function returns an error when the provided buffer is too small.
- Registry Iterator (infix_registry_iterator_*):
- Verifies that the iterator correctly traverses all defined types in the registry.
- Confirms that the correct number of types are found.
- Checks that the get_name and get_type accessors return the correct data for each type.