[patch] libcxx test suite bit testing test cases for clz/ctz

G M gmisocpp at gmail.com
Wed Jan 8 22:03:16 PST 2014


Hi Everyone

Here's a few test cases I wrote to test the fixes for the clz and ctz
functions I wrote for MSVC previously that have been already committed.

They contain some suggested changes from Marshall and I have tested they
compile with clang++/g++ and cl.exe against libcxx.
If the tests fail, they call assert and give some details about the failure
point/reason. If they pass, they produce no output.

The test cases basically just set some bit values in various types and
check the leading and trailing zero count is as expected.

For the test  cases to compile with cl.exe, the type_traits patch for
libcxx and MSVC that I previously submitted needs to be applied.

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140109/d00930a3/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ctz.pass.cpp
Type: text/x-c++src
Size: 3721 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140109/d00930a3/attachment.cpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clz.pass.cpp
Type: text/x-c++src
Size: 3774 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140109/d00930a3/attachment-0001.cpp>


More information about the cfe-commits mailing list