Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove the redundant float and double encoding tests

test_table_codec already tests these.
  • Loading branch information...
commit 6974ec212cbafdb3f315eb4579ece508d0724341 1 parent fe142c3
@dpw dpw authored
Showing with 0 additions and 26 deletions.
  1. +0 −26 tests/test_tables.c
View
26 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);

0 comments on commit 6974ec2

Please sign in to comment.
Something went wrong with that request. Please try again.