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

#include <test000083.h>

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

Public Member Functions

void setUp ()
 
void tearDown ()
 
void test_import_compartment_units_1 ()
 
void test_import_compartment_units_10 ()
 
void test_import_compartment_units_11 ()
 
void test_import_compartment_units_12 ()
 
void test_import_compartment_units_13 ()
 
void test_import_compartment_units_14 ()
 
void test_import_compartment_units_15 ()
 
void test_import_compartment_units_16 ()
 
void test_import_compartment_units_17 ()
 
void test_import_compartment_units_18 ()
 
void test_import_compartment_units_19 ()
 
void test_import_compartment_units_2 ()
 
void test_import_compartment_units_20 ()
 
void test_import_compartment_units_21 ()
 
void test_import_compartment_units_3 ()
 
void test_import_compartment_units_4 ()
 
void test_import_compartment_units_5 ()
 
void test_import_compartment_units_6 ()
 
void test_import_compartment_units_7 ()
 
void test_import_compartment_units_8 ()
 
void test_import_compartment_units_9 ()
 

Static Protected Attributes

static const char * MODEL_STRING1
 
static const char * MODEL_STRING10
 
static const char * MODEL_STRING11
 
static const char * MODEL_STRING12
 
static const char * MODEL_STRING13
 
static const char * MODEL_STRING14
 
static const char * MODEL_STRING15
 
static const char * MODEL_STRING16
 
static const char * MODEL_STRING17
 
static const char * MODEL_STRING18
 
static const char * MODEL_STRING19
 
static const char * MODEL_STRING2
 
static const char * MODEL_STRING20
 
static const char * MODEL_STRING21
 
static const char * MODEL_STRING3
 
static const char * MODEL_STRING4
 
static const char * MODEL_STRING5
 
static const char * MODEL_STRING6
 
static const char * MODEL_STRING7
 
static const char * MODEL_STRING8
 
static const char * MODEL_STRING9
 
static CCopasiDataModelpCOPASIDATAMODEL = NULL
 

Private Member Functions

 CPPUNIT_TEST (test_import_compartment_units_1)
 
 CPPUNIT_TEST (test_import_compartment_units_2)
 
 CPPUNIT_TEST (test_import_compartment_units_3)
 
 CPPUNIT_TEST (test_import_compartment_units_4)
 
 CPPUNIT_TEST (test_import_compartment_units_5)
 
 CPPUNIT_TEST (test_import_compartment_units_6)
 
 CPPUNIT_TEST (test_import_compartment_units_7)
 
 CPPUNIT_TEST (test_import_compartment_units_8)
 
 CPPUNIT_TEST (test_import_compartment_units_9)
 
 CPPUNIT_TEST (test_import_compartment_units_10)
 
 CPPUNIT_TEST (test_import_compartment_units_11)
 
 CPPUNIT_TEST (test_import_compartment_units_12)
 
 CPPUNIT_TEST (test_import_compartment_units_13)
 
 CPPUNIT_TEST (test_import_compartment_units_14)
 
 CPPUNIT_TEST (test_import_compartment_units_15)
 
 CPPUNIT_TEST (test_import_compartment_units_16)
 
 CPPUNIT_TEST (test_import_compartment_units_17)
 
 CPPUNIT_TEST (test_import_compartment_units_18)
 
 CPPUNIT_TEST (test_import_compartment_units_19)
 
 CPPUNIT_TEST (test_import_compartment_units_20)
 
 CPPUNIT_TEST (test_import_compartment_units_21)
 
 CPPUNIT_TEST_SUITE (test000083)
 
 CPPUNIT_TEST_SUITE_END ()
 

Detailed Description

Definition at line 28 of file test000083.h.

Member Function Documentation

test000083::CPPUNIT_TEST ( test_import_compartment_units_1  )
private
test000083::CPPUNIT_TEST ( test_import_compartment_units_2  )
private
test000083::CPPUNIT_TEST ( test_import_compartment_units_3  )
private
test000083::CPPUNIT_TEST ( test_import_compartment_units_4  )
private
test000083::CPPUNIT_TEST ( test_import_compartment_units_5  )
private
test000083::CPPUNIT_TEST ( test_import_compartment_units_6  )
private
test000083::CPPUNIT_TEST ( test_import_compartment_units_7  )
private
test000083::CPPUNIT_TEST ( test_import_compartment_units_8  )
private
test000083::CPPUNIT_TEST ( test_import_compartment_units_9  )
private
test000083::CPPUNIT_TEST ( test_import_compartment_units_10  )
private
test000083::CPPUNIT_TEST ( test_import_compartment_units_11  )
private
test000083::CPPUNIT_TEST ( test_import_compartment_units_12  )
private
test000083::CPPUNIT_TEST ( test_import_compartment_units_13  )
private
test000083::CPPUNIT_TEST ( test_import_compartment_units_14  )
private
test000083::CPPUNIT_TEST ( test_import_compartment_units_15  )
private
test000083::CPPUNIT_TEST ( test_import_compartment_units_16  )
private
test000083::CPPUNIT_TEST ( test_import_compartment_units_17  )
private
test000083::CPPUNIT_TEST ( test_import_compartment_units_18  )
private
test000083::CPPUNIT_TEST ( test_import_compartment_units_19  )
private
test000083::CPPUNIT_TEST ( test_import_compartment_units_20  )
private
test000083::CPPUNIT_TEST ( test_import_compartment_units_21  )
private
test000083::CPPUNIT_TEST_SUITE ( test000083  )
private
test000083::CPPUNIT_TEST_SUITE_END ( )
private
void test000083::setUp ( )

Definition at line 36 of file test000083.cpp.

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

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

Definition at line 44 of file test000083.cpp.

References CCopasiRootContainer::destroy().

void test000083::test_import_compartment_units_1 ( )

Definition at line 49 of file test000083.cpp.

References CCopasiMessage::getLastMessage(), CCopasiDataModel::getModel(), CCopasiMessage::getNumber(), CCopasiDataModel::importSBMLFromString(), MCSBML, MODEL_STRING1, CModel::nl, pCOPASIDATAMODEL, and CCopasiMessage::size().

50 {
51  CCopasiDataModel* pDataModel = pCOPASIDATAMODEL;
52  CPPUNIT_ASSERT(pDataModel->importSBMLFromString(MODEL_STRING1));
53  CModel* pModel = pDataModel->getModel();
54  CPPUNIT_ASSERT(pModel->getCompartments().size() == 1);
55  CPPUNIT_ASSERT(pModel != NULL);
56  CPPUNIT_ASSERT(pModel->getVolumeUnitEnum() == CModel::nl);
57  // make sure there is no warning about inconsistent units
58  unsigned int i = 0, iMax = CCopasiMessage::size();
59 
60  while (i < iMax)
61  {
63  // make sure there is no message about units not being consistent
64  CPPUNIT_ASSERT(message.getNumber() != MCSBML + 24);
65  // make sure all units were imported
66  CPPUNIT_ASSERT(message.getNumber() != MCSBML + 55);
67  CPPUNIT_ASSERT(message.getNumber() != MCSBML + 79);
68  ++i;
69  }
70 }
const size_t & getNumber() const
static CCopasiDataModel * pCOPASIDATAMODEL
Definition: test000083.h:118
#define MCSBML
static size_t size()
static const char * MODEL_STRING1
Definition: test000083.h:58
static CCopasiMessage getLastMessage()
bool importSBMLFromString(const std::string &sbmlDocumentText, CProcessReport *pImportHandler=NULL, const bool &deleteOldData=true)
Definition: CModel.h:50
void test000083::test_import_compartment_units_10 ( )

Definition at line 423 of file test000083.cpp.

References CCopasiMessage::getLastMessage(), CCopasiDataModel::getModel(), CCopasiMessage::getNumber(), CCopasiDataModel::importSBMLFromString(), CModel::l, MCSBML, MODEL_STRING10, pCOPASIDATAMODEL, and CCopasiMessage::size().

