Move copy_bitwise unittests to own unittest file
authorJoel Brobecker <brobecker@adacore.com>
Thu, 15 Nov 2018 15:53:57 +0000 (10:53 -0500)
committerJoel Brobecker <brobecker@adacore.com>
Thu, 15 Nov 2018 15:53:57 +0000 (10:53 -0500)
commitf9db0c4c6c074d2df927d2650229f31eac079640
treed80a44504747d53e8f2bd4c1c98dd371f7282c53
parent92b3642af0e739e526e27d4b4a0c0505e72a8879
Move copy_bitwise unittests to own unittest file

Now that copy_bitwise has been made public, and considering that
its implementation could move to a different file again in the future,
this patch moves its unittest to its own file in gdb/unittests.

gdb/ChangeLog:

        * unittests/copy_bitwise-selftests.c: New file.
        * utils.c (selftests::bits_to_str, selftests::check_copy_bitwise)
        (selftests::copy_bitwise_tests): Delete, moving this code to
        unittests/copy_bitwise-selftests.c instead.
        (_initialize_utils): Do not register copy_bitwise tests.
        * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
        unittests/copy_bitwise-selftests.c.

Tested on x86_64-linux using the official testsuite, but also by
verifying that "maintenance selftests" still runs the copy_bitwise
tests.
gdb/ChangeLog
gdb/Makefile.in
gdb/unittests/copy_bitwise-selftests.c [new file with mode: 0644]
gdb/utils.c