From 4e228b5d61e25823b573457b170ad012c86a0a71 Mon Sep 17 00:00:00 2001 From: Graham Miller Date: Wed, 9 Feb 2011 18:49:53 -0500 Subject: changed encode_double to use memecpy --- encode_test.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'encode_test.c') diff --git a/encode_test.c b/encode_test.c index 6b70a81..dea53d7 100644 --- a/encode_test.c +++ b/encode_test.c @@ -74,7 +74,8 @@ void test_flip_unsigned_long_long(){ void test_gob_encode_double() { char buf[1024]; - int num_bytes = gob_encode_double(buf, 1024, 17.0); + double doubleval = 17; + int num_bytes = gob_encode_double(buf, 1024, doubleval); CU_ASSERT_EQUAL(3, num_bytes); CU_ASSERT_EQUAL((char)0xFE, buf[0]); CU_ASSERT_EQUAL((char)0x31, buf[1]); -- cgit v1.2.3