424 {
425  CCopasiDataModel* pDataModel = pCOPASIDATAMODEL;
426  CPPUNIT_ASSERT(pDataModel->importSBMLFromString(MODEL_STRING10));
427  CModel* pModel = pDataModel->getModel();
428  CPPUNIT_ASSERT(pModel->getCompartments().size() == 1);
429  CPPUNIT_ASSERT(pModel != NULL);
430  CPPUNIT_ASSERT(pModel->getVolumeUnitEnum() == CModel::l);
431  // make sure there is no warning about inconsistent units
432  unsigned int i = 0, iMax = CCopasiMessage::size();
433  unsigned int found24 = 0;
434  unsigned int found55 = 0;
435  unsigned int found79 = 0;
436 
437  while (i < iMax)
438  {
440 
441  // check for messages about inconsistent units
442  if (message.getNumber() == MCSBML + 24)
443  {
444  ++found24;
445  }
446 
447  // check for import errors
448  if (message.getNumber() == MCSBML + 55)
449  {
450  ++found55;
451  }
452 
453  // check for import errors
454  if (message.getNumber() == MCSBML + 79)
455  {
456  ++found79;
457  }
458 
459  ++i;
460  }
461 
462  CPPUNIT_ASSERT(found55 == 0);
463  CPPUNIT_ASSERT(found24 == 0);
464  CPPUNIT_ASSERT(found79 == 0);
465 }
const size_t & getNumber() const
static CCopasiDataModel * pCOPASIDATAMODEL
Definition: test000083.h:118
#define MCSBML
static size_t size()
static CCopasiMessage getLastMessage()
bool importSBMLFromString(const std::string &sbmlDocumentText, CProcessReport *pImportHandler=NULL, const bool &deleteOldData=true)
Definition: CModel.h:50
static const char * MODEL_STRING10
Definition: test000083.h:83
void test000083::test_import_compartment_units_11 ( )

Definition at line 467 of file test000083.cpp.

References CCopasiMessage::getLastMessage(), CCopasiDataModel::getModel(), CCopasiMessage::getNumber(), CCopasiDataModel::importSBMLFromString(), CModel::l, MCSBML, MODEL_STRING11, pCOPASIDATAMODEL, and CCopasiMessage::size().

468 {
469  CCopasiDataModel* pDataModel = pCOPASIDATAMODEL;
470  CPPUNIT_ASSERT(pDataModel->importSBMLFromString(MODEL_STRING11));
471  CModel* pModel = pDataModel->getModel();
472  CPPUNIT_ASSERT(pModel->getCompartments().size() == 1);
473  CPPUNIT_ASSERT(pModel != NULL);
474  CPPUNIT_ASSERT(pModel->getVolumeUnitEnum() == CModel::l);
475  // make sure there is no warning about inconsistent units
476  unsigned int i = 0, iMax = CCopasiMessage::size();
477  unsigned int found24 = 0;
478  unsigned int found55 = 0;
479  unsigned int found79 = 0;
480 
481  while (i < iMax)
482  {
484 
485  // check for messages about inconsistent units
486  if (message.getNumber() == MCSBML + 24)
487  {
488  ++found24;
489  }
490 
491  // check for import errors
492  if (message.getNumber() == MCSBML + 55)
493  {
494  ++found55;
495  }
496 
497  // check for import errors
498  if (message.getNumber() == MCSBML + 79)
499  {
500  ++found79;
501  }
502 
503  ++i;
504  }
505 
506  CPPUNIT_ASSERT(found55 == 0);
507  CPPUNIT_ASSERT(found24 == 0);
508  CPPUNIT_ASSERT(found79 == 1);
509 }
const size_t & getNumber() const
static CCopasiDataModel * pCOPASIDATAMODEL
Definition: test000083.h:118
#define MCSBML
static size_t size()
static CCopasiMessage getLastMessage()
bool importSBMLFromString(const std::string &sbmlDocumentText, CProcessReport *pImportHandler=NULL, const bool &deleteOldData=true)
Definition: CModel.h:50
static const char * MODEL_STRING11
Definition: test000083.h:86
void test000083::test_import_compartment_units_12 ( )

Definition at line 511 of file test000083.cpp.

References CCopasiMessage::getLastMessage(), CCopasiDataModel::getModel(), CCopasiMessage::getNumber(), CCopasiDataModel::importSBMLFromString(), CModel::l, MCSBML, MODEL_STRING12, pCOPASIDATAMODEL, and CCopasiMessage::size().

512 {
513  CCopasiDataModel* pDataModel = pCOPASIDATAMODEL;
514  CPPUNIT_ASSERT(pDataModel->importSBMLFromString(MODEL_STRING12));
515  CModel* pModel = pDataModel->getModel();
516  CPPUNIT_ASSERT(pModel->getCompartments().size() == 1);
517  CPPUNIT_ASSERT(pModel != NULL);
518  CPPUNIT_ASSERT(pModel->getVolumeUnitEnum() == CModel::l);
519  // make sure there is no warning about inconsistent units
520  unsigned int i = 0, iMax = CCopasiMessage::size();
521  unsigned int found24 = 0;
522  unsigned int found55 = 0;
523  unsigned int found79 = 0;
524 
525  while (i < iMax)
526  {
528 
529  // check for messages about inconsistent units
530  if (message.getNumber() == MCSBML + 24)
531  {
532  ++found24;
533  }
534 
535  // check for import errors
536  if (message.getNumber() == MCSBML + 55)
537  {
538  ++found55;
539  }
540 
541  // check for import errors
542  if (message.getNumber() == MCSBML + 79)
543  {
544  ++found79;
545  }
546 
547  ++i;
548  }
549 
550  CPPUNIT_ASSERT(found55 == 0);
551  CPPUNIT_ASSERT(found24 == 0);
552  CPPUNIT_ASSERT(found79 == 1);
553 }
const size_t & getNumber() const
static CCopasiDataModel * pCOPASIDATAMODEL
Definition: test000083.h:118
#define MCSBML
static size_t size()
static CCopasiMessage getLastMessage()
static const char * MODEL_STRING12
Definition: test000083.h:89
bool importSBMLFromString(const std::string &sbmlDocumentText, CProcessReport *pImportHandler=NULL, const bool &deleteOldData=true)
Definition: CModel.h:50
void test000083::test_import_compartment_units_13 ( )

Definition at line 555 of file test000083.cpp.

References CModel::dimensionlessVolume, CCopasiMessage::getLastMessage(), CCopasiDataModel::getModel(), CCopasiMessage::getNumber(), CCopasiDataModel::importSBMLFromString(), MCSBML, MODEL_STRING13, pCOPASIDATAMODEL, and CCopasiMessage::size().

556 {
557  CCopasiDataModel* pDataModel = pCOPASIDATAMODEL;
558  CPPUNIT_ASSERT(pDataModel->importSBMLFromString(MODEL_STRING13));
559  CModel* pModel = pDataModel->getModel();
560  CPPUNIT_ASSERT(pModel->getCompartments().size() == 1);
561  CPPUNIT_ASSERT(pModel != NULL);
562  CPPUNIT_ASSERT(pModel->getVolumeUnitEnum() == CModel::dimensionlessVolume);
563  // make sure there is no warning about inconsistent units
564  unsigned int i = 0, iMax = CCopasiMessage::size();
565 
566  while (i < iMax)
567  {
569  // make sure there is no message about units not being consistent
570  CPPUNIT_ASSERT(message.getNumber() != MCSBML + 24);
571  // make sure all units were imported
572  CPPUNIT_ASSERT(message.getNumber() != MCSBML + 55);
573  CPPUNIT_ASSERT(message.getNumber() != MCSBML + 79);
574  ++i;
575  }
576 }
const size_t & getNumber() const
static CCopasiDataModel * pCOPASIDATAMODEL
Definition: test000083.h:118
#define MCSBML
static size_t size()
static const char * MODEL_STRING13
Definition: test000083.h:92
static CCopasiMessage getLastMessage()
bool importSBMLFromString(const std::string &sbmlDocumentText, CProcessReport *pImportHandler=NULL, const bool &deleteOldData=true)
Definition: CModel.h:50
void test000083::test_import_compartment_units_14 ( )

Definition at line 578 of file test000083.cpp.

References CCopasiMessage::getLastMessage(), CCopasiDataModel::getModel(), CCopasiMessage::getNumber(), CCopasiDataModel::importSBMLFromString(), CModel::l, MCSBML, MODEL_STRING14, pCOPASIDATAMODEL, and CCopasiMessage::size().

