diff options
| author | Howard Hinnant <hhinnant@apple.com> | 2012-04-02 15:00:14 +0000 |
|---|---|---|
| committer | Howard Hinnant <hhinnant@apple.com> | 2012-04-02 15:00:14 +0000 |
| commit | e8df82fa1ad2e6960d62e424819549d8154eee95 (patch) | |
| tree | ccc62d045c8e911bce137ea358acd9fb25f32b54 /libcxx/test/numerics/rand | |
| parent | ebe09ec137faae957ffc206edff394b9a20598f4 (diff) | |
| download | bcm5719-llvm-e8df82fa1ad2e6960d62e424819549d8154eee95.tar.gz bcm5719-llvm-e8df82fa1ad2e6960d62e424819549d8154eee95.zip | |
Fix test for default constructor of discrete_distribution. This partially addresses http://llvm.org/bugs/show_bug.cgi?id=12436.
llvm-svn: 153873
Diffstat (limited to 'libcxx/test/numerics/rand')
| -rw-r--r-- | libcxx/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/ctor_default.pass.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/libcxx/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/ctor_default.pass.cpp b/libcxx/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/ctor_default.pass.cpp index 2538603cdba..3c1ed6a186e 100644 --- a/libcxx/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/ctor_default.pass.cpp +++ b/libcxx/test/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.discrete/ctor_default.pass.cpp @@ -12,21 +12,18 @@ // template<class IntType = int> // class discrete_distribution -// discrete_distribution(initializer_list<double> wl); +// discrete_distribution(); #include <random> #include <cassert> int main() { -#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS { typedef std::discrete_distribution<> D; - D d = {1., 2.}; + D d; std::vector<double> p = d.probabilities(); - assert(p.size() == 2); + assert(p.size() == 1); assert(p[0] == 1); - assert(p[1] == 2); } -#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS } |

