Add unit test for copy_bitwise
authorAndreas Arnez <arnez@linux.vnet.ibm.com>
Thu, 24 Nov 2016 16:48:04 +0000 (17:48 +0100)
committerAndreas Arnez <arnez@linux.vnet.ibm.com>
Thu, 24 Nov 2016 16:48:04 +0000 (17:48 +0100)
commitad06383f106ccfa299a6c7ac9720178d2d3d583f
treea621945f9fecaf62b101615ba0d1689abc65e602
parent22347e554cd7ba2a0bf36dc81ebfcbe2e2fd74af
Add unit test for copy_bitwise

This adds a unit test for the copy_bitwise function in dwarf2loc.c.
With the old (broken) version of copy_bitwise this test would generate
the following failure message:

(gdb) maintenance selftest
Self test failed: copy_bitwise 11000000 != 10000000 (7+2 -> 0)

gdb/ChangeLog:
2016-11-24  Andreas Arnez  <arnez@linux.vnet.ibm.com>
    Pedro Alves  <palves@redhat.com>

* dwarf2loc.c (bits_to_str, check_copy_bitwise)
(copy_bitwise_tests): New functions.
(_initialize_dwarf2loc): Register the new function
copy_bitwise_tests as a unit test.
* selftest.c (run_self_tests): Improve the failure message's
wording and formatting.
gdb/ChangeLog
gdb/dwarf2loc.c
gdb/selftest.c
This page took 0.03409 seconds and 4 git commands to generate.