579 {
580  CCopasiDataModel* pDataModel = pCOPASIDATAMODEL;
581  CPPUNIT_ASSERT(pDataModel->importSBMLFromString(MODEL_STRING14));
582  CModel* pModel = pDataModel->getModel();
583  CPPUNIT_ASSERT(pModel->getCompartments().size() == 1);
584  CPPUNIT_ASSERT(pModel != NULL);
585  CPPUNIT_ASSERT(pModel->getVolumeUnitEnum() == CModel::l);
586  // make sure there is no warning about inconsistent units
587  unsigned int i = 0, iMax = CCopasiMessage::size();
588  unsigned int found24 = 0;
589  unsigned int found55 = 0;
590  unsigned int found79 = 0;
591 
592  while (i < iMax)
593  {
595 
596  // check for messages about inconsistent units
597  if (message.getNumber() == MCSBML + 24)
598  {
599  ++found24;
600  }
601 
602  // check for import errors
603  if (message.getNumber() == MCSBML + 55)
604  {
605  ++found55;
606  }
607 
608  // check for import errors
609  if (message.getNumber() == MCSBML + 79)
610  {
611  ++found79;
612  }
613 
614  ++i;
615  }
616 
617  CPPUNIT_ASSERT(found55 == 0);
618  CPPUNIT_ASSERT(found24 == 0);
619  CPPUNIT_ASSERT(found79 == 1);
620 }
const size_t & getNumber() const
static CCopasiDataModel * pCOPASIDATAMODEL
Definition: test000083.h:118
#define MCSBML
static size_t size()
static CCopasiMessage getLastMessage()
bool importSBMLFromString(const std::string &sbmlDocumentText, CProcessReport *pImportHandler=NULL, const bool &deleteOldData=true)
static const char * MODEL_STRING14
Definition: test000083.h:95
Definition: CModel.h:50
void test000083::test_import_compartment_units_15 ( )

Definition at line 622 of file test000083.cpp.

References CCopasiMessage::getLastMessage(), CCopasiDataModel::getModel(), CCopasiMessage::getNumber(), CCopasiDataModel::importSBMLFromString(), CModel::l, MCSBML, MODEL_STRING15, pCOPASIDATAMODEL, and CCopasiMessage::size().

623 {
624  CCopasiDataModel* pDataModel = pCOPASIDATAMODEL;
625  CPPUNIT_ASSERT(pDataModel->importSBMLFromString(MODEL_STRING15));
626  CModel* pModel = pDataModel->getModel();
627  CPPUNIT_ASSERT(pModel->getCompartments().size() == 1);
628  CPPUNIT_ASSERT(pModel != NULL);
629  CPPUNIT_ASSERT(pModel->getVolumeUnitEnum() == CModel::l);
630  // make sure there is no warning about inconsistent units
631  unsigned int i = 0, iMax = CCopasiMessage::size();
632  unsigned int found24 = 0;
633  unsigned int found55 = 0;
634  unsigned int found79 = 0;
635 
636  while (i < iMax)
637  {
639 
640  // check for messages about inconsistent units
641  if (message.getNumber() == MCSBML + 24)
642  {
643  ++found24;
644  }
645 
646  // check for import errors
647  if (message.getNumber() == MCSBML + 55)
648  {
649  ++found55;
650  }
651 
652  // check for import errors
653  if (message.getNumber() == MCSBML + 79)
654  {
655  ++found79;
656  }
657 
658  ++i;
659  }
660 
661  CPPUNIT_ASSERT(found55 == 0);
662  CPPUNIT_ASSERT(found24 == 0);
663  CPPUNIT_ASSERT(found79 == 1);
664 }
const size_t & getNumber() const
static const char * MODEL_STRING15
Definition: test000083.h:98
static CCopasiDataModel * pCOPASIDATAMODEL
Definition: test000083.h:118
#define MCSBML
static size_t size()
static CCopasiMessage getLastMessage()
bool importSBMLFromString(const std::string &sbmlDocumentText, CProcessReport *pImportHandler=NULL, const bool &deleteOldData=true)
Definition: CModel.h:50
void test000083::test_import_compartment_units_16 ( )

Definition at line 666 of file test000083.cpp.

References CCopasiMessage::getLastMessage(), CCopasiDataModel::getModel(), CCopasiMessage::getNumber(), CCopasiDataModel::importSBMLFromString(), CModel::l, MCSBML, MODEL_STRING16, pCOPASIDATAMODEL, and CCopasiMessage::size().

667 {
668  CCopasiDataModel* pDataModel = pCOPASIDATAMODEL;
669  CPPUNIT_ASSERT(pDataModel->importSBMLFromString(MODEL_STRING16));
670  CModel* pModel = pDataModel->getModel();
671  CPPUNIT_ASSERT(pModel->getCompartments().size() == 1);
672  CPPUNIT_ASSERT(pModel != NULL);
673  CPPUNIT_ASSERT(pModel->getVolumeUnitEnum() == CModel::l);
674  // make sure there is no warning about inconsistent units
675  unsigned int i = 0, iMax = CCopasiMessage::size();
676  unsigned int found24 = 0;
677  unsigned int found55 = 0;
678  unsigned int found79 = 0;
679 
680  while (i < iMax)
681  {
683 
684  // check for messages about inconsistent units
685  if (message.getNumber() == MCSBML + 24)
686  {
687  ++found24;
688  }
689 
690  // check for import errors
691  if (message.getNumber() == MCSBML + 55)
692  {
693  ++found55;
694  }
695 
696  // check for import errors
697  if (message.getNumber() == MCSBML + 79)
698  {
699  ++found79;
700  }
701 
702  ++i;
703  }
704 
705  CPPUNIT_ASSERT(found55 == 0);
706  CPPUNIT_ASSERT(found24 == 0);
707  CPPUNIT_ASSERT(found79 == 1);
708 }
const size_t & getNumber() const
static const char * MODEL_STRING16
Definition: test000083.h:101
static CCopasiDataModel * pCOPASIDATAMODEL
Definition: test000083.h:118
#define MCSBML
static size_t size()
static CCopasiMessage getLastMessage()
bool importSBMLFromString(const std::string &sbmlDocumentText, CProcessReport *pImportHandler=NULL, const bool &deleteOldData=true)
Definition: CModel.h:50
void test000083::test_import_compartment_units_17 ( )

Definition at line 710 of file test000083.cpp.

References CCopasiMessage::getLastMessage(), CCopasiDataModel::getModel(), CCopasiMessage::getNumber(), CCopasiDataModel::importSBMLFromString(), CModel::l, MCSBML, MODEL_STRING17, pCOPASIDATAMODEL, and CCopasiMessage::size().

711 {
712  CCopasiDataModel* pDataModel = pCOPASIDATAMODEL;
713  CPPUNIT_ASSERT(pDataModel->importSBMLFromString(MODEL_STRING17));
714  CModel* pModel = pDataModel->getModel();
715  CPPUNIT_ASSERT(pModel->getCompartments().size() == 1);
716  CPPUNIT_ASSERT(pModel != NULL);
717  CPPUNIT_ASSERT(pModel->getVolumeUnitEnum() == CModel::l);
718  // make sure there is no warning about inconsistent units
719  unsigned int i = 0, iMax = CCopasiMessage::size();
720  unsigned int found24 = 0;
721  unsigned int found55 = 0;
722  unsigned int found79 = 0;
723 
724  while (i < iMax)
725  {
727 
728  // check for messages about inconsistent units
729  if (message.getNumber() == MCSBML + 24)
730  {
731  ++found24;
732  }
733 
734  // check for import errors
735  if (message.getNumber() == MCSBML + 55)
736  {
737  ++found55;
738  }
739 
740  // check for import errors
741  if (message.getNumber() == MCSBML + 79)
742  {
743  ++found79;
744  }
745 
746  ++i;
747  }
748 
749  CPPUNIT_ASSERT(found55 == 0);
750  CPPUNIT_ASSERT(found24 == 0);
751  CPPUNIT_ASSERT(found79 == 1);
752 }
const size_t & getNumber() const
static const char * MODEL_STRING17
Definition: test000083.h:104
static CCopasiDataModel * pCOPASIDATAMODEL
Definition: test000083.h:118
#define MCSBML
static size_t size()
static CCopasiMessage getLastMessage()
bool importSBMLFromString(const std::string &sbmlDocumentText, CProcessReport *pImportHandler=NULL, const bool &deleteOldData=true)
Definition: CModel.h:50
void test000083::test_import_compartment_units_18 ( )

Definition at line 754 of file test000083.cpp.

References CCopasiMessage::getLastMessage(), CCopasiDataModel::getModel(), CCopasiMessage::getNumber(), CCopasiDataModel::importSBMLFromString(), CModel::l, MCSBML, MODEL_STRING18, pCOPASIDATAMODEL, and CCopasiMessage::size().

