diff options
author | Duncan Sands <baldrick@free.fr> | 2011-07-28 14:37:53 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2011-07-28 14:37:53 +0000 |
commit | 251daee2a7df3ed17e77a0d137d63053d6240a46 (patch) | |
tree | a87c2daad38f3f16dca56bf0bd4f461cb0f56703 /llvm/unittests/ADT/SCCIteratorTest.cpp | |
parent | 6d0f0ffe838a1c828a5136d3dfa1ba7b37bd530d (diff) | |
download | bcm5719-llvm-251daee2a7df3ed17e77a0d137d63053d6240a46.tar.gz bcm5719-llvm-251daee2a7df3ed17e77a0d137d63053d6240a46.zip |
Use unsigned rather than uint16_t in case anyone feels like testing
more graphs, like all graphs with 5 nodes or less. With a 32 bit
unsigned type, the maximum is graphs with 6 nodes or less, but that
would take a while to test - 5 nodes or less already requires a few
seconds.
llvm-svn: 136354
Diffstat (limited to 'llvm/unittests/ADT/SCCIteratorTest.cpp')
-rw-r--r-- | llvm/unittests/ADT/SCCIteratorTest.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/unittests/ADT/SCCIteratorTest.cpp b/llvm/unittests/ADT/SCCIteratorTest.cpp index cf0ec014dff..1151da08373 100644 --- a/llvm/unittests/ADT/SCCIteratorTest.cpp +++ b/llvm/unittests/ADT/SCCIteratorTest.cpp @@ -251,8 +251,8 @@ TEST(SCCIteratorTest, AllSmallGraphs) { #define NUM_GRAPHS (NUM_NODES * (NUM_NODES - 1)) /// GraphDescriptor - Enumerate all graphs using NUM_GRAPHS bits. - uint16_t GraphDescriptor = 0; - assert(NUM_GRAPHS <= sizeof(uint16_t) * CHAR_BIT && "Too many graphs!"); + unsigned GraphDescriptor = 0; + assert(NUM_GRAPHS <= sizeof(unsigned) * CHAR_BIT && "Too many graphs!"); do { typedef Graph<NUM_NODES> GT; @@ -260,7 +260,7 @@ TEST(SCCIteratorTest, AllSmallGraphs) { GT G; // Add edges as specified by the descriptor. - uint16_t DescriptorCopy = GraphDescriptor; + unsigned DescriptorCopy = GraphDescriptor; for (unsigned i = 0; i != NUM_NODES; ++i) for (unsigned j = 0; j != NUM_NODES; ++j) { // Always add a self-edge. @@ -344,7 +344,7 @@ TEST(SCCIteratorTest, AllSmallGraphs) { EXPECT_EQ(NodesInSomeSCC, G.NodesReachableFrom(0)); ++GraphDescriptor; - } while (GraphDescriptor && (unsigned)GraphDescriptor < (1U << NUM_GRAPHS)); + } while (GraphDescriptor && GraphDescriptor < (1U << NUM_GRAPHS)); } } |