media-io / xml-schema

Generate rust code (structures and enum) from XSD
MIT License
53 stars 29 forks source link

Added float to rust_types_mapping #10

Closed NelDav closed 1 year ago

NelDav commented 4 years ago

closes #9

According to https://www.w3.org/TR/xmlschema-2/#float float means a 32-bit floating point number. So I mapped float to f32 in the rust_types_mapping file.

I tested it with a xsd-file which contains the float type and it seems to work.

Feel free to make any corrections if I did something wrong.

NelDav commented 4 years ago

Seems like many tests are failing, but all rust_types_mapping tests are passing.

test xsd::rust_types_mapping::tests::extern_types ... ok test xsd::rust_types_mapping::tests::extern_types_in_default_namespace ... ok test xsd::rust_types_mapping::tests::rust_bad_mapping_type ... ok test xsd::rust_types_mapping::tests::is_xs_string ... ok test xsd::rust_types_mapping::tests::rust_mapping_types ... ok