On 09/08/2016 06:30 PM, David Malcolm wrote:
gcc/ChangeLog:
        * final.c: Include selftest.h and selftest-rtl.h.
        (class selftest::temp_asm_out): New subclass of
        selftest::named_temp_file.
        (selftest::temp_asm_out::temp_asm_out): New ctor.
        (selftest::temp_asm_out::~temp_asm_out): New dtor.
        (class selftest::asm_out_test): New subclass of
        selftest::rtl_dump_test.
        (selftest::asm_out_test::asm_out_test): New ctor.
        (selftest::test_jump_insn): New function.
        (selftest::test_empty_function): New function.
        (selftest::test_asm_for_insn): New function.
        (TEST_ASM_FOR_INSN): New macro.
        (selftest::test_x86_64_leal): New function.
        (selftest::test_x86_64_negl): New function.
        (selftest::test_x86_64_cmpl): New function.
        (selftest::test_x86_64_cmovge): New function.
        (selftest::test_x86_64_ret): New function.
        (selftest::final_c_tests): New function.
        * selftest-run-tests.c (selftest::run_tests): Call
        selftest::final_c_tests.
        * selftest.h (selftest::final_c_tests): New decl.
I'm really not sure how useful these tests are going to be and would question the long term maintenance costs of keeping them up-to-date.


I could see perhaps verifying that when there are multiple alternatives that the correct one is selected or somesuch, but these tests really don't seem to be covering anything particularly useful.

Jeff

Reply via email to