Thyra Package Browser (Single Doxygen Collection) Version of the Day
Simple2DModelEvaluator_UnitTests.cpp
Go to the documentation of this file.
00001 
00002 #include "Thyra_Simple2DModelEvaluator.hpp"
00003 
00004 #include "Teuchos_UnitTestHarness.hpp"
00005 
00006 
00007 namespace {
00008 
00009 
00010 using Teuchos::null;
00011 using Teuchos::RCP;
00012 typedef Thyra::ModelEvaluatorBase MEB;
00013 using Thyra::Simple2DModelEvaluator;
00014 using Thyra::simple2DModelEvaluator;
00015 
00016 
00017 //
00018 // Unit tests
00019 //
00020 
00021 
00022 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL( SimpleModelEvaluator, construct, Scalar )
00023 {
00024   RCP<Simple2DModelEvaluator<Scalar> > model = simple2DModelEvaluator<Scalar>();
00025   TEST_ASSERT(model != null);
00026   TEST_EQUALITY(model->Np(), 0);
00027   TEST_EQUALITY(model->Ng(), 0);
00028   TEST_ASSERT(model->get_x_space() != null);
00029   TEST_EQUALITY(model->get_x_space()->dim(), 2);
00030   TEST_ASSERT(model->get_f_space() != null);
00031   TEST_EQUALITY(model->get_f_space()->dim(), 2);
00032   // ToDo: Test getNominalValues()
00033   TEST_ASSERT(model->create_W_op() != null);
00034   TEST_ASSERT(model->get_W_factory() != null);
00035   MEB::InArgs<Scalar> inArgs = model->createInArgs();
00036   TEST_ASSERT(inArgs.supports(MEB::IN_ARG_x));
00037   TEST_EQUALITY(inArgs.Np(), 0);
00038 }
00039 
00040 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT_REAL_SCALAR_TYPES(
00041   SimpleModelEvaluator, construct )
00042 
00043 
00044 TEUCHOS_UNIT_TEST_TEMPLATE_1_DECL( SimpleModelEvaluator, eval, Scalar )
00045 {
00046   RCP<Simple2DModelEvaluator<Scalar> > model = simple2DModelEvaluator<Scalar>();
00047   // ToDo: Finish this!
00048   //TEST_FOR_EXCEPT(true);
00049 }
00050 
00051 TEUCHOS_UNIT_TEST_TEMPLATE_1_INSTANT_REAL_SCALAR_TYPES(
00052   SimpleModelEvaluator, eval )
00053 
00054 
00055 } // namespace
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines