Clean up irange self tests.
authorAldy Hernandez <aldyh@redhat.com>
Mon, 9 Nov 2020 13:18:12 +0000 (14:18 +0100)
committerAldy Hernandez <aldyh@redhat.com>
Mon, 9 Nov 2020 15:29:47 +0000 (16:29 +0100)
commitb5cff0db6e3a733e470ffc36a3e14c55465bdca2
treeeb1f7dd5a955a26a08b3f2310d54c2b88a4e7fa8
parentf27a3b37b4805feba138dd421f039e3267b1c5f0
Clean up irange self tests.

Currently we have all the irange and range-op tests in range-op.cc.
This patch splits them up into the appropriate file (irange
tests in value-range.cc and range-op tests in range-op.cc).  The patch
also splits up the tests themselves by functionality.  It's not perfect,
but significantly better than the mess we had.

gcc/ChangeLog:

* function-tests.c (test_ranges): Call range_op_tests.
* range-op.cc (build_range3): Move to value-range.cc.
(range3_tests): Same.
(int_range_max_tests): Same.
(multi_precision_range_tests): Same.
(range_tests): Same.
(operator_tests): Split up...
(range_op_tests): Split up...
(range_op_cast_tests): ...here.
(range_op_lshift_tests): ...here.
(range_op_rshift_tests): ...here.
(range_op_bitwise_and_tests): ...here.
* selftest.h (range_op_tests): New.
* value-range.cc (build_range3): New.
(range_tests_irange3): New.
(range_tests_int_range_max): New.
(range_tests_legacy): New.
(range_tests_misc): New.
(range_tests): New.
gcc/function-tests.c
gcc/range-op.cc
gcc/selftest.h
gcc/value-range.cc