[libcxx] [test] Fix MSVC "warning C6326: Potential comparison of a constant with another constant".
The expressions `1 == 1` and `true` have the same type, value category, and value. Fixes D32924. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302322 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -48,7 +48,7 @@ int main()
|
|||||||
assert(c.front() == false);
|
assert(c.front() == false);
|
||||||
assert(c.back() == true);
|
assert(c.back() == true);
|
||||||
#endif
|
#endif
|
||||||
c.emplace_back(1 == 1);
|
c.emplace_back(true);
|
||||||
assert(c.size() == 3);
|
assert(c.size() == 3);
|
||||||
assert(c.front() == false);
|
assert(c.front() == false);
|
||||||
assert(c[1] == true);
|
assert(c[1] == true);
|
||||||
@@ -82,7 +82,7 @@ int main()
|
|||||||
assert(c.front() == false);
|
assert(c.front() == false);
|
||||||
assert(c.back() == true);
|
assert(c.back() == true);
|
||||||
#endif
|
#endif
|
||||||
c.emplace_back(1 == 1);
|
c.emplace_back(true);
|
||||||
assert(c.size() == 3);
|
assert(c.size() == 3);
|
||||||
assert(c.front() == false);
|
assert(c.front() == false);
|
||||||
assert(c[1] == true);
|
assert(c[1] == true);
|
||||||
|
|||||||
Reference in New Issue
Block a user