RobloxAPI / testfiles

A database of files for testing implementations of various Roblox file formats
Creative Commons Attribution Share Alike 4.0 International
0 stars 0 forks source link

Accurate vs. Ideal #4

Open Anaminus opened 5 years ago

Anaminus commented 5 years ago

Roblox has no official specification defining each format, so their implementation is the only source to look to. However, parts of their implementation could be better.

Should specifications defined in testfiles strive to reflect Roblox's implementation exactly, or should they serve as an ideal source?

Anaminus commented 5 years ago

Case: XML spacing

When Roblox decodes a bool property value in the XML format, it will fail silently if the true or false token has whitespace next to it. On the other hand, due to how it's formatted, the NumberSequence type handles whitespace just fine.

Anaminus commented 5 years ago

Case: Incomplete values

Roblox tends to discard an entire value if even a single component cannot be parsed. For example, when Roblox decodes a Color3 in the XML format, it will fail if any component is missing. An alternative is to preserve the successful components and use the zero value for any failed components.