summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDavid Wragg <david@rabbitmq.com>2011-09-21 12:10:20 +0100
committerDavid Wragg <david@rabbitmq.com>2011-09-21 12:10:20 +0100
commit6974ec212cbafdb3f315eb4579ece508d0724341 (patch)
tree7de05265de7227ab64ed26cbbdb0bb8012328103 /tests
parentfe142c3131dcd63afc98c622973f4bde65c0adea (diff)
downloadrabbitmq-c-github-ask-6974ec212cbafdb3f315eb4579ece508d0724341.tar.gz
Remove the redundant float and double encoding tests
test_table_codec already tests these.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_tables.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/tests/test_tables.c b/tests/test_tables.c
index 460d10c..70d42f6 100644
--- a/tests/test_tables.c
+++ b/tests/test_tables.c
@@ -311,15 +311,6 @@ int main(int argc, char const * const *argv) {
amqp_table_entry_t entries[8];
amqp_table_t table;
- union {
- uint32_t i;
- float f;
- } vi;
- union {
- uint64_t l;
- double d;
- } vl;
-
entries[0].key = amqp_cstring_bytes("zebra");
entries[0].value.kind = AMQP_FIELD_KIND_UTF8;
entries[0].value.value.bytes = amqp_cstring_bytes("last");
@@ -356,23 +347,6 @@ int main(int argc, char const * const *argv) {
table.num_entries = 8;
table.entries = entries;
- vi.f = M_PI;
- if ((sizeof(float) != 4) || (vi.i != 0x40490fdb)) {
- printf("*** ERROR: single floating point encoding does not work as expected\n");
- printf("sizeof float is %lu, float is %g, u32 is 0x%08lx\n",
- (unsigned long)sizeof(float),
- vi.f,
- (unsigned long) vi.i);
- }
-
- vl.d = M_PI;
- if ((sizeof(double) != 8) || (vl.l != 0x400921fb54442d18L)) {
- printf("*** ERROR: double floating point encoding does not work as expected\n");
- printf("sizeof double is %lu, double is %g, u64 is 0x%16"PRIx64"\n",
- (unsigned long)sizeof(double),
- vl.d, vl.l);
- }
-
test_table_codec();
qsort(table.entries, table.num_entries, sizeof(amqp_table_entry_t), &amqp_table_entry_cmp);