(** XML basic codec fixtures and cases. *) val parse_ok : string -> Xml.Value.t (** [parse_ok s] parses [s] or fails with its structured XML error. *) val parse_err : string -> unit (** [parse_err s] checks that parsing [s] fails. *) val test_simple_element : unit -> unit (** [test_simple_element ()] checks the simple element case. *) val test_attributes : unit -> unit (** [test_attributes ()] checks the attributes case. *) val test_single_quoted_attrs : unit -> unit (** [test_single_quoted_attrs ()] checks the single-quoted attrs case. *) val test_nested_elements : unit -> unit (** [test_nested_elements ()] checks the nested elements case. *) val test_mixed_content : unit -> unit (** [test_mixed_content ()] checks the mixed content case. *) val test_self_closing : unit -> unit (** [test_self_closing ()] checks the self-closing case. *) val test_self_closing_with_space : unit -> unit (** [test_self_closing_with_space ()] checks the self-closing with space case. *) val test_cdata : unit -> unit (** [test_cdata ()] checks the CDATA case. *) val test_cdata_with_ampersand : unit -> unit (** [test_cdata_with_ampersand ()] checks the CDATA with ampersand case. *) val test_entity_refs : unit -> unit (** [test_entity_refs ()] checks the entity references case. *) val test_entity_quot_apos : unit -> unit (** [test_entity_quot_apos ()] checks the entity quot/apos case. *) val test_entity_in_attr : unit -> unit (** [test_entity_in_attr ()] checks the entity in attribute case. *) val test_numeric_entity : unit -> unit (** [test_numeric_entity ()] checks the numeric entity refs case. *) val test_comments_skipped : unit -> unit (** [test_comments_skipped ()] checks the comments skipped case. *) val test_comment_in_preamble : unit -> unit (** [test_comment_in_preamble ()] checks the comment in preamble case. *) val test_xml_declaration : unit -> unit (** [test_xml_declaration ()] checks the XML declaration case. *) val test_xml_declaration_with_encoding : unit -> unit (** [test_xml_declaration_with_encoding ()] checks the XML declaration with encoding case. *) val test_processing_instruction : unit -> unit (** [test_processing_instruction ()] checks the processing instruction case. *) val test_pi_in_content : unit -> unit (** [test_pi_in_content ()] checks the PI in content case. *) val test_roundtrip : unit -> unit (** [test_roundtrip ()] checks the roundtrip case. *) val test_indent_preserves_mixed_content : unit -> unit (** [test_indent_preserves_mixed_content ()] checks the indent preserves mixed content case. *) val test_roundtrip_with_indent : unit -> unit (** [test_roundtrip_with_indent ()] checks the roundtrip with indent case. *) val test_unclosed_tag : unit -> unit (** [test_unclosed_tag ()] checks the unclosed tag case. *) val test_mismatched_tags : unit -> unit (** [test_mismatched_tags ()] checks the mismatched tags case. *) val test_error_empty : unit -> unit (** [test_error_empty ()] checks the error on empty case. *) val test_error_no_root : unit -> unit (** [test_error_no_root ()] checks the error no root element case. *) val test_find : unit -> unit (** [test_find ()] checks the find case. *) val test_find_all : unit -> unit (** [test_find_all ()] checks the find_all case. *) val test_attr : unit -> unit (** [test_attr ()] checks the attr case. *) val test_text : unit -> unit (** [test_text ()] checks the text case. *) val test_text_mixed : unit -> unit (** [test_text_mixed ()] checks the text mixed case. *) val test_text_of : unit -> unit (** [test_text_of ()] checks the text_of case. *) val test_path : unit -> unit (** [test_path ()] checks the path case. *) val test_xtce_like : unit -> unit (** [test_xtce_like ()] checks the XTCE-like document case. *) val test_serialize_escaping : unit -> unit (** [test_serialize_escaping ()] checks the serialize escaping case. *) val test_whitespace_handling : unit -> unit (** [test_whitespace_handling ()] checks the whitespace handling case. *) val test_namespaced_names : unit -> unit (** [test_namespaced_names ()] checks the namespaced names case. *) val test_doctype_skipped : unit -> unit (** [test_doctype_skipped ()] checks the DOCTYPE skipped case. *) val test_codec_string : unit -> unit (** [test_codec_string ()] checks the codec string case. *) val test_codec_int : unit -> unit (** [test_codec_int ()] checks the codec int case. *) val test_codec_float : unit -> unit (** [test_codec_float ()] checks the codec float case. *) val test_codec_bool : unit -> unit (** [test_codec_bool ()] checks the codec bool case. *) val test_codec_int_error : unit -> unit (** [test_codec_int_error ()] checks the codec int error case. *) val test_codec_element : unit -> unit (** [test_codec_element ()] checks the codec element case. *) val test_codec_element_roundtrip : unit -> unit (** [test_codec_element_roundtrip ()] checks the codec element roundtrip case. *) type point = { x : float; y : float; label : string } val point_codec : point Xml.Codec.t (** [point_codec] is the point codec fixture used by the XML cases. *) val test_codec_record_attrs : unit -> unit (** [test_codec_record_attrs ()] checks the codec record attrs case. *) val test_codec_record_attrs_roundtrip : unit -> unit (** [test_codec_record_attrs_roundtrip ()] checks the codec record attrs roundtrip case. *) type person = { name : string; age : int; email : string option } val person_codec : person Xml.Codec.t (** [person_codec] is the person codec fixture used by the XML cases. *) val test_codec_record_children : unit -> unit (** [test_codec_record_children ()] checks the codec record children case. *) val test_codec_record_children_optional : unit -> unit (** [test_codec_record_children_optional ()] checks the codec record children optional case. *) val test_codec_record_children_roundtrip : unit -> unit (** [test_codec_record_children_roundtrip ()] checks the codec record children roundtrip case. *) val test_record_children_rt_none : unit -> unit (** [test_record_children_rt_none ()] checks the codec record children roundtrip none case. *) val test_option_present_valid : unit -> unit (** [test_option_present_valid ()] checks the option present valid case. *) val test_option_present_malformed_errors : unit -> unit (** [test_option_present_malformed_errors ()] checks the option present malformed errors case. *) type team = { team_name : string; members : string list } val team_codec : team Xml.Codec.t (** [team_codec] is the team codec fixture used by the XML cases. *) val test_codec_children_list : unit -> unit (** [test_codec_children_list ()] checks the codec children list case. *) val test_codec_children_list_empty : unit -> unit (** [test_codec_children_list_empty ()] checks the codec children list empty case. *) val test_codec_children_list_roundtrip : unit -> unit (** [test_codec_children_list_roundtrip ()] checks the codec children list roundtrip case. *) val test_codec_mixed : unit -> unit (** [test_codec_mixed ()] checks the codec mixed case. *) val test_codec_mixed_roundtrip : unit -> unit (** [test_codec_mixed_roundtrip ()] checks the codec mixed roundtrip case. *) val test_codec_attr_opt : unit -> unit (** [test_codec_attr_opt ()] checks the codec attr opt case. *) val test_codec_attr_opt_absent : unit -> unit (** [test_codec_attr_opt_absent ()] checks the codec attr opt absent case. *) val test_codec_attr_opt_roundtrip : unit -> unit (** [test_codec_attr_opt_roundtrip ()] checks the codec attr opt roundtrip case. *) type note = { author : string; body : string } val note_codec : note Xml.Codec.t (** [note_codec] is the note codec fixture used by the XML cases. *) val test_codec_text_field : unit -> unit (** [test_codec_text_field ()] checks the codec text field case. *) val test_codec_text_field_roundtrip : unit -> unit (** [test_codec_text_field_roundtrip ()] checks the codec text field roundtrip case. *) val test_codec_list : unit -> unit (** [test_codec_list ()] checks the codec list case. *) val test_codec_list_roundtrip : unit -> unit (** [test_codec_list_roundtrip ()] checks the codec list roundtrip case. *) val test_codec_map : unit -> unit (** [test_codec_map ()] checks the codec map case. *) val test_codec_bytesrw_decode : unit -> unit (** [test_codec_bytesrw_decode ()] checks the codec bytesrw decode case. *) val test_codec_bytesrw_encode : unit -> unit (** [test_codec_bytesrw_encode ()] checks the codec bytesrw encode case. *) val test_codec_encode_indent : unit -> unit (** [test_codec_encode_indent ()] checks the codec encode indent case. *) val test_codec_missing_attr : unit -> unit (** [test_codec_missing_attr ()] checks the codec missing attr case. *) val test_codec_missing_child : unit -> unit (** [test_codec_missing_child ()] checks the codec missing child case. *) val test_char_ref_hex : unit -> unit (** [test_char_ref_hex ()] checks the char ref hex case. *) val test_char_ref_dec : unit -> unit (** [test_char_ref_dec ()] checks the char ref dec case. *) val test_char_ref_newline : unit -> unit (** [test_char_ref_newline ()] checks the char ref newline case. *) val test_char_ref_euro : unit -> unit (** [test_char_ref_euro ()] checks the char ref euro case. *) val test_char_ref_snowman : unit -> unit (** [test_char_ref_snowman ()] checks the char ref snowman case. *) val test_all_entities_in_text : unit -> unit (** [test_all_entities_in_text ()] checks the all entities in text case. *) val test_all_entities_in_attr : unit -> unit (** [test_all_entities_in_attr ()] checks the all entities in attr case. *) val test_attr_whitespace_tab : unit -> unit (** [test_attr_whitespace_tab ()] checks the attr whitespace tab case. *) val test_attr_whitespace_newline : unit -> unit (** [test_attr_whitespace_newline ()] checks the attr whitespace newline case. *) val test_cdata_special_chars : unit -> unit (** [test_cdata_special_chars ()] checks the CDATA special chars case. *) val test_cdata_split_escape : unit -> unit (** [test_cdata_split_escape ()] checks the CDATA split escape case. *) val test_empty_element_forms : unit -> unit (** [test_empty_element_forms ()] checks the empty element forms case. *) val test_deep_nesting : unit -> unit (** [test_deep_nesting ()] checks the deep nesting case. *) val test_long_text : unit -> unit (** [test_long_text ()] checks the long text case. *) val test_long_attr_value : unit -> unit (** [test_long_attr_value ()] checks the long attr value case. *) val test_many_attributes : unit -> unit (** [test_many_attributes ()] checks the many attributes case. *) val test_many_children : unit -> unit (** [test_many_children ()] checks the many children case. *) val test_mixed_content_complex : unit -> unit (** [test_mixed_content_complex ()] checks the mixed content complex case. *) val test_adjacent_text_entity : unit -> unit (** [test_adjacent_text_entity ()] checks the adjacent text entity case. *) val test_pi_target_data : unit -> unit (** [test_pi_target_data ()] checks the PI target data case. *) val test_pi_xml_stylesheet : unit -> unit (** [test_pi_xml_stylesheet ()] checks the PI xml-stylesheet case. *) val test_comment_double_dash : unit -> unit (** [test_comment_double_dash ()] checks the comment double dash case. *) val test_comment_triple_dash_end : unit -> unit (** [test_comment_triple_dash_end ()] checks the comment triple dash end case. *) val test_attr_squote_with_dquote : unit -> unit (** [test_attr_squote_with_dquote ()] checks the attr single quote with dquote case. *) val test_attr_single_quotes : unit -> unit (** [test_attr_single_quotes ()] checks the attr single quotes case. *) val test_empty_attr_value : unit -> unit (** [test_empty_attr_value ()] checks the empty attr value case. *) val test_multi_cdata : unit -> unit (** [test_multi_cdata ()] checks the multi CDATA case. *) val test_whitespace_only_text : unit -> unit (** [test_whitespace_only_text ()] checks the whitespace-only text case. *) val test_element_name_special_chars : unit -> unit (** [test_element_name_special_chars ()] checks the element name special chars case. *) val test_element_name_underscore : unit -> unit (** [test_element_name_underscore ()] checks the element name underscore case. *) val test_namespace_prefix : unit -> unit (** [test_namespace_prefix ()] checks the namespace prefix case. *) val test_xml_decl_encoding : unit -> unit (** [test_xml_decl_encoding ()] checks the xml decl encoding case. *) val test_xml_decl_standalone : unit -> unit (** [test_xml_decl_standalone ()] checks the xml decl standalone case. *) val test_doctype_system : unit -> unit (** [test_doctype_system ()] checks the DOCTYPE SYSTEM case. *) val test_doctype_internal_subset : unit -> unit (** [test_doctype_internal_subset ()] checks the DOCTYPE internal subset case. *) val test_err_unclosed_element : unit -> unit (** [test_err_unclosed_element ()] checks the err unclosed element case. *) val test_err_mismatched_tags : unit -> unit (** [test_err_mismatched_tags ()] checks the err mismatched tags case. *) val test_err_unclosed_attr : unit -> unit (** [test_err_unclosed_attr ()] checks the err unclosed attr case. *) val test_err_dup_attrs : unit -> unit (** [test_err_dup_attrs ()] checks the err: duplicate attributes case. *) val test_err_invalid_char_ref : unit -> unit (** [test_err_invalid_char_ref ()] checks the err invalid char ref case. *) val test_err_unknown_entity : unit -> unit (** [test_err_unknown_entity ()] checks the err unknown entity case. *) val test_err_bare_lt : unit -> unit (** [test_err_bare_lt ()] checks the err bare lt case. *) val test_err_bare_amp : unit -> unit (** [test_err_bare_amp ()] checks the err bare amp case. *) val test_null_byte_in_content : unit -> unit (** [test_null_byte_in_content ()] checks the null byte in content case. *) val test_err_truncated_cdata : unit -> unit (** [test_err_truncated_cdata ()] checks the err truncated CDATA case. *) val test_err_truncated_comment : unit -> unit (** [test_err_truncated_comment ()] checks the err truncated comment case. *) val test_err_empty_document : unit -> unit (** [test_err_empty_document ()] checks the err empty document case. *) val test_err_multi_root : unit -> unit (** [test_err_multi_root ()] checks the err multiple roots case. *) val test_trailing_misc_allowed : unit -> unit (** [test_trailing_misc_allowed ()] checks the trailing misc allowed case. *) val test_err_content_before_root : unit -> unit (** [test_err_content_before_root ()] checks the err content before root case. *) val test_codec_missing_required_attr : unit -> unit (** [test_codec_missing_required_attr ()] checks the codec missing required attr case. *) val test_codec_missing_required_child : unit -> unit (** [test_codec_missing_required_child ()] checks the codec missing required child case. *) val test_codec_extra_attrs : unit -> unit (** [test_codec_extra_attrs ()] checks the codec extra attrs case. *) val test_codec_extra_children : unit -> unit (** [test_codec_extra_children ()] checks the codec extra children case. *) val test_codec_int_non_numeric : unit -> unit (** [test_codec_int_non_numeric ()] checks the codec int non-numeric case. *) val test_codec_float_nan_inf : unit -> unit (** [test_codec_float_nan_inf ()] checks the codec float nan/inf case. *) val test_codec_bool_values : unit -> unit (** [test_codec_bool_values ()] checks the codec bool values case. *) val test_codec_empty_list : unit -> unit (** [test_codec_empty_list ()] checks the codec empty list case. *) val test_codec_nested_record : unit -> unit (** [test_codec_nested_record ()] checks the codec nested record case. *) val test_codec_nested_record_roundtrip : unit -> unit (** [test_codec_nested_record_roundtrip ()] checks the codec nested record roundtrip case. *) val test_codec_special_chars_roundtrip : unit -> unit (** [test_codec_special_chars_roundtrip ()] checks the codec special chars roundtrip case. *) val test_attr_special_chars_rt : unit -> unit (** [test_attr_special_chars_rt ()] checks the codec attr special chars roundtrip case. *) val test_tree_roundtrip_mixed : unit -> unit (** [test_tree_roundtrip_mixed ()] checks the tree roundtrip mixed case. *) val test_tree_roundtrip_large : unit -> unit (** [test_tree_roundtrip_large ()] checks the tree roundtrip large case. *) val test_get_child : unit -> unit (** [test_get_child ()] checks the get_child string case. *) val test_get_child_int : unit -> unit (** [test_get_child_int ()] checks the get_child int case. *) val test_get_child_nested : unit -> unit (** [test_get_child_nested ()] checks the get_child nested case. *) val test_get_child_missing : unit -> unit (** [test_get_child_missing ()] checks the get_child missing case. *) val test_get_attr : unit -> unit (** [test_get_attr ()] checks the get_attr case. *) val test_get_attr_second : unit -> unit (** [test_get_attr_second ()] checks the get_attr second case. *) val test_get_attr_missing : unit -> unit (** [test_get_attr_missing ()] checks the get_attr missing case. *) val test_get_nth : unit -> unit (** [test_get_nth ()] checks the nth 1 case. *) val test_get_nth_first : unit -> unit (** [test_get_nth_first ()] checks the nth 0 case. *) val test_get_nth_last : unit -> unit (** [test_get_nth_last ()] checks the nth 2 case. *) val test_get_nth_oob : unit -> unit (** [test_get_nth_oob ()] checks the nth out of bounds case. *) val test_kind_string : unit -> unit (** [test_kind_string ()] checks the kind string case. *) val test_kind_int : unit -> unit (** [test_kind_int ()] checks the kind int case. *) val test_kind_float : unit -> unit (** [test_kind_float ()] checks the kind float case. *) val test_kind_bool : unit -> unit (** [test_kind_bool ()] checks the kind bool case. *) val test_kind_element : unit -> unit (** [test_kind_element ()] checks the kind element case. *) val test_kind_list : unit -> unit (** [test_kind_list ()] checks the kind list case. *) val test_kind_option : unit -> unit (** [test_kind_option ()] checks the kind option case. *) val test_utf8_multibyte_text : unit -> unit (** [test_utf8_multibyte_text ()] checks the utf8 multibyte text case. *) val test_utf8_bom_stripped : unit -> unit (** [test_utf8_bom_stripped ()] checks the utf8 bom stripped case. *) val test_utf8_bom_stripped_any_slice : unit -> unit (** [test_utf8_bom_stripped_any_slice ()] checks the utf8 bom stripped at any slice length case. *) val test_utf8_bom_stripped_any_slice_value : unit -> unit (** [test_utf8_bom_stripped_any_slice_value ()] checks the utf8 bom stripped at any slice length (value) case. *) val test_utf8_invalid_bytes : unit -> unit (** [test_utf8_invalid_bytes ()] checks the utf8 invalid bytes case. *) val test_utf8_invalid_bytes_reader : unit -> unit (** [test_utf8_invalid_bytes_reader ()] checks the utf8 invalid bytes via decode reader case. *) val test_utf8_bad_bytes_reader : unit -> unit (** [test_utf8_bad_bytes_reader ()] checks the utf8 invalid bytes via Value.of_reader case. *) val test_encode_rejects_forbidden_char : unit -> unit (** [test_encode_rejects_forbidden_char ()] checks the encode rejects forbidden char case. *) val test_encode_bad_utf8_offset : unit -> unit (** [test_encode_bad_utf8_offset ()] checks the encode invalid UTF-8 exact offset case. *) val test_encode_bad_char_offset : unit -> unit (** [test_encode_bad_char_offset ()] checks the encode forbidden char exact offset case. *) val test_encode_rejects_invalid_utf8 : unit -> unit (** [test_encode_rejects_invalid_utf8 ()] checks the encode rejects invalid UTF-8 case. *) val test_error_message_includes_line : unit -> unit (** [test_error_message_includes_line ()] checks the error message includes line number case. *) val test_encode_attr_bad_char : unit -> unit (** [test_encode_attr_bad_char ()] checks the encode attr rejects forbidden char case. *) val test_utf8_numeric_char_ref : unit -> unit (** [test_utf8_numeric_char_ref ()] checks the utf8 numeric char ref case. *)