From: bangerth Date: Thu, 25 Aug 2011 19:13:52 +0000 (+0000) Subject: New test. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=73182bc2ec752858ac28af41b79191e60e4c7f70;p=dealii-svn.git New test. git-svn-id: https://svn.dealii.org/trunk@24204 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/base/utilities_03.cc b/tests/base/utilities_03.cc new file mode 100644 index 0000000000..4d3a63509e --- /dev/null +++ b/tests/base/utilities_03.cc @@ -0,0 +1,50 @@ +//----------------------------------------------------------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2005, 2006, 2011 by the deal.II authors +// +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//----------------------------------------------------------------------------- + +// test functions in namespace Utilities + +#include "../tests.h" +#include +#include +#include +#include + +#include + + +void test () +{ + deallog << Utilities::string_to_double (" 413 ") << std::endl; + + std::vector v; + v.push_back ("1.5"); + v.push_back (" -12.5"); + v.push_back ("+125.5 "); + Assert (Utilities::string_to_double (v).size() == 3, ExcInternalError()); + deallog << Utilities::string_to_double (v)[0] << std::endl; + deallog << Utilities::string_to_double (v)[1] << std::endl; + deallog << Utilities::string_to_double (v)[2] << std::endl; +} + + + + +int main() +{ + std::ofstream logfile("utilities_03/output"); + deallog.attach(logfile); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); + + test (); +} diff --git a/tests/base/utilities_03/cmp/generic b/tests/base/utilities_03/cmp/generic new file mode 100644 index 0000000000..4ee2ac1ed8 --- /dev/null +++ b/tests/base/utilities_03/cmp/generic @@ -0,0 +1,5 @@ + +DEAL::413.000 +DEAL::1.50000 +DEAL::-12.5000 +DEAL::125.500 diff --git a/tests/base/utilities_03/cmp/powerpc-apple-darwin8.10.0+gcc4.0 b/tests/base/utilities_03/cmp/powerpc-apple-darwin8.10.0+gcc4.0 new file mode 100644 index 0000000000..902f619d9c --- /dev/null +++ b/tests/base/utilities_03/cmp/powerpc-apple-darwin8.10.0+gcc4.0 @@ -0,0 +1,9 @@ + +DEAL::0042 +DEAL::42 +DEAL::3 +DEAL::413 +DEAL::1 +DEAL::-12 +DEAL::125 +DEAL::-177.002 -36.2427 43.4584 diff --git a/tests/base/utilities_03/cmp/powerpc-apple-darwin8.8.0+gcc4.0 b/tests/base/utilities_03/cmp/powerpc-apple-darwin8.8.0+gcc4.0 new file mode 100644 index 0000000000..902f619d9c --- /dev/null +++ b/tests/base/utilities_03/cmp/powerpc-apple-darwin8.8.0+gcc4.0 @@ -0,0 +1,9 @@ + +DEAL::0042 +DEAL::42 +DEAL::3 +DEAL::413 +DEAL::1 +DEAL::-12 +DEAL::125 +DEAL::-177.002 -36.2427 43.4584