Skip to content
Snippets Groups Projects
Commit 10ce7bd7 authored by Christian Engwer's avatar Christian Engwer
Browse files

test for fassign stuff

[[Imported from SVN: r5028]]
parent 52b013d7
No related branches found
No related tags found
No related merge requests found
......@@ -29,3 +29,8 @@ bigunsignedinttest
mpihelpertest
singletontest
utilitytest
testfassign_fail1
testfassign_fail2
testfassign1
testfassign2
testfassign3
......@@ -4,11 +4,16 @@ TESTPROGS = parsetest test-stack arraylisttest smartpointertest \
sllisttest iteratorfacadetest tuplestest fvectortest fmatrixtest \
poolallocatortest settest gcdlcdtest streamtest \
bigunsignedinttest mpihelpertest singletontest mpicollcomm \
utilitytest lrutest
utilitytest lrutest \
testfassign1 testfassign2 testfassign3 \
testfassign_fail1 testfassign_fail2
# which tests to run
TESTS = $(TESTPROGS)
XFAIL_TESTS = testfassign_fail1 testfassign_fail2
# programs just to build when "make check" is used
check_PROGRAMS = $(TESTPROGS)
......@@ -76,6 +81,21 @@ singletontest_LDFLAGS = $(LOCAL_LIBS)
utilitytest_SOURCES = utilitytest.cc
utilitytest_LDFLAGS = $(LOCAL_LIBS)
testfassign1_SOURCES = testfassign.cc testfassign2.cc
testfassign1_CPPFLAGS = $(AM_CPPFLAGS) -D_SIZE=3 -D_VALUES="1,2,3"
testfassign2_SOURCES = testfassign.cc
testfassign2_CPPFLAGS = $(AM_CPPFLAGS) -D_SIZE=3 -D_VALUES="1,Dune::zero"
testfassign3_SOURCES = testfassign.cc
testfassign3_CPPFLAGS = $(AM_CPPFLAGS) -D_SIZE=3 -D_VALUES="Dune::zero"
testfassign_fail1_SOURCES = testfassign.cc
testfassign_fail1_CPPFLAGS = $(AM_CPPFLAGS) -D_SIZE=3 -D_VALUES="1,2"
testfassign_fail2_SOURCES = testfassign.cc
testfassign_fail2_CPPFLAGS = $(AM_CPPFLAGS) -D_SIZE=3 -D_VALUES="1,2,3,4"
sourcescheck_NOSOURCES = exprtmpl.cc timing.cc
include $(top_srcdir)/am/global-rules
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// vi: set et ts=4 sw=2 sts=2:
#include "config.h"
#include <iostream>
#include <dune/common/fvector.hh>
#include <dune/common/fassign.hh>
int main ()
{
try
{
static const int sz = _SIZE;
Dune::FieldVector<int,sz> v;
v <<= _VALUES;
for (int i=0; i<sz; i++)
std::cout << "value[" << i << "] = " << v[i] << "\n";
return 0;
}
catch (Dune::MathError &e)
{
std::cerr << "Dune reported MathError: " << e << std::endl;
return 1;
}
catch (Dune::Exception &e)
{
std::cerr << "Dune reported error: " << e << std::endl;
return 1;
}
catch (...)
{
std::cerr << "Unknown exception thrown!" << std::endl;
return 1;
}
}
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// vi: set et ts=4 sw=2 sts=2:
#include "config.h"
#include <dune/common/fassign.hh>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment