Skip to content

Commit

Permalink
extend tests to cover write_float and write_double, and update serial…
Browse files Browse the repository at this point in the history
…ize to also have uint8, uint16 methods
  • Loading branch information
gafferongames committed Nov 14, 2024
1 parent c6e1adb commit 50ee37e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions serialize.h
Original file line number Diff line number Diff line change
Expand Up @@ -1892,7 +1892,12 @@ namespace serialize
write_bits( stream, int64_value, 64 ); \
} while (0)

#define write_bytes serialize_bytes
#define write_bytes( stream, value ) \
do \
{ \
stream.SerializeBytes( data, bytes ); \
} while (0)

#define write_string serialize_string
#define write_align serialize_align
#define write_object serialize_object
Expand Down Expand Up @@ -2211,10 +2216,10 @@ inline void test_read_write()
write_float( writeStream, 100.0f );
write_double( writeStream, 1000000000.0f );

/*
char * data = { 1, 2, 3, 4, 5 };
char data[] = { 1, 2, 3, 4, 5 };
write_bytes( writeStream, data, 5 );

/*
write_string
write_align
Expand Down

0 comments on commit 50ee37e

Please sign in to comment.