cutepig123 / googletest

Automatically exported from code.google.com/p/googletest
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

GTEST_AMBIGUOUS_ELSE_BLOCKER_ causes code analysis warning #471

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
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