From 1eb7dca2e6d45ba51be5808bca82a3168a700c15 Mon Sep 17 00:00:00 2001 From: heister Date: Fri, 7 Feb 2014 21:22:27 +0000 Subject: [PATCH] fix test that relies on units git-svn-id: https://svn.dealii.org/branches/branch_muparser@32433 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/base/function_parser_02.cc | 8 +++++--- .../function_parser_02.with_functionparser=true.output | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/base/function_parser_02.cc b/tests/base/function_parser_02.cc index 761e7a382e..ea1fea3535 100644 --- a/tests/base/function_parser_02.cc +++ b/tests/base/function_parser_02.cc @@ -18,6 +18,8 @@ // This program tests the functionality of the function parser // wrapper with respect to the ability to deal with units. +// because units are deprecated and muparser can not deal with this, +// recycle the test to use constants instead of units #include "../tests.h" #include @@ -42,14 +44,14 @@ int main () std::map units; constants["PI"] = 3.141592654; - units["cm"] = 10; - units["m"] = 1000; + constants["cm"] = 10; + constants["m"] = 1000; Point<2> point(2.0, 3.0); //initialized with units FunctionParser<2> fp; - function[0] = "x cm + y m + PI"; + function[0] = "x * cm + y * m + PI"; fp.initialize(FunctionParser<2>::default_variable_names(), function, constants, units); diff --git a/tests/base/function_parser_02.with_functionparser=true.output b/tests/base/function_parser_02.with_functionparser=true.output index 9e199c8160..e530a8066a 100644 --- a/tests/base/function_parser_02.with_functionparser=true.output +++ b/tests/base/function_parser_02.with_functionparser=true.output @@ -1,5 +1,5 @@ -DEAL::Function [x cm + y m + PI] @point [2.00000 3.00000] is [3023.14] -DEAL::Function [x cm + y m + PI] @point [2.00000 3.00000] is [3023.14] +DEAL::Function [x * cm + y * m + PI] @point [2.00000 3.00000] is [3023.14] +DEAL::Function [x * cm + y * m + PI] @point [2.00000 3.00000] is [3023.14] DEAL::Function [x + y + PI] @point [2.00000 3.00000] is [8.14159] DEAL::Function [x + y + PI] @point [2.00000 3.00000] is [8.14159] -- 2.39.5