[PATCH v5 1/1] tests: Fix tests that are faulty because of == vs ?: operator precedence.