755 {
756  CCopasiDataModel* pDataModel = pCOPASIDATAMODEL;
757  CPPUNIT_ASSERT(pDataModel->importSBMLFromString(MODEL_STRING18));
758  CModel* pModel = pDataModel->getModel();
759  CPPUNIT_ASSERT(pModel->getCompartments().size() == 2);
760  CPPUNIT_ASSERT(pModel != NULL);
761  CPPUNIT_ASSERT(pModel->getVolumeUnitEnum() == CModel::l);
762  // make sure there is no warning about inconsistent units
763  unsigned int i = 0, iMax = CCopasiMessage::size();
764  unsigned int found24 = 0;
765  unsigned int found55 = 0;
766  unsigned int found79 = 0;
767 
768  while (i < iMax)
769  {
771 
772  // check for messages about inconsistent units
773  if (message.getNumber() == MCSBML + 24)
774  {
775  ++found24;
776  }
777 
778  // check for import errors
779  if (message.getNumber() == MCSBML + 55)
780  {
781  ++found55;
782  }
783 
784  // check for import errors
785  if (message.getNumber() == MCSBML + 79)
786  {
787  ++found79;
788  }
789 
790  ++i;
791  }
792 
793  CPPUNIT_ASSERT(found55 == 0);
794  CPPUNIT_ASSERT(found24 == 0);
795  CPPUNIT_ASSERT(found79 == 0);
796 }
const size_t & getNumber() const
static CCopasiDataModel * pCOPASIDATAMODEL
Definition: test000083.h:118
#define MCSBML
static size_t size()
static const char * MODEL_STRING18
Definition: test000083.h:107
static CCopasiMessage getLastMessage()
bool importSBMLFromString(const std::string &sbmlDocumentText, CProcessReport *pImportHandler=NULL, const bool &deleteOldData=true)
Definition: CModel.h:50
void test000083::test_import_compartment_units_19 ( )

Definition at line 798 of file test000083.cpp.

References CCopasiMessage::getLastMessage(), CCopasiDataModel::getModel(), CCopasiMessage::getNumber(), CCopasiDataModel::importSBMLFromString(), CModel::l, MCSBML, MODEL_STRING19, pCOPASIDATAMODEL, and CCopasiMessage::size().

799 {
800  CCopasiDataModel* pDataModel = pCOPASIDATAMODEL;
801  CPPUNIT_ASSERT(pDataModel->importSBMLFromString(MODEL_STRING19));
802  CModel* pModel = pDataModel->getModel();
803  CPPUNIT_ASSERT(pModel->getCompartments().size() == 2);
804  CPPUNIT_ASSERT(pModel != NULL);
805  CPPUNIT_ASSERT(pModel->getVolumeUnitEnum() == CModel::l);
806  // make sure there is no warning about inconsistent units
807  unsigned int i = 0, iMax = CCopasiMessage::size();
808  unsigned int found24 = 0;
809  unsigned int found55 = 0;
810  unsigned int found79 = 0;
811 
812  while (i < iMax)
813  {
815 
816  // check for messages about inconsistent units
817  if (message.getNumber() == MCSBML + 24)
818  {
819  ++found24;
820  }
821 
822  // check for import errors
823  if (message.getNumber() == MCSBML + 55)
824  {
825  ++found55;
826  }
827 
828  // check for import errors
829  if (message.getNumber() == MCSBML + 79)
830  {
831  ++found79;
832  }
833 
834  ++i;
835  }
836 
837  CPPUNIT_ASSERT(found55 == 0);
838  CPPUNIT_ASSERT(found24 == 0);
839  CPPUNIT_ASSERT(found79 == 0);
840 }
const size_t & getNumber() const
static CCopasiDataModel * pCOPASIDATAMODEL
Definition: test000083.h:118
#define MCSBML
static size_t size()
static const char * MODEL_STRING19
Definition: test000083.h:110
static CCopasiMessage getLastMessage()
bool importSBMLFromString(const std::string &sbmlDocumentText, CProcessReport *pImportHandler=NULL, const bool &deleteOldData=true)
Definition: CModel.h:50
void test000083::test_import_compartment_units_2 ( )

Definition at line 72 of file test000083.cpp.

References CCopasiMessage::getLastMessage(), CCopasiDataModel::getModel(), CCopasiMessage::getNumber(), CCopasiDataModel::importSBMLFromString(), CModel::l, MCSBML, MODEL_STRING2, pCOPASIDATAMODEL, and CCopasiMessage::size().

73 {
74  CCopasiDataModel* pDataModel = pCOPASIDATAMODEL;
75  CPPUNIT_ASSERT(pDataModel->importSBMLFromString(MODEL_STRING2));
76  CModel* pModel = pDataModel->getModel();
77  CPPUNIT_ASSERT(pModel->getCompartments().size() == 1);
78  CPPUNIT_ASSERT(pModel != NULL);
79  CPPUNIT_ASSERT(pModel->getVolumeUnitEnum() == CModel::l);
80  unsigned int i = 0, iMax = CCopasiMessage::size();
81 
82  while (i < iMax)
83  {
85 
86  // make sure there is a message about the unit not being recognized by
87  // COPASI since the scale is off
88  if (message.getNumber() == MCSBML + 66)
89  {
90  break;
91  }
92 
93  ++i;
94  }
95 
96  CPPUNIT_ASSERT(i != iMax);
97 }
static const char * MODEL_STRING2
Definition: test000083.h:60
const size_t & getNumber() const
static CCopasiDataModel * pCOPASIDATAMODEL
Definition: test000083.h:118
#define MCSBML
static size_t size()
static CCopasiMessage getLastMessage()
bool importSBMLFromString(const std::string &sbmlDocumentText, CProcessReport *pImportHandler=NULL, const bool &deleteOldData=true)
Definition: CModel.h:50
void test000083::test_import_compartment_units_20 ( )

Definition at line 842 of file test000083.cpp.

References CCopasiMessage::getLastMessage(), CCopasiDataModel::getModel(), CCopasiMessage::getNumber(), CCopasiDataModel::importSBMLFromString(), CModel::l, MCSBML, MODEL_STRING20, pCOPASIDATAMODEL, and CCopasiMessage::size().

843 {
844  CCopasiDataModel* pDataModel = pCOPASIDATAMODEL;
845  CPPUNIT_ASSERT(pDataModel->importSBMLFromString(MODEL_STRING20));
846  CModel* pModel = pDataModel->getModel();
847  CPPUNIT_ASSERT(pModel->getCompartments().size() == 2);
848  CPPUNIT_ASSERT(pModel != NULL);
849  CPPUNIT_ASSERT(pModel->getVolumeUnitEnum() == CModel::l);
850  // make sure there is no warning about inconsistent units
851  unsigned int i = 0, iMax = CCopasiMessage::size();
852  unsigned int found24 = 0;
853  unsigned int found55 = 0;
854  unsigned int found79 = 0;
855 
856  while (i < iMax)
857  {
859 
860  // check for messages about inconsistent units
861  if (message.getNumber() == MCSBML + 24)
862  {
863  ++found24;
864  }
865 
866  // check for import errors
867  if (message.getNumber() == MCSBML + 55)
868  {
869  ++found55;
870  }
871 
872  // check for import errors
873  if (message.getNumber() == MCSBML + 79)
874  {
875  ++found79;
876  }
877 
878  ++i;
879  }
880 
881  CPPUNIT_ASSERT(found55 == 0);
882  CPPUNIT_ASSERT(found24 == 1);
883  CPPUNIT_ASSERT(found79 == 0);
884 }
const size_t & getNumber() const
static CCopasiDataModel * pCOPASIDATAMODEL
Definition: test000083.h:118
#define MCSBML
static size_t size()
static CCopasiMessage getLastMessage()
bool importSBMLFromString(const std::string &sbmlDocumentText, CProcessReport *pImportHandler=NULL, const bool &deleteOldData=true)
Definition: CModel.h:50
static const char * MODEL_STRING20
Definition: test000083.h:113
void test000083::test_import_compartment_units_21 ( )

Definition at line 886 of file test000083.cpp.

References CCopasiMessage::getLastMessage(), CCopasiDataModel::getModel(), CCopasiMessage::getNumber(), CCopasiDataModel::importSBMLFromString(), CModel::l, MCSBML, MODEL_STRING21, pCOPASIDATAMODEL, and CCopasiMessage::size().

887 {
888  CCopasiDataModel* pDataModel = pCOPASIDATAMODEL;
889  CPPUNIT_ASSERT(pDataModel->importSBMLFromString(MODEL_STRING21));
890  CModel* pModel = pDataModel->getModel();
891  CPPUNIT_ASSERT(pModel->getCompartments().size() == 2);
892  CPPUNIT_ASSERT(pModel != NULL);
893  CPPUNIT_ASSERT(pModel->getVolumeUnitEnum() == CModel::l);
894  // make sure there is no warning about inconsistent units
895  unsigned int i = 0, iMax = CCopasiMessage::size();
896  unsigned int found24 = 0;
897  unsigned int found55 = 0;
898  unsigned int found79 = 0;
899 
900  while (i < iMax)
901  {
903 
904  // check for messages about inconsistent units
905  if (message.getNumber() == MCSBML + 24)
906  {
907  ++found24;
908  }
909 
910  // check for import errors
911  if (message.getNumber() == MCSBML + 55)
912  {
913  ++found55;
914  }
915 
916  // check for import errors
917  if (message.getNumber() == MCSBML + 79)
918  {
919  ++found79;
920  }
921 
922  ++i;
923  }
924 
925  CPPUNIT_ASSERT(found55 == 0);
926  CPPUNIT_ASSERT(found79 == 0);
927  CPPUNIT_ASSERT(found24 == 1);
928 }
const size_t & getNumber() const
static const char * MODEL_STRING21
Definition: test000083.h:116
static CCopasiDataModel * pCOPASIDATAMODEL
Definition: test000083.h:118
#define MCSBML
static size_t size()
static CCopasiMessage getLastMessage()
bool importSBMLFromString(const std::string &sbmlDocumentText, CProcessReport *pImportHandler=NULL, const bool &deleteOldData=true)
Definition: CModel.h:50
void test000083::test_import_compartment_units_3 ( )

Definition at line 99 of file test000083.cpp.

References CCopasiMessage::getLastMessage(), CCopasiDataModel::getModel(), CCopasiMessage::getNumber(), CCopasiDataModel::importSBMLFromString(), CModel::l, MCSBML, MODEL_STRING3, pCOPASIDATAMODEL, and CCopasiMessage::size().

100 {
101  CCopasiDataModel* pDataModel = pCOPASIDATAMODEL;
102  CPPUNIT_ASSERT(pDataModel->importSBMLFromString(MODEL_STRING3));
103  CModel* pModel = pDataModel->getModel();
104  CPPUNIT_ASSERT(pModel->getCompartments().size() == 1);
105  CPPUNIT_ASSERT(pModel != NULL);
106  CPPUNIT_ASSERT(pModel->getVolumeUnitEnum() == CModel::l);
107  // make sure there is no warning about inconsistent units
108  unsigned int i = 0, iMax = CCopasiMessage::size();
109  unsigned int found24 = 0;
110  unsigned int found55 = 0;
111  unsigned int found79 = 0;
112  unsigned int found66 = 0;
113 
114  while (i < iMax)
115  {
117 
118  // check for messages about inconsistent units
119  if (message.getNumber() == MCSBML + 24)
120  {
121  ++found24;
122  }
123 
124  // check for import errors
125  if (message.getNumber() == MCSBML + 55)
126  {
127  ++found55;
128  }
129 
130  // check for import errors
131  if (message.getNumber() == MCSBML + 79)
132  {
133  ++found79;
134  }
135 
136  // check for import errors
137  if (message.getNumber() == MCSBML + 66)
138  {
139  ++found66;
140  }
141 
142  ++i;
143  }
144 
145  CPPUNIT_ASSERT(found55 == 0);
146  CPPUNIT_ASSERT(found24 == 0);
147  CPPUNIT_ASSERT(found79 == 0);
148  CPPUNIT_ASSERT(found66 == 1);
149 }
const size_t & getNumber() const
static CCopasiDataModel * pCOPASIDATAMODEL
Definition: test000083.h:118
#define MCSBML
static size_t size()
static const char * MODEL_STRING3
Definition: test000083.h:62
static CCopasiMessage getLastMessage()
bool importSBMLFromString(const std::string &sbmlDocumentText, CProcessReport *pImportHandler=NULL, const bool &deleteOldData=true)
Definition: CModel.h:50
void test000083::test_import_compartment_units_4 ( )

Definition at line 151 of file test000083.cpp.

References CCopasiMessage::getLastMessage(), CCopasiDataModel::getModel(), CCopasiMessage::getNumber(), CCopasiDataModel::importSBMLFromString(), MCSBML, CModel::ml, MODEL_STRING4, pCOPASIDATAMODEL, and CCopasiMessage::size().

152 {
153  CCopasiDataModel* pDataModel = pCOPASIDATAMODEL;
154  CPPUNIT_ASSERT(pDataModel->importSBMLFromString(MODEL_STRING4));
155  CModel* pModel = pDataModel->getModel();
156  CPPUNIT_ASSERT(pModel->getCompartments().size() == 1);
157  CPPUNIT_ASSERT(pModel != NULL);
158  CPPUNIT_ASSERT(pModel->getVolumeUnitEnum() == CModel::ml);
159  // make sure there is no warning about inconsistent units
160  unsigned int i = 0, iMax = CCopasiMessage::size();
161  unsigned int found24 = 0;
162  unsigned int found55 = 0;
163  unsigned int found79 = 0;
164 
165  while (i < iMax)
166  {
168 
169  // check for messages about inconsistent units
170  if (message.getNumber() == MCSBML + 24)
171  {
172  ++found24;
173  }
174 
175  // check for import errors
176  if (message.getNumber() == MCSBML + 55)
177  {
178  ++found55;
179  }
180 
181  // check for import errors
182  if (message.getNumber() == MCSBML + 79)
183  {
184  ++found79;
185  }
186 
187  ++i;
188  }
189 
190  CPPUNIT_ASSERT(found55 == 0);
191  CPPUNIT_ASSERT(found24 == 0);
192  CPPUNIT_ASSERT(found79 == 0);
193 }
const size_t & getNumber() const
static CCopasiDataModel * pCOPASIDATAMODEL
Definition: test000083.h:118
#define MCSBML
static size_t size()
static const char * MODEL_STRING4
Definition: test000083.h:65
static CCopasiMessage getLastMessage()
bool importSBMLFromString(const std::string &sbmlDocumentText, CProcessReport *pImportHandler=NULL, const bool &deleteOldData=true)
Definition: CModel.h:50
void test000083::test_import_compartment_units_5 ( )

Definition at line 195 of file test000083.cpp.

References CCopasiMessage::getLastMessage(), CCopasiDataModel::getModel(), CCopasiMessage::getNumber(), CCopasiDataModel::importSBMLFromString(), MCSBML, MODEL_STRING5, CModel::nl, pCOPASIDATAMODEL, and CCopasiMessage::size().

196 {
197  CCopasiDataModel* pDataModel = pCOPASIDATAMODEL;
198  CPPUNIT_ASSERT(pDataModel->importSBMLFromString(MODEL_STRING5));
199  CModel* pModel = pDataModel->getModel();
200  CPPUNIT_ASSERT(pModel->getCompartments().size() == 1);
201  CPPUNIT_ASSERT(pModel != NULL);
202  CPPUNIT_ASSERT(pModel->getVolumeUnitEnum() == CModel::nl);
203  // make sure there is no warning about inconsistent units
204  unsigned int i = 0, iMax = CCopasiMessage::size();
205  unsigned int found24 = 0;
206  unsigned int found55 = 0;
207  unsigned int found79 = 0;
208 
209  while (i < iMax)
210  {
212 
213  // check for messages about inconsistent units
214  if (message.getNumber() == MCSBML + 24)
215  {
216  ++found24;
217  }
218 
219  // check for import errors
220  if (message.getNumber() == MCSBML + 55)
221  {
222  ++found55;
223  }
224 
225  // check for import errors
226  if (message.getNumber() == MCSBML + 79)
227  {
228  ++found79;
229  }
230 
231  ++i;
232  }
233 
234  CPPUNIT_ASSERT(found55 == 0);
235  CPPUNIT_ASSERT(found24 == 0);
236  CPPUNIT_ASSERT(found79 == 1);
237 }
const size_t & getNumber() const
static CCopasiDataModel * pCOPASIDATAMODEL
Definition: test000083.h:118
#define MCSBML
static size_t size()
static CCopasiMessage getLastMessage()
bool importSBMLFromString(const std::string &sbmlDocumentText, CProcessReport *pImportHandler=NULL, const bool &deleteOldData=true)
Definition: CModel.h:50
static const char * MODEL_STRING5
Definition: test000083.h:68
void test000083::test_import_compartment_units_6 ( )

Definition at line 239 of file test000083.cpp.

References CCopasiMessage::getLastMessage(), CCopasiDataModel::getModel(), CCopasiMessage::getNumber(), CCopasiDataModel::importSBMLFromString(), MCSBML, MODEL_STRING6, CModel::nl, pCOPASIDATAMODEL, and CCopasiMessage::size().

