Author: marshall Date: Tue Feb 23 10:25:20 2016 New Revision: 261648 URL: http://llvm.org/viewvc/llvm-project?rev=261648&view=rev Log: Add additional tests to ensure that we DTRT with short lists. This is LWG#2590, but there are no code changes, just additional tests
Modified: libcxx/trunk/test/std/containers/sequences/array/array.cons/initializer_list.pass.cpp Modified: libcxx/trunk/test/std/containers/sequences/array/array.cons/initializer_list.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/array/array.cons/initializer_list.pass.cpp?rev=261648&r1=261647&r2=261648&view=diff ============================================================================== --- libcxx/trunk/test/std/containers/sequences/array/array.cons/initializer_list.pass.cpp (original) +++ libcxx/trunk/test/std/containers/sequences/array/array.cons/initializer_list.pass.cpp Tue Feb 23 10:25:20 2016 @@ -35,4 +35,18 @@ int main() C c = {}; assert(c.size() == 0); } + + { + typedef double T; + typedef std::array<T, 3> C; + C c = {1}; + assert(c.size() == 3.0); + assert(c[0] == 1); + } + { + typedef int T; + typedef std::array<T, 1> C; + C c = {}; + assert(c.size() == 1); + } } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits