Revert "fix a bug in CHECK_EQUAL() function"

This reverts commit 946f3aabd5075ee0071293bb96a526271795e24e.
Revert "Revert "fix a bug in CHECK_EQUAL() function""

This reverts commit 0d87fa141be09a7881d3ad4722bfd6317d980002.