240 {
241  CCopasiDataModel* pDataModel = pCOPASIDATAMODEL;
242  CPPUNIT_ASSERT(pDataModel->importSBMLFromString(MODEL_STRING6));
243  CModel* pModel = pDataModel->getModel();
244  CPPUNIT_ASSERT(pModel->getCompartments().size() == 1);
245  CPPUNIT_ASSERT(pModel != NULL);
246  CPPUNIT_ASSERT(pModel->getVolumeUnitEnum() == CModel::nl);
247  // make sure there is no warning about inconsistent units
248  unsigned int i = 0, iMax = CCopasiMessage::size();
249  unsigned int found24 = 0;
250  unsigned int found55 = 0;
251  unsigned int found79 = 0;
252  unsigned int found66 = 0;
253 
254  while (i < iMax)
255  {
257 
258  // check for messages about inconsistent units
259  if (message.getNumber() == MCSBML + 24)
260  {
261  ++found24;
262  }
263 
264  // check for import errors
265  if (message.getNumber() == MCSBML + 55)
266  {
267  ++found55;
268  }
269 
270  // check for import errors
271  if (message.getNumber() == MCSBML + 79)
272  {
273  ++found79;
274  }
275 
276  // check for import errors
277  if (message.getNumber() == MCSBML + 66)
278  {
279  ++found66;
280  }
281 
282  ++i;
283  }
284 
285  CPPUNIT_ASSERT(found55 == 0);
286  CPPUNIT_ASSERT(found24 == 0);
287  CPPUNIT_ASSERT(found79 == 0);
288  CPPUNIT_ASSERT(found66 == 1);
289 }
const size_t & getNumber() const
static CCopasiDataModel * pCOPASIDATAMODEL
Definition: test000083.h:118
#define MCSBML
static size_t size()
static const char * MODEL_STRING6
Definition: test000083.h:71
static CCopasiMessage getLastMessage()
bool importSBMLFromString(const std::string &sbmlDocumentText, CProcessReport *pImportHandler=NULL, const bool &deleteOldData=true)
Definition: CModel.h:50
void test000083::test_import_compartment_units_7 ( )

Definition at line 291 of file test000083.cpp.

References CCopasiMessage::getLastMessage(), CCopasiDataModel::getModel(), CCopasiMessage::getNumber(), CCopasiDataModel::importSBMLFromString(), MCSBML, MODEL_STRING7, CModel::nl, pCOPASIDATAMODEL, and CCopasiMessage::size().

292 {
293  CCopasiDataModel* pDataModel = pCOPASIDATAMODEL;
294  CPPUNIT_ASSERT(pDataModel->importSBMLFromString(MODEL_STRING7));
295  CModel* pModel = pDataModel->getModel();
296  CPPUNIT_ASSERT(pModel->getCompartments().size() == 1);
297  CPPUNIT_ASSERT(pModel != NULL);
298  CPPUNIT_ASSERT(pModel->getVolumeUnitEnum() == CModel::nl);
299  // make sure there is no warning about inconsistent units
300  unsigned int i = 0, iMax = CCopasiMessage::size();
301  unsigned int found24 = 0;
302  unsigned int found55 = 0;
303  unsigned int found79 = 0;
304 
305  while (i < iMax)
306  {
308 
309  // check for messages about inconsistent units
310  if (message.getNumber() == MCSBML + 24)
311  {
312  ++found24;
313  }
314 
315  // check for import errors
316  if (message.getNumber() == MCSBML + 55)
317  {
318  ++found55;
319  }
320 
321  // check for import errors
322  if (message.getNumber() == MCSBML + 79)
323  {
324  ++found79;
325  }
326 
327  ++i;
328  }
329 
330  CPPUNIT_ASSERT(found55 == 0);
331  CPPUNIT_ASSERT(found24 == 0);
332  CPPUNIT_ASSERT(found79 == 0);
333 }
const size_t & getNumber() const
static CCopasiDataModel * pCOPASIDATAMODEL
Definition: test000083.h:118
#define MCSBML
static size_t size()
static const char * MODEL_STRING7
Definition: test000083.h:74
static CCopasiMessage getLastMessage()
bool importSBMLFromString(const std::string &sbmlDocumentText, CProcessReport *pImportHandler=NULL, const bool &deleteOldData=true)
Definition: CModel.h:50
void test000083::test_import_compartment_units_8 ( )

Definition at line 335 of file test000083.cpp.

References CCopasiMessage::getLastMessage(), CCopasiDataModel::getModel(), CCopasiMessage::getNumber(), CCopasiDataModel::importSBMLFromString(), CModel::l, MCSBML, MODEL_STRING8, pCOPASIDATAMODEL, and CCopasiMessage::size().

336 {
337  CCopasiDataModel* pDataModel = pCOPASIDATAMODEL;
338  CPPUNIT_ASSERT(pDataModel->importSBMLFromString(MODEL_STRING8));
339  CModel* pModel = pDataModel->getModel();
340  CPPUNIT_ASSERT(pModel->getCompartments().size() == 1);
341  CPPUNIT_ASSERT(pModel != NULL);
342  CPPUNIT_ASSERT(pModel->getVolumeUnitEnum() == CModel::l);
343  // make sure there is no warning about inconsistent units
344  unsigned int i = 0, iMax = CCopasiMessage::size();
345  unsigned int found24 = 0;
346  unsigned int found55 = 0;
347  unsigned int found79 = 0;
348 
349  while (i < iMax)
350  {
352 
353  // check for messages about inconsistent units
354  if (message.getNumber() == MCSBML + 24)
355  {
356  ++found24;
357  }
358 
359  // check for import errors
360  if (message.getNumber() == MCSBML + 55)
361  {
362  ++found55;
363  }
364 
365  // check for import errors
366  if (message.getNumber() == MCSBML + 79)
367  {
368  ++found79;
369  }
370 
371  ++i;
372  }
373 
374  CPPUNIT_ASSERT(found55 == 0);
375  CPPUNIT_ASSERT(found24 == 0);
376  CPPUNIT_ASSERT(found79 == 0);
377 }
const size_t & getNumber() const
static const char * MODEL_STRING8
Definition: test000083.h:77
static CCopasiDataModel * pCOPASIDATAMODEL
Definition: test000083.h:118
#define MCSBML
static size_t size()
static CCopasiMessage getLastMessage()
bool importSBMLFromString(const std::string &sbmlDocumentText, CProcessReport *pImportHandler=NULL, const bool &deleteOldData=true)
Definition: CModel.h:50
void test000083::test_import_compartment_units_9 ( )

Definition at line 379 of file test000083.cpp.

References CCopasiMessage::getLastMessage(), CCopasiDataModel::getModel(), CCopasiMessage::getNumber(), CCopasiDataModel::importSBMLFromString(), CModel::l, MCSBML, MODEL_STRING9, pCOPASIDATAMODEL, and CCopasiMessage::size().

380 {
381  CCopasiDataModel* pDataModel = pCOPASIDATAMODEL;
382  CPPUNIT_ASSERT(pDataModel->importSBMLFromString(MODEL_STRING9));
383  CModel* pModel = pDataModel->getModel();
384  CPPUNIT_ASSERT(pModel->getCompartments().size() == 1);
385  CPPUNIT_ASSERT(pModel != NULL);
386  CPPUNIT_ASSERT(pModel->getVolumeUnitEnum() == CModel::l);
387  // make sure there is no warning about inconsistent units
388  unsigned int i = 0, iMax = CCopasiMessage::size();
389  unsigned int found24 = 0;
390  unsigned int found55 = 0;
391  unsigned int found79 = 0;
392 
393  while (i < iMax)
394  {
396 
397  // check for messages about inconsistent units
398  if (message.getNumber() == MCSBML + 24)
399  {
400  ++found24;
401  }
402 
403  // check for import errors
404  if (message.getNumber() == MCSBML + 55)
405  {
406  ++found55;
407  }
408 
409  // check for import errors
410  if (message.getNumber() == MCSBML + 79)
411  {
412  ++found79;
413  }
414 
415  ++i;
416  }
417 
418  CPPUNIT_ASSERT(found55 == 0);
419  CPPUNIT_ASSERT(found24 == 0);
420  CPPUNIT_ASSERT(found79 == 0);
421 }
const size_t & getNumber() const
static CCopasiDataModel * pCOPASIDATAMODEL
Definition: test000083.h:118
#define MCSBML
static size_t size()
static const char * MODEL_STRING9
Definition: test000083.h:80
static CCopasiMessage getLastMessage()
bool importSBMLFromString(const std::string &sbmlDocumentText, CProcessReport *pImportHandler=NULL, const bool &deleteOldData=true)
Definition: CModel.h:50

