From 9fe1e550c8086211372270d9f29cc806c09a4d19 Mon Sep 17 00:00:00 2001 From: Marshall Clow Date: Tue, 23 Feb 2016 16:25:20 +0000 Subject: [PATCH] Add additional tests to ensure that we DTRT with short lists. This is LWG#2590, but there are no code changes, just additional tests llvm-svn: 261648 --- .../sequences/array/array.cons/initializer_list.pass.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/libcxx/test/std/containers/sequences/array/array.cons/initializer_list.pass.cpp b/libcxx/test/std/containers/sequences/array/array.cons/initializer_list.pass.cpp index 5e429ad..64ea75a 100644 --- a/libcxx/test/std/containers/sequences/array/array.cons/initializer_list.pass.cpp +++ b/libcxx/test/std/containers/sequences/array/array.cons/initializer_list.pass.cpp @@ -35,4 +35,18 @@ int main() C c = {}; assert(c.size() == 0); } + + { + typedef double T; + typedef std::array C; + C c = {1}; + assert(c.size() == 3.0); + assert(c[0] == 1); + } + { + typedef int T; + typedef std::array C; + C c = {}; + assert(c.size() == 1); + } } -- 2.7.4