Although the implementation of WTF::OptionSet is straightforward we should add unit tests to ensure that we do not regress its functionality.
Created attachment 272666 [details] Unit tests
For completeness, WTF::OptionSet was added in the patch for bug #154733, <http://trac.webkit.org/changeset/197191>.
Created attachment 272671 [details] Unit tests Add OptionSet to the CMake list of WTF headers.
Created attachment 272707 [details] Patch and Unit tests Update patch to include a convenience constructor for OptionSet that takes a std::initializer_list. The code for this constructor was written by Anders Carlsson.
Comment on attachment 272707 [details] Patch and Unit tests View in context: https://bugs.webkit.org/attachment.cgi?id=272707&action=review > Source/WTF/wtf/OptionSet.h:57 > + : m_storage(0) Why not initialize m_storage where it’s defined rather than in the constructors?
(In reply to comment #5) > View in context: > https://bugs.webkit.org/attachment.cgi?id=272707&action=review > > > Source/WTF/wtf/OptionSet.h:57 > > + : m_storage(0) > > Why not initialize m_storage where it’s defined rather than in the > constructors? Will initialize m_storage where it is defined before landing.
<rdar://problem/24964211>
Committed r197523: <http://trac.webkit.org/changeset/197523>