Member Data Documentation

const char * test000083::MODEL_STRING1
staticprotected
Initial value:
=
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
"<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
" <model id=\"Model_1\" name=\"New Model\">"
" <notes>"
" <body xmlns=\"http://www.w3.org/1999/xhtml\">"
" <p>L2V1 model with global volume unit nl.</p>"
" </body>"
" </notes>"
" <listOfUnitDefinitions>"
" <unitDefinition id=\"volume\">"
" <listOfUnits>"
" <unit kind=\"litre\" scale=\"-9\"/>"
" </listOfUnits>"
" </unitDefinition>"
" </listOfUnitDefinitions>"
" <listOfCompartments>"
" <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\"/>"
" </listOfCompartments>"
" </model>"
"</sbml>"

Definition at line 58 of file test000083.h.

Referenced by test_import_compartment_units_1().

const char * test000083::MODEL_STRING10
staticprotected
Initial value:
=
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
"<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
" <model id=\"Model_1\" name=\"New Model\">"
" <notes>"
" <body xmlns=\"http://www.w3.org/1999/xhtml\">"
" <p>L2V1 model with no global volume unit</p>"
" <p>and a compartment with no units.</p>"
" </body>"
" </notes>"
" <listOfCompartments>"
" <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" />"
" </listOfCompartments>"
" </model>"
"</sbml>"

Definition at line 83 of file test000083.h.

Referenced by test_import_compartment_units_10().

const char * test000083::MODEL_STRING11
staticprotected
Initial value:
=
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
"<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
" <model id=\"Model_1\" name=\"New Model\">"
" <notes>"
" <body xmlns=\"http://www.w3.org/1999/xhtml\">"
" <p>L2V1 model with no global volume unit</p>"
" <p>and a 3D compartment with area units.</p>"
" </body>"
" </notes>"
" <listOfCompartments>"
" <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" units=\"area\"/>"
" </listOfCompartments>"
" </model>"
"</sbml>"

Definition at line 86 of file test000083.h.

Referenced by test_import_compartment_units_11().

const char * test000083::MODEL_STRING12
staticprotected
Initial value:
=
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
"<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
" <model id=\"Model_1\" name=\"New Model\">"
" <notes>"
" <body xmlns=\"http://www.w3.org/1999/xhtml\">"
" <p>L2V1 model with no global volume unit</p>"
" <p>and a 3D compartment with length units.</p>"
" </body>"
" </notes>"
" <listOfCompartments>"
" <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" units=\"length\"/>"
" </listOfCompartments>"
" </model>"
"</sbml>"

Definition at line 89 of file test000083.h.

Referenced by test_import_compartment_units_12().

const char * test000083::MODEL_STRING13
staticprotected
Initial value:
=
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
"<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
" <model id=\"Model_1\" name=\"New Model\">"
" <notes>"
" <body xmlns=\"http://www.w3.org/1999/xhtml\">"
" <p>L2V1 model with no global volume unit</p>"
" <p>and a 3D compartment with dimensionless units.</p>"
" </body>"
" </notes>"
" <listOfCompartments>"
" <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" units=\"dimensionless\"/>"
" </listOfCompartments>"
" </model>"
"</sbml>"

Definition at line 92 of file test000083.h.

Referenced by test_import_compartment_units_13().

const char * test000083::MODEL_STRING14
staticprotected
Initial value:
=
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
"<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
" <model id=\"Model_1\" name=\"New Model\">"
" <notes>"
" <body xmlns=\"http://www.w3.org/1999/xhtml\">"
" <p>L2V1 model with no global volume unit</p>"
" <p>and a 3D compartment with m^2 units.</p>"
" </body>"
" </notes>"
" <listOfUnitDefinitions>"
" <unitDefinition id=\"my_volume\">"
" <listOfUnits>"
" <unit kind=\"metre\" scale=\"0\" exponent=\"2\" />"
" </listOfUnits>"
" </unitDefinition>"
" </listOfUnitDefinitions>"
" <listOfCompartments>"
" <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" units=\"my_volume\"/>"
" </listOfCompartments>"
" </model>"
"</sbml>"

Definition at line 95 of file test000083.h.

Referenced by test_import_compartment_units_14().

const char * test000083::MODEL_STRING15
staticprotected
Initial value:
=
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
"<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
" <model id=\"Model_1\" name=\"New Model\">"
" <notes>"
" <body xmlns=\"http://www.w3.org/1999/xhtml\">"
" <p>L2V1 model with no global volume unit</p>"
" <p>and a 3D compartment with m units.</p>"
" </body>"
" </notes>"
" <listOfUnitDefinitions>"
" <unitDefinition id=\"my_volume\">"
" <listOfUnits>"
" <unit kind=\"metre\" scale=\"0\" />"
" </listOfUnits>"
" </unitDefinition>"
" </listOfUnitDefinitions>"
" <listOfCompartments>"
" <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" units=\"my_volume\"/>"
" </listOfCompartments>"
" </model>"
"</sbml>"

Definition at line 98 of file test000083.h.

Referenced by test_import_compartment_units_15().

const char * test000083::MODEL_STRING16
staticprotected
Initial value:
=
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
"<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
" <model id=\"Model_1\" name=\"New Model\">"
" <notes>"
" <body xmlns=\"http://www.w3.org/1999/xhtml\">"
" <p>L2V1 model with no global volume unit</p>"
" <p>and a 3D compartment with mole units.</p>"
" </body>"
" </notes>"
" <listOfUnitDefinitions>"
" <unitDefinition id=\"my_volume\">"
" <listOfUnits>"
" <unit kind=\"mole\" scale=\"0\" />"
" </listOfUnits>"
" </unitDefinition>"
" </listOfUnitDefinitions>"
" <listOfCompartments>"
" <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" units=\"my_volume\"/>"
" </listOfCompartments>"
" </model>"
"</sbml>"

Definition at line 101 of file test000083.h.

Referenced by test_import_compartment_units_16().

const char * test000083::MODEL_STRING17
staticprotected
Initial value:
=
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
"<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
" <model id=\"Model_1\" name=\"New Model\">"
" <notes>"
" <body xmlns=\"http://www.w3.org/1999/xhtml\">"
" <p>L2V1 model with no global volume unit</p>"
" <p>and a 3D compartment with substance units.</p>"
" </body>"
" </notes>"
" <listOfCompartments>"
" <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" units=\"substance\"/>"
" </listOfCompartments>"
" </model>"
"</sbml>"

Definition at line 104 of file test000083.h.

Referenced by test_import_compartment_units_17().

const char * test000083::MODEL_STRING18
staticprotected
Initial value:
=
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
"<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
" <model id=\"Model_1\" name=\"New Model\">"
" <notes>"
" <body xmlns=\"http://www.w3.org/1999/xhtml\">"
" <p>L2V1 model with no global volume unit</p>"
" <p>and two compartments. One has no unit, the other uses volume as the unit.</p>"
" </body>"
" </notes>"
" <listOfCompartments>"
" <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" />"
" <compartment id=\"compartment_2\" name=\"compartment_2\" size=\"1\" units=\"volume\"/>"
" </listOfCompartments>"
" </model>"
"</sbml>"

Definition at line 107 of file test000083.h.

Referenced by test_import_compartment_units_18().

const char * test000083::MODEL_STRING19
staticprotected
Initial value:
=
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
"<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
" <model id=\"Model_1\" name=\"New Model\">"
" <notes>"
" <body xmlns=\"http://www.w3.org/1999/xhtml\">"
" <p>L2V1 model with no global volume unit</p>"
" <p>and two compartments. One has no unit, the other uses litre as the unit.</p>"
" </body>"
" </notes>"
" <listOfCompartments>"
" <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" />"
" <compartment id=\"compartment_2\" name=\"compartment_2\" size=\"1\" units=\"litre\"/>"
" </listOfCompartments>"
" </model>"
"</sbml>"

Definition at line 110 of file test000083.h.

Referenced by test_import_compartment_units_19().

const char * test000083::MODEL_STRING2
staticprotected
Initial value:
=
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
"<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
" <model id=\"Model_1\" name=\"New Model\">"
" <notes>"
" <body xmlns=\"http://www.w3.org/1999/xhtml\">"
" <p>L2V1 model with global volume unit 10e-4* l.</p>"
" </body>"
" </notes>"
" <listOfUnitDefinitions>"
" <unitDefinition id=\"volume\">"
" <listOfUnits>"
" <unit kind=\"litre\" scale=\"-4\"/>"
" </listOfUnits>"
" </unitDefinition>"
" </listOfUnitDefinitions>"
" <listOfCompartments>"
" <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\"/>"
" </listOfCompartments>"
" </model>"
"</sbml>"

