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

#include <test000072.h>

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

Public Member Functions

void setUp ()
 
void tearDown ()
 
void test_bug1086 ()
 

Static Protected Attributes

static const char * MODEL_STRING1
 
static CCopasiDataModelpCOPASIDATAMODEL = NULL
 

Private Member Functions

 CPPUNIT_TEST (test_bug1086)
 
 CPPUNIT_TEST_SUITE (test000072)
 
 CPPUNIT_TEST_SUITE_END ()
 

Detailed Description

Definition at line 26 of file test000072.h.

Member Function Documentation

test000072::CPPUNIT_TEST ( test_bug1086  )
private
test000072::CPPUNIT_TEST_SUITE ( test000072  )
private
test000072::CPPUNIT_TEST_SUITE_END ( )
private
void test000072::setUp ( )

Definition at line 32 of file test000072.cpp.

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

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

Definition at line 40 of file test000072.cpp.

References CCopasiRootContainer::destroy().

void test000072::test_bug1086 ( )

Definition at line 45 of file test000072.cpp.

References CCopasiDataModel::exportSBMLToString(), CCopasiDataModel::importSBMLFromString(), MODEL_STRING1, and pCOPASIDATAMODEL.

46 {
47  CCopasiDataModel* pDataModel = pCOPASIDATAMODEL;
48  CPPUNIT_ASSERT(pDataModel->importSBMLFromString(MODEL_STRING1));
49  // now try to export several times
50  std::string s = pDataModel->exportSBMLToString(NULL, 1, 2);
51  CPPUNIT_ASSERT(!s.empty());
52  s = pDataModel->exportSBMLToString(NULL, 2, 3);
53  CPPUNIT_ASSERT(!s.empty());
54 }
std::string exportSBMLToString(CProcessReport *pExportHandler, int sbmlLevel, int sbmlVersion)
static CCopasiDataModel * pCOPASIDATAMODEL
Definition: test000072.h:34
bool importSBMLFromString(const std::string &sbmlDocumentText, CProcessReport *pImportHandler=NULL, const bool &deleteOldData=true)
static const char * MODEL_STRING1
Definition: test000072.h:33

Member Data Documentation

const char * test000072::MODEL_STRING1
staticprotected

Definition at line 33 of file test000072.h.

Referenced by test_bug1086().

CCopasiDataModel * test000072::pCOPASIDATAMODEL = NULL
staticprotected

Make sure exporting to Level2 after an export to Level1 does not crash COPASI.

Definition at line 34 of file test000072.h.

Referenced by setUp(), and test_bug1086().


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