Skip to content

Commit 6974ec2

Browse files
committed
Remove the redundant float and double encoding tests
test_table_codec already tests these.
1 parent fe142c3 commit 6974ec2

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

tests/test_tables.c

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -311,15 +311,6 @@ int main(int argc, char const * const *argv) {
311311
amqp_table_entry_t entries[8];
312312
amqp_table_t table;
313313

314-
union {
315-
uint32_t i;
316-
float f;
317-
} vi;
318-
union {
319-
uint64_t l;
320-
double d;
321-
} vl;
322-
323314
entries[0].key = amqp_cstring_bytes("zebra");
324315
entries[0].value.kind = AMQP_FIELD_KIND_UTF8;
325316
entries[0].value.value.bytes = amqp_cstring_bytes("last");
@@ -356,23 +347,6 @@ int main(int argc, char const * const *argv) {
356347
table.num_entries = 8;
357348
table.entries = entries;
358349

359-
vi.f = M_PI;
360-
if ((sizeof(float) != 4) || (vi.i != 0x40490fdb)) {
361-
printf("*** ERROR: single floating point encoding does not work as expected\n");
362-
printf("sizeof float is %lu, float is %g, u32 is 0x%08lx\n",
363-
(unsigned long)sizeof(float),
364-
vi.f,
365-
(unsigned long) vi.i);
366-
}
367-
368-
vl.d = M_PI;
369-
if ((sizeof(double) != 8) || (vl.l != 0x400921fb54442d18L)) {
370-
printf("*** ERROR: double floating point encoding does not work as expected\n");
371-
printf("sizeof double is %lu, double is %g, u64 is 0x%16"PRIx64"\n",
372-
(unsigned long)sizeof(double),
373-
vl.d, vl.l);
374-
}
375-
376350
test_table_codec();
377351

378352
qsort(table.entries, table.num_entries, sizeof(amqp_table_entry_t), &amqp_table_entry_cmp);

0 commit comments

Comments
 (0)