Definition at line 60 of file test000083.h.

Referenced by test_import_compartment_units_2().

const char * test000083::MODEL_STRING20
staticprotected
Initial value:
=
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
"<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
" <model id=\"Model_1\" name=\"New Model\">"
" <notes>"
" <body xmlns=\"http://www.w3.org/1999/xhtml\">"
" <p>L2V1 model with no global volume unit</p>"
" <p>and two compartments. One has no unit, the other uses nl as the unit.</p>"
" </body>"
" </notes>"
" <listOfUnitDefinitions>"
" <unitDefinition id=\"my_volume\">"
" <listOfUnits>"
" <unit kind=\"litre\" scale=\"-9\" />"
" </listOfUnits>"
" </unitDefinition>"
" </listOfUnitDefinitions>"
" <listOfCompartments>"
" <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" />"
" <compartment id=\"compartment_2\" name=\"compartment_2\" size=\"1\" units=\"my_volume\"/>"
" </listOfCompartments>"
" </model>"
"</sbml>"

Definition at line 113 of file test000083.h.

Referenced by test_import_compartment_units_20().

const char * test000083::MODEL_STRING21
staticprotected
Initial value:
=
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
"<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
" <model id=\"Model_1\" name=\"New Model\">"
" <notes>"
" <body xmlns=\"http://www.w3.org/1999/xhtml\">"
" <p>L2V1 model with no global volume unit</p>"
" <p>and two compartments. One has nl as the unit, the other one has no unit.</p>"
" </body>"
" </notes>"
" <listOfUnitDefinitions>"
" <unitDefinition id=\"my_volume\">"
" <listOfUnits>"
" <unit kind=\"litre\" scale=\"-9\" />"
" </listOfUnits>"
" </unitDefinition>"
" </listOfUnitDefinitions>"
" <listOfCompartments>"
" <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" units=\"my_volume\"/>"
" <compartment id=\"compartment_2\" name=\"compartment_2\" size=\"1\" />"
" </listOfCompartments>"
" </model>"
"</sbml>"

Definition at line 116 of file test000083.h.

Referenced by test_import_compartment_units_21().

const char * test000083::MODEL_STRING3
staticprotected
Initial value:
=
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
"<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
" <model id=\"Model_1\" name=\"New Model\">"
" <notes>"
" <body xmlns=\"http://www.w3.org/1999/xhtml\">"
" <p>L2V1 model with global volume unit mole.</p>"
" </body>"
" </notes>"
" <listOfUnitDefinitions>"
" <unitDefinition id=\"volume\">"
" <listOfUnits>"
" <unit kind=\"mole\" scale=\"0\"/>"
" </listOfUnits>"
" </unitDefinition>"
" </listOfUnitDefinitions>"
" <listOfCompartments>"
" <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\"/>"
" </listOfCompartments>"
" </model>"
"</sbml>"

Definition at line 62 of file test000083.h.

Referenced by test_import_compartment_units_3().

const char * test000083::MODEL_STRING4
staticprotected
Initial value:
=
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
"<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
" <model id=\"Model_1\" name=\"New Model\">"
" <notes>"
" <body xmlns=\"http://www.w3.org/1999/xhtml\">"
" <p>L2V1 model with global volume unit nl</p>"
" <p> and a compartment with ml units</p>"
" </body>"
" </notes>"
" <listOfUnitDefinitions>"
" <unitDefinition id=\"volume\">"
" <listOfUnits>"
" <unit kind=\"litre\" scale=\"-9\"/>"
" </listOfUnits>"
" </unitDefinition>"
" <unitDefinition id=\"my_volume\">"
" <listOfUnits>"
" <unit kind=\"litre\" scale=\"-3\"/>"
" </listOfUnits>"
" </unitDefinition>"
" </listOfUnitDefinitions>"
" <listOfCompartments>"
" <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" units=\"my_volume\"/>"
" </listOfCompartments>"
" </model>"
"</sbml>"

Definition at line 65 of file test000083.h.

Referenced by test_import_compartment_units_4().

const char * test000083::MODEL_STRING5
staticprotected
Initial value:
=
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
"<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
" <model id=\"Model_1\" name=\"New Model\">"
" <notes>"
" <body xmlns=\"http://www.w3.org/1999/xhtml\">"
" <p>L2V1 model with global volume unit nl</p>"
" <p>and a compartment with mole units.</p>"
" </body>"
" </notes>"
" <listOfUnitDefinitions>"
" <unitDefinition id=\"volume\">"
" <listOfUnits>"
" <unit kind=\"litre\" scale=\"-9\"/>"
" </listOfUnits>"
" </unitDefinition>"
" <unitDefinition id=\"my_volume\">"
" <listOfUnits>"
" <unit kind=\"mole\" scale=\"0\"/>"
" </listOfUnits>"
" </unitDefinition>"
" </listOfUnitDefinitions>"
" <listOfCompartments>"
" <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" units=\"my_volume\"/>"
" </listOfCompartments>"
" </model>"
"</sbml>"

Definition at line 68 of file test000083.h.

Referenced by test_import_compartment_units_5().

const char * test000083::MODEL_STRING6
staticprotected
Initial value:
=
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
"<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
" <model id=\"Model_1\" name=\"New Model\">"
" <notes>"
" <body xmlns=\"http://www.w3.org/1999/xhtml\">"
" <p>L2V1 model with global volume unit mole</p>"
" <p>and a compartment with nl units.</p>"
" </body>"
" </notes>"
" <listOfUnitDefinitions>"
" <unitDefinition id=\"my_volume\">"
" <listOfUnits>"
" <unit kind=\"litre\" scale=\"-9\"/>"
" </listOfUnits>"
" </unitDefinition>"
" <unitDefinition id=\"volume\">"
" <listOfUnits>"
" <unit kind=\"mole\" scale=\"0\"/>"
" </listOfUnits>"
" </unitDefinition>"
" </listOfUnitDefinitions>"
" <listOfCompartments>"
" <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" units=\"my_volume\"/>"
" </listOfCompartments>"
" </model>"
"</sbml>"

Definition at line 71 of file test000083.h.

Referenced by test_import_compartment_units_6().

const char * test000083::MODEL_STRING7
staticprotected
Initial value:
=
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
"<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
" <model id=\"Model_1\" name=\"New Model\">"
" <notes>"
" <body xmlns=\"http://www.w3.org/1999/xhtml\">"
" <p>L2V1 model with no global volume unit</p>"
" <p>and a compartment with nl units.</p>"
" </body>"
" </notes>"
" <listOfUnitDefinitions>"
" <unitDefinition id=\"my_volume\">"
" <listOfUnits>"
" <unit kind=\"litre\" scale=\"-9\"/>"
" </listOfUnits>"
" </unitDefinition>"
" </listOfUnitDefinitions>"
" <listOfCompartments>"
" <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" units=\"my_volume\"/>"
" </listOfCompartments>"
" </model>"
"</sbml>"

Definition at line 74 of file test000083.h.

Referenced by test_import_compartment_units_7().

const char * test000083::MODEL_STRING8
staticprotected
Initial value:
=
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
"<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
" <model id=\"Model_1\" name=\"New Model\">"
" <notes>"
" <body xmlns=\"http://www.w3.org/1999/xhtml\">"
" <p>L2V1 model with no global volume unit</p>"
" <p>and a compartment with volume units.</p>"
" </body>"
" </notes>"
" <listOfCompartments>"
" <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" units=\"volume\"/>"
" </listOfCompartments>"
" </model>"
"</sbml>"

Definition at line 77 of file test000083.h.

Referenced by test_import_compartment_units_8().

const char * test000083::MODEL_STRING9
staticprotected
Initial value:
=
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
"<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
" <model id=\"Model_1\" name=\"New Model\">"
" <notes>"
" <body xmlns=\"http://www.w3.org/1999/xhtml\">"
" <p>L2V1 model with no global volume unit</p>"
" <p>and a compartment with litre units.</p>"
" </body>"
" </notes>"
" <listOfCompartments>"
" <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" units=\"litre\"/>"
" </listOfCompartments>"
" </model>"
"</sbml>"

Definition at line 80 of file test000083.h.

Referenced by test_import_compartment_units_9().

CCopasiDataModel * test000083::pCOPASIDATAMODEL = NULL
staticprotected

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