diff options
author | Marshall Clow <mclow.lists@gmail.com> | 2016-02-23 16:25:20 +0000 |
---|---|---|
committer | Marshall Clow <mclow.lists@gmail.com> | 2016-02-23 16:25:20 +0000 |
commit | 9fe1e550c8086211372270d9f29cc806c09a4d19 (patch) | |
tree | 2036846cbbfc014d2ca05751d95094f47feb3b55 /libcxx | |
parent | d59478c9ab11d231121230a57e9c7bbef413375c (diff) | |
download | bcm5719-llvm-9fe1e550c8086211372270d9f29cc806c09a4d19.tar.gz bcm5719-llvm-9fe1e550c8086211372270d9f29cc806c09a4d19.zip |
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
Diffstat (limited to 'libcxx')
-rw-r--r-- | libcxx/test/std/containers/sequences/array/array.cons/initializer_list.pass.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
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 5e429adb6fc..64ea75a4006 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<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); + } } |