8 Commits

Author SHA1 Message Date
Jason Travis Smith
1374ff5e4a Quaternions are now Transmutable.
This implements Transmutable for Quaternions and creates a
test and example for this conversion.
2016-01-07 05:51:53 -05:00
Jason Travis Smith
aa4bb78f66 Vector types are now Transmutable.
A Vector can now be converted to and from bytes of data.
I'm not entirely sure that the structure bytes do not have to
be handled for endianess, but the underlying basic types are
correctly handled.

Tests and and example have also be created. The tests lib file was split
into a converter test file and a transmutable test file.
2016-01-07 05:10:50 -05:00
Jason Travis Smith
ed44f4f861 Created a trait for specifying byte size for a type.
There is now a ByteSized trait that can be used to specify how many
bytes it takes to represent a piece of data. This has been implemented
for all of the primitive number types. With this information Transmutable
was able to create a Vector2 wrapper that will need to be tested. If it
works then soon after Vectors and other Sigils types can be turned into
Transmutable types.

This also has the changes for the original tests and example
to use the new ByteSized information.
2016-01-06 23:37:18 -05:00
Jason Travis Smith
d9a3e21aec Fixed the example and tests to use the new Converter trait.
Transmutable was changed to Converter. This needed to be reflected in
the example and tests.

Also, fixed some comments in the new transmutable module.
2016-01-05 23:42:08 -05:00
Jason Travis Smith
010abeff7c Fixed the tests to be correct.
There is now a random test for all the primitive number types.

Also, I fixed my errors with the tests that should panic. I kept thinking
that they should run fine and it was throwing off how I was writing
the code.
2016-01-03 03:22:21 -05:00
Jason Travis Smith
e6f1fbb229 Fixed the uint and int system types to not require num_bytes.
This also fixes the tests for buffer overflow to now work for all
primitive types.
2016-01-02 23:16:39 -05:00
Jason Travis Smith
cdd72603e5 Create a buffer overflow test.
This tests buffer overflow for the basic types. It does not currently
test the platform int and uint until the final function definitions
are determined.
2016-01-02 18:27:06 -05:00
Jason Travis Smith
f48b8ba98b Creating the tests for the Alchemy library. 2015-12-30 17:14:48 -05:00