[llvm-commits] [PATCH] Unit tests for StringMap
Bill Wendling
isanbard at gmail.com
Wed Jan 7 19:22:22 PST 2009
On Jan 7, 2009, at 12:33 PM, Talin wrote:
> Here's StringMapTest, and some minor cleanup of DenseMapTest. Oh,
> and I found a bug in StringMap during the process of writing the
> tests, the fix is also included.
>
Yay! Please go ahead and commit the fix.
> Some notes:
> • I could not get StringMapEntryInitializer to compile, so those
> tests are disabled. Even more puzzling is that I could not find any
> code that uses StringMapEntryInitializer (I was hoping to find an
> example as to how to do the explicit specialization.)
What's the error you're getting during compilation?
> • I was very surprised that the default implementation of
> StringMapEntryInitializer is empty (no action) instead of a generic
> assignment - it means that insert() basically doesn't work, as the
> value never gets copied to the StringMapEntry.
>
That is kind of odd that it's not assigned the initial value as a
default. But I don't think that "insert()" would not work because of
it. It looks to be for initialization only.
-bw
More information about the llvm-commits
mailing list