empiredan / googletest-old

Automatically exported from code.google.com/p/googletest

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GTEST_AMBIGUOUS_ELSE_BLOCKER_ causes code analysis warning

GoogleCodeExporter opened this issue · comments

What steps will reproduce the problem?
1. Write a test that uses EXPECT_TRUE
2. Use Visual Studio 2013 to run CodeAnalysis
Now you'll get message:
"error C6326: Potential comparison of a constant with another constant."

It seems to be due to the GTEST_AMBIGUOUS_ELSE_BLOCKER_ macro which is expanded 
to "switch (0) case 0: default:".

What is the expected output? What do you see instead?
I would like no error/warning messages.

What version of Google Test are you using? On what operating system?
1.7.0

Original issue reported on code.google.com by mikko...@gmail.com on 12 Aug 2014 at 3:40