selftest: remove "Yoda ordering" in assertions
commit1f9995dc47e37635647afbcf433b89a809e101fb
authordmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 1 May 2018 00:02:49 +0000 (1 00:02 +0000)
committerdmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 1 May 2018 00:02:49 +0000 (1 00:02 +0000)
tree760ea48318070f852bfd3d074f8b830bba1bb83e
parent1b436275bff90f7d3a39736ff9a5cb29d60751e1
selftest: remove "Yoda ordering" in assertions

gcc/ChangeLog:
* selftest.c (assert_streq): Rename "expected" and "actual" to
"val1" and "val2".  Extend NULL-handling to cover both inputs
symmetrically, while still requiring both to be non-NULL for a pass.
* selftest.h (assert_streq): Rename "expected" and "actual" to
"val1" and "val2".
(ASSERT_EQ): Likewise.
(ASSERT_EQ_AT): Likewise.
(ASSERT_KNOWN_EQ): Likewise.
(ASSERT_KNOWN_EQ_AT): Likewise.
(ASSERT_NE): Likewise.
(ASSERT_MAYBE_NE): Likewise.
(ASSERT_MAYBE_NE_AT): Likewise.
(ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
the assertion to pass.
(ASSERT_STREQ_AT): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@259782 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/selftest.c
gcc/selftest.h