[cfe-commits] [libcxx] r128797 - in /libcxx/trunk/test/containers/associative: map/map.cons/default_recursive.pass.cpp multimap/multimap.cons/default_recursive.pass.cpp multiset/multiset.cons/default_recursive.pass.cpp set/set.cons/default_recurs

Eli Friedman eli.friedman at gmail.com
Sun Apr 3 17:09:31 PDT 2011


On Sun, Apr 3, 2011 at 2:59 PM, Howard Hinnant <hhinnant at apple.com> wrote:
> On Apr 3, 2011, at 5:52 PM, Eli Friedman wrote:
>
>> On Sun, Apr 3, 2011 at 1:06 PM, Howard Hinnant <hhinnant at apple.com> wrote:
>>> Author: hhinnant
>>> Date: Sun Apr  3 15:06:31 2011
>>> New Revision: 128797
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=128797&view=rev
>>> Log:
>>> ... And these wonderful tests.
>>>
>>> Added:
>>>    libcxx/trunk/test/containers/associative/map/map.cons/default_recursive.pass.cpp
>>>    libcxx/trunk/test/containers/associative/multimap/multimap.cons/default_recursive.pass.cpp
>>>    libcxx/trunk/test/containers/associative/multiset/multiset.cons/default_recursive.pass.cpp
>>>    libcxx/trunk/test/containers/associative/set/set.cons/default_recursive.pass.cpp
>>>
>>> Added: libcxx/trunk/test/containers/associative/map/map.cons/default_recursive.pass.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/containers/associative/map/map.cons/default_recursive.pass.cpp?rev=128797&view=auto
>>> ==============================================================================
>>> --- libcxx/trunk/test/containers/associative/map/map.cons/default_recursive.pass.cpp (added)
>>> +++ libcxx/trunk/test/containers/associative/map/map.cons/default_recursive.pass.cpp Sun Apr  3 15:06:31 2011
>>> @@ -0,0 +1,24 @@
>>> +//===----------------------------------------------------------------------===//
>>> +//
>>> +//                     The LLVM Compiler Infrastructure
>>> +//
>>> +// This file is dual licensed under the MIT and the University of Illinois Open
>>> +// Source Licenses. See LICENSE.TXT for details.
>>> +//
>>> +//===----------------------------------------------------------------------===//
>>> +
>>> +// <map>
>>> +
>>> +// class map
>>> +
>>> +// map();
>>> +
>>> +#include <map>
>>> +#include <cassert>
>>> +
>>> +int main()
>>> +{
>>> +    std::map<std::map<int,double>, std::map<int, double> > m;
>>> +    assert(m.empty());
>>> +    assert(m.begin() == m.end());
>>> +}
>>
>> This is supposed to be a test for r128796?  I don't see how this is
>> related, and I can't imagine an implementation where this test
>> wouldn't work.
>
> Agreed that this test passes without applying the patch to __tree.  However I'm inclined to leave it in just because it might catch some unforeseen problem in the future.

In that case, you might want to add a test that actually tests r128796. :)

-Eli




More information about the cfe-commits mailing list