|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r50657 - sandbox/math_toolkit/libs/math/test
From: pbristow_at_[hidden]
Date: 2009-01-17 12:30:54
Author: pbristow
Date: 2009-01-17 12:30:53 EST (Sat, 17 Jan 2009)
New Revision: 50657
URL: http://svn.boost.org/trac/boost/changeset/50657
Log:
Added check on convenience typedef.
Text files modified:
sandbox/math_toolkit/libs/math/test/test_laplace.cpp | 28 ++++++++++++++--------------
1 files changed, 14 insertions(+), 14 deletions(-)
Modified: sandbox/math_toolkit/libs/math/test/test_laplace.cpp
==============================================================================
--- sandbox/math_toolkit/libs/math/test/test_laplace.cpp (original)
+++ sandbox/math_toolkit/libs/math/test/test_laplace.cpp 2009-01-17 12:30:53 EST (Sat, 17 Jan 2009)
@@ -1,6 +1,6 @@
// Copyright Thijs van den Berg, 2008.
// Copyright John Maddock 2008.
-// Copyright Paul A. Bristow 2008.
+// Copyright Paul A. Bristow 2008, 2009.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
@@ -298,7 +298,6 @@
}
}
-
template <class RealType>
void test_hazard_pdf_cdf_symmetry()
{
@@ -401,8 +400,7 @@
static_cast<RealType>(3),
tolerance);
}
-}
-
+} // template <class RealType> void test_mmm_moments()
template <class RealType>
void test_complemented()
@@ -440,18 +438,19 @@
tolerance);
}
}
-}
-
+} // void test_complemented()
template <class RealType>
void test_bad_dist_parameters()
{
+ // Check that can generate laplace distribution using both convenience methods:
+ laplace_distribution<double> lp1(0.5); // Using default RealType double.
+ boost::math::laplace lp2(0.5); // Using typedef.
+
BOOST_CHECK_THROW(boost::math::laplace_distribution<RealType> lbad1(0, 0), std::domain_error);
BOOST_CHECK_THROW(boost::math::laplace_distribution<RealType> lbad2(0, -1), std::domain_error);
}
-
-
template <class RealType>
void test_extreme_function_arguments()
{
@@ -477,14 +476,12 @@
BOOST_CHECK_EQUAL( quantile(L2, 1), +std::numeric_limits<RealType>::infinity() );
}
-
BOOST_AUTO_TEST_CASE( vs_GNU_Octave )
{
test_pdf_cdf_ocatave<float>();
test_pdf_cdf_ocatave<double>();
}
-
BOOST_AUTO_TEST_CASE( cdf_quantile_symmetry )
{
test_cdf_quantile_symmetry<float>();
@@ -498,14 +495,12 @@
test_hazard_pdf_cdf_symmetry<double>();
}
-
BOOST_AUTO_TEST_CASE( location_scale_symmetry )
{
test_location_scale_symmetry<float>();
test_location_scale_symmetry<double>();
}
-
BOOST_AUTO_TEST_CASE( mmm_moments )
{
test_mmm_moments<float>();
@@ -561,10 +556,15 @@
Release Multi-threaded (/MT)
+Compiling...
+test_laplace.cpp
+Linking...
+Generating code
+Finished generating code
+Embedding manifest...
+Autorun "j:\Cpp\MathToolkit\test\Math_test\release\test_laplace.exe"
Running 8 test cases...
-
*** No errors detected
-Press any key to continue . . .
*/
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk