Added test for != operator and centralized in macros the common test code.