Skip to content

toml.encode errors for integer data types other than int64 or singles #35

@pavdpr

Description

@pavdpr

The integer data types other than int64 are not supported for encoding

Running

types = { ...
   @double; ...
   @single; ...
   @int8; ...
   @int16; ...
   @int32; ...
   @int64; ...
   @uint8; ...
   @uint16; ...
   @uint32; ...
   @uint64; ...
};

fprintf("| %-6s | %s | \n", "Type", " OK ");
fprintf("|-%-6s-|-%s-| \n", "------", "----");
for i = 1:numel(types)
   try
      toml.encode(struct('key', types{i}(1)));
      fprintf("| %-6s | %s | \n", func2str(types{i}), "Pass");
   catch
      fprintf("| %-6s | %s |\n", func2str(types{i}), "Fail");
   end
end
Type OK
double Pass
single Fail
int8 Fail
int16 Fail
int32 Fail
int64 Pass
uint8 Fail
uint16 Fail
uint32 Fail
uint64 Fail

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions