COPASI API  4.16.103
Public Member Functions | Static Protected Attributes | Private Member Functions | List of all members
test000080 Class Reference

#include <test000080.h>

Inheritance diagram for test000080:
Inheritance graph
[legend]
Collaboration diagram for test000080:
Collaboration graph
[legend]

Public Member Functions

void setUp ()
 
void tearDown ()
 
void test_mass_action_recognition_bug ()
 

Static Protected Attributes

static const char * MODEL_STRING1
 
static CCopasiDataModelpCOPASIDATAMODEL = NULL
 

Private Member Functions

 CPPUNIT_TEST (test_mass_action_recognition_bug)
 
 CPPUNIT_TEST_SUITE (test000080)
 
 CPPUNIT_TEST_SUITE_END ()
 

Detailed Description

Definition at line 24 of file test000080.h.

Member Function Documentation

test000080::CPPUNIT_TEST ( test_mass_action_recognition_bug  )
private
test000080::CPPUNIT_TEST_SUITE ( test000080  )
private
test000080::CPPUNIT_TEST_SUITE_END ( )
private
void test000080::setUp ( )

Definition at line 35 of file test000080.cpp.

References CCopasiRootContainer::addDatamodel(), CCopasiRootContainer::init(), and pCOPASIDATAMODEL.

36 {
37  // Create the root container.
38  CCopasiRootContainer::init(0, NULL, false);
39  // Create the global data model.
41 }
static CCopasiDataModel * addDatamodel()
static void init(int argc, char *argv[], const bool &withGui=false)
static CCopasiDataModel * pCOPASIDATAMODEL
Definition: test000080.h:33
void test000080::tearDown ( )

Definition at line 43 of file test000080.cpp.

References CCopasiRootContainer::destroy().

void test000080::test_mass_action_recognition_bug ( )

Definition at line 48 of file test000080.cpp.

References CCopasiDataModel::getModel(), CModel::getReactions(), CEvaluationTree::getType(), CCopasiDataModel::importSBMLFromString(), MODEL_STRING1, pCOPASIDATAMODEL, CCopasiVector< T >::size(), and CEvaluationTree::UserDefined.

49 {
50  CCopasiDataModel* pDataModel = pCOPASIDATAMODEL;
51 
52  try
53  {
54  CPPUNIT_ASSERT(pDataModel->importSBMLFromString(test000080::MODEL_STRING1));
55  }
56  catch (...)
57  {
58  // there should not be an exception
59  CPPUNIT_ASSERT(false);
60  }
61 
62  const CModel* pModel = pDataModel->getModel();
63 
64  CPPUNIT_ASSERT(pModel != NULL);
65 
66  CPPUNIT_ASSERT(pModel->getReactions().size() == 1);
67 
68  const CReaction* pReaction = pModel->getReactions()[0];
69 
70  CPPUNIT_ASSERT(pReaction != NULL);
71 
72  const CFunction* pFun = pReaction->getFunction();
73 
74  CPPUNIT_ASSERT(pFun != NULL);
75 
76  CPPUNIT_ASSERT(pFun->getType() == CEvaluationTree::UserDefined);
77 }
virtual size_t size() const
static const char * MODEL_STRING1
Definition: test000080.h:34
const CEvaluationTree::Type & getType() const
bool importSBMLFromString(const std::string &sbmlDocumentText, CProcessReport *pImportHandler=NULL, const bool &deleteOldData=true)
The class for handling a chemical kinetic function.
Definition: CFunction.h:29
CCopasiVectorNS< CReaction > & getReactions()
Definition: CModel.cpp:1039
Definition: CModel.h:50
static CCopasiDataModel * pCOPASIDATAMODEL
Definition: test000080.h:33

Member Data Documentation

const char * test000080::MODEL_STRING1
staticprotected

Definition at line 34 of file test000080.h.

Referenced by test_mass_action_recognition_bug().

CCopasiDataModel * test000080::pCOPASIDATAMODEL = NULL
staticprotected

This is a test for a bug where some kinetics were wrongly recognized as mass action. This kind of kinetic is used in the sbml testsuite in test 65, 121, 250, 253, 256 and 600.

Definition at line 33 of file test000080.h.

Referenced by setUp(), and test_mass_action_recognition_bug().


The documentation for this class was generated from the following files: