COPASI API  4.16.103
test000083.cpp
Go to the documentation of this file.
1 // Begin CVS Header
2 // $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/sbml/unittests/test000083.cpp,v $
3 // $Revision: 1.3 $
4 // $Name: $
5 // $Author: gauges $
6 // $Date: 2010/03/11 11:55:16 $
7 // End CVS Header
8 
9 // Copyright (C) 2010 by Pedro Mendes, Virginia Tech Intellectual
10 // Properties, Inc., University of Heidelberg, and The University
11 // of Manchester.
12 // All rights reserved.
13 
14 // Copyright (C) 2008 by Pedro Mendes, Virginia Tech Intellectual
15 // Properties, Inc., EML Research, gGmbH, University of Heidelberg,
16 // and The University of Manchester.
17 // All rights reserved.
18 
19 #include "test000083.h"
20 
21 #include <sstream>
22 #include "utilities.hpp"
25 #include "copasi/model/CModel.h"
26 
27 #include "sbml/SBMLDocument.h"
28 #include "sbml/Model.h"
29 #include "sbml/Compartment.h"
30 #include "sbml/UnitDefinition.h"
31 #include "sbml/Unit.h"
32 #include "sbml/UnitKind.h"
33 
34 CCopasiDataModel* test000083::pCOPASIDATAMODEL = NULL;
35 
37 {
38  // Create the root container.
39  CCopasiRootContainer::init(0, NULL, false);
40  // Create the global data model.
42 }
43 
45 {
47 }
48 
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 }
71 
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 }
98 
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 }
150 
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 }
194 
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 }
238 
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 }
290 
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 }
334 
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 }
378 
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 }
422 
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 }
466 
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 }
510 
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 }
554 
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 }
577 
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 }
621 
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 }
665 
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 }
709 
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 }
753 
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 }
797 
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 }
841 
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 }
885 
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 }
929 
930 const char* test000083::MODEL_STRING1 =
931  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
932  "<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
933  " <model id=\"Model_1\" name=\"New Model\">"
934  " <notes>"
935  " <body xmlns=\"http://www.w3.org/1999/xhtml\">"
936  " <p>L2V1 model with global volume unit nl.</p>"
937  " </body>"
938  " </notes>"
939  " <listOfUnitDefinitions>"
940  " <unitDefinition id=\"volume\">"
941  " <listOfUnits>"
942  " <unit kind=\"litre\" scale=\"-9\"/>"
943  " </listOfUnits>"
944  " </unitDefinition>"
945  " </listOfUnitDefinitions>"
946  " <listOfCompartments>"
947  " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\"/>"
948  " </listOfCompartments>"
949  " </model>"
950  "</sbml>"
951  ;
952 
953 const char* test000083::MODEL_STRING2 =
954  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
955  "<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
956  " <model id=\"Model_1\" name=\"New Model\">"
957  " <notes>"
958  " <body xmlns=\"http://www.w3.org/1999/xhtml\">"
959  " <p>L2V1 model with global volume unit 10e-4* l.</p>"
960  " </body>"
961  " </notes>"
962  " <listOfUnitDefinitions>"
963  " <unitDefinition id=\"volume\">"
964  " <listOfUnits>"
965  " <unit kind=\"litre\" scale=\"-4\"/>"
966  " </listOfUnits>"
967  " </unitDefinition>"
968  " </listOfUnitDefinitions>"
969  " <listOfCompartments>"
970  " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\"/>"
971  " </listOfCompartments>"
972  " </model>"
973  "</sbml>"
974  ;
975 
976 const char* test000083::MODEL_STRING3 =
977  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
978  "<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
979  " <model id=\"Model_1\" name=\"New Model\">"
980  " <notes>"
981  " <body xmlns=\"http://www.w3.org/1999/xhtml\">"
982  " <p>L2V1 model with global volume unit mole.</p>"
983  " </body>"
984  " </notes>"
985  " <listOfUnitDefinitions>"
986  " <unitDefinition id=\"volume\">"
987  " <listOfUnits>"
988  " <unit kind=\"mole\" scale=\"0\"/>"
989  " </listOfUnits>"
990  " </unitDefinition>"
991  " </listOfUnitDefinitions>"
992  " <listOfCompartments>"
993  " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\"/>"
994  " </listOfCompartments>"
995  " </model>"
996  "</sbml>"
997  ;
998 
999 const char* test000083::MODEL_STRING4 =
1000  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
1001  "<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
1002  " <model id=\"Model_1\" name=\"New Model\">"
1003  " <notes>"
1004  " <body xmlns=\"http://www.w3.org/1999/xhtml\">"
1005  " <p>L2V1 model with global volume unit nl</p>"
1006  " <p> and a compartment with ml units</p>"
1007  " </body>"
1008  " </notes>"
1009  " <listOfUnitDefinitions>"
1010  " <unitDefinition id=\"volume\">"
1011  " <listOfUnits>"
1012  " <unit kind=\"litre\" scale=\"-9\"/>"
1013  " </listOfUnits>"
1014  " </unitDefinition>"
1015  " <unitDefinition id=\"my_volume\">"
1016  " <listOfUnits>"
1017  " <unit kind=\"litre\" scale=\"-3\"/>"
1018  " </listOfUnits>"
1019  " </unitDefinition>"
1020  " </listOfUnitDefinitions>"
1021  " <listOfCompartments>"
1022  " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" units=\"my_volume\"/>"
1023  " </listOfCompartments>"
1024  " </model>"
1025  "</sbml>"
1026  ;
1027 
1028 const char* test000083::MODEL_STRING5 =
1029  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
1030  "<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
1031  " <model id=\"Model_1\" name=\"New Model\">"
1032  " <notes>"
1033  " <body xmlns=\"http://www.w3.org/1999/xhtml\">"
1034  " <p>L2V1 model with global volume unit nl</p>"
1035  " <p>and a compartment with mole units.</p>"
1036  " </body>"
1037  " </notes>"
1038  " <listOfUnitDefinitions>"
1039  " <unitDefinition id=\"volume\">"
1040  " <listOfUnits>"
1041  " <unit kind=\"litre\" scale=\"-9\"/>"
1042  " </listOfUnits>"
1043  " </unitDefinition>"
1044  " <unitDefinition id=\"my_volume\">"
1045  " <listOfUnits>"
1046  " <unit kind=\"mole\" scale=\"0\"/>"
1047  " </listOfUnits>"
1048  " </unitDefinition>"
1049  " </listOfUnitDefinitions>"
1050  " <listOfCompartments>"
1051  " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" units=\"my_volume\"/>"
1052  " </listOfCompartments>"
1053  " </model>"
1054  "</sbml>"
1055  ;
1056 
1057 const char* test000083::MODEL_STRING6 =
1058  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
1059  "<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
1060  " <model id=\"Model_1\" name=\"New Model\">"
1061  " <notes>"
1062  " <body xmlns=\"http://www.w3.org/1999/xhtml\">"
1063  " <p>L2V1 model with global volume unit mole</p>"
1064  " <p>and a compartment with nl units.</p>"
1065  " </body>"
1066  " </notes>"
1067  " <listOfUnitDefinitions>"
1068  " <unitDefinition id=\"my_volume\">"
1069  " <listOfUnits>"
1070  " <unit kind=\"litre\" scale=\"-9\"/>"
1071  " </listOfUnits>"
1072  " </unitDefinition>"
1073  " <unitDefinition id=\"volume\">"
1074  " <listOfUnits>"
1075  " <unit kind=\"mole\" scale=\"0\"/>"
1076  " </listOfUnits>"
1077  " </unitDefinition>"
1078  " </listOfUnitDefinitions>"
1079  " <listOfCompartments>"
1080  " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" units=\"my_volume\"/>"
1081  " </listOfCompartments>"
1082  " </model>"
1083  "</sbml>"
1084  ;
1085 
1086 const char* test000083::MODEL_STRING7 =
1087  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
1088  "<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
1089  " <model id=\"Model_1\" name=\"New Model\">"
1090  " <notes>"
1091  " <body xmlns=\"http://www.w3.org/1999/xhtml\">"
1092  " <p>L2V1 model with no global volume unit</p>"
1093  " <p>and a compartment with nl units.</p>"
1094  " </body>"
1095  " </notes>"
1096  " <listOfUnitDefinitions>"
1097  " <unitDefinition id=\"my_volume\">"
1098  " <listOfUnits>"
1099  " <unit kind=\"litre\" scale=\"-9\"/>"
1100  " </listOfUnits>"
1101  " </unitDefinition>"
1102  " </listOfUnitDefinitions>"
1103  " <listOfCompartments>"
1104  " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" units=\"my_volume\"/>"
1105  " </listOfCompartments>"
1106  " </model>"
1107  "</sbml>"
1108  ;
1109 
1110 const char* test000083::MODEL_STRING8 =
1111  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
1112  "<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
1113  " <model id=\"Model_1\" name=\"New Model\">"
1114  " <notes>"
1115  " <body xmlns=\"http://www.w3.org/1999/xhtml\">"
1116  " <p>L2V1 model with no global volume unit</p>"
1117  " <p>and a compartment with volume units.</p>"
1118  " </body>"
1119  " </notes>"
1120  " <listOfCompartments>"
1121  " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" units=\"volume\"/>"
1122  " </listOfCompartments>"
1123  " </model>"
1124  "</sbml>"
1125  ;
1126 
1127 const char* test000083::MODEL_STRING9 =
1128  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
1129  "<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
1130  " <model id=\"Model_1\" name=\"New Model\">"
1131  " <notes>"
1132  " <body xmlns=\"http://www.w3.org/1999/xhtml\">"
1133  " <p>L2V1 model with no global volume unit</p>"
1134  " <p>and a compartment with litre units.</p>"
1135  " </body>"
1136  " </notes>"
1137  " <listOfCompartments>"
1138  " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" units=\"litre\"/>"
1139  " </listOfCompartments>"
1140  " </model>"
1141  "</sbml>"
1142  ;
1143 
1144 const char* test000083::MODEL_STRING10 =
1145  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
1146  "<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
1147  " <model id=\"Model_1\" name=\"New Model\">"
1148  " <notes>"
1149  " <body xmlns=\"http://www.w3.org/1999/xhtml\">"
1150  " <p>L2V1 model with no global volume unit</p>"
1151  " <p>and a compartment with no units.</p>"
1152  " </body>"
1153  " </notes>"
1154  " <listOfCompartments>"
1155  " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" />"
1156  " </listOfCompartments>"
1157  " </model>"
1158  "</sbml>"
1159  ;
1160 
1161 const char* test000083::MODEL_STRING11 =
1162  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
1163  "<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
1164  " <model id=\"Model_1\" name=\"New Model\">"
1165  " <notes>"
1166  " <body xmlns=\"http://www.w3.org/1999/xhtml\">"
1167  " <p>L2V1 model with no global volume unit</p>"
1168  " <p>and a 3D compartment with area units.</p>"
1169  " </body>"
1170  " </notes>"
1171  " <listOfCompartments>"
1172  " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" units=\"area\"/>"
1173  " </listOfCompartments>"
1174  " </model>"
1175  "</sbml>"
1176  ;
1177 
1178 const char* test000083::MODEL_STRING12 =
1179  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
1180  "<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
1181  " <model id=\"Model_1\" name=\"New Model\">"
1182  " <notes>"
1183  " <body xmlns=\"http://www.w3.org/1999/xhtml\">"
1184  " <p>L2V1 model with no global volume unit</p>"
1185  " <p>and a 3D compartment with length units.</p>"
1186  " </body>"
1187  " </notes>"
1188  " <listOfCompartments>"
1189  " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" units=\"length\"/>"
1190  " </listOfCompartments>"
1191  " </model>"
1192  "</sbml>"
1193  ;
1194 
1195 const char* test000083::MODEL_STRING13 =
1196  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
1197  "<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
1198  " <model id=\"Model_1\" name=\"New Model\">"
1199  " <notes>"
1200  " <body xmlns=\"http://www.w3.org/1999/xhtml\">"
1201  " <p>L2V1 model with no global volume unit</p>"
1202  " <p>and a 3D compartment with dimensionless units.</p>"
1203  " </body>"
1204  " </notes>"
1205  " <listOfCompartments>"
1206  " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" units=\"dimensionless\"/>"
1207  " </listOfCompartments>"
1208  " </model>"
1209  "</sbml>"
1210  ;
1211 
1212 const char* test000083::MODEL_STRING14 =
1213  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
1214  "<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
1215  " <model id=\"Model_1\" name=\"New Model\">"
1216  " <notes>"
1217  " <body xmlns=\"http://www.w3.org/1999/xhtml\">"
1218  " <p>L2V1 model with no global volume unit</p>"
1219  " <p>and a 3D compartment with m^2 units.</p>"
1220  " </body>"
1221  " </notes>"
1222  " <listOfUnitDefinitions>"
1223  " <unitDefinition id=\"my_volume\">"
1224  " <listOfUnits>"
1225  " <unit kind=\"metre\" scale=\"0\" exponent=\"2\" />"
1226  " </listOfUnits>"
1227  " </unitDefinition>"
1228  " </listOfUnitDefinitions>"
1229  " <listOfCompartments>"
1230  " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" units=\"my_volume\"/>"
1231  " </listOfCompartments>"
1232  " </model>"
1233  "</sbml>"
1234  ;
1235 
1236 const char* test000083::MODEL_STRING15 =
1237  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
1238  "<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
1239  " <model id=\"Model_1\" name=\"New Model\">"
1240  " <notes>"
1241  " <body xmlns=\"http://www.w3.org/1999/xhtml\">"
1242  " <p>L2V1 model with no global volume unit</p>"
1243  " <p>and a 3D compartment with m units.</p>"
1244  " </body>"
1245  " </notes>"
1246  " <listOfUnitDefinitions>"
1247  " <unitDefinition id=\"my_volume\">"
1248  " <listOfUnits>"
1249  " <unit kind=\"metre\" scale=\"0\" />"
1250  " </listOfUnits>"
1251  " </unitDefinition>"
1252  " </listOfUnitDefinitions>"
1253  " <listOfCompartments>"
1254  " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" units=\"my_volume\"/>"
1255  " </listOfCompartments>"
1256  " </model>"
1257  "</sbml>"
1258  ;
1259 
1260 const char* test000083::MODEL_STRING16 =
1261  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
1262  "<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
1263  " <model id=\"Model_1\" name=\"New Model\">"
1264  " <notes>"
1265  " <body xmlns=\"http://www.w3.org/1999/xhtml\">"
1266  " <p>L2V1 model with no global volume unit</p>"
1267  " <p>and a 3D compartment with mole units.</p>"
1268  " </body>"
1269  " </notes>"
1270  " <listOfUnitDefinitions>"
1271  " <unitDefinition id=\"my_volume\">"
1272  " <listOfUnits>"
1273  " <unit kind=\"mole\" scale=\"0\" />"
1274  " </listOfUnits>"
1275  " </unitDefinition>"
1276  " </listOfUnitDefinitions>"
1277  " <listOfCompartments>"
1278  " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" units=\"my_volume\"/>"
1279  " </listOfCompartments>"
1280  " </model>"
1281  "</sbml>"
1282  ;
1283 
1284 const char* test000083::MODEL_STRING17 =
1285  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
1286  "<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
1287  " <model id=\"Model_1\" name=\"New Model\">"
1288  " <notes>"
1289  " <body xmlns=\"http://www.w3.org/1999/xhtml\">"
1290  " <p>L2V1 model with no global volume unit</p>"
1291  " <p>and a 3D compartment with substance units.</p>"
1292  " </body>"
1293  " </notes>"
1294  " <listOfCompartments>"
1295  " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" units=\"substance\"/>"
1296  " </listOfCompartments>"
1297  " </model>"
1298  "</sbml>"
1299  ;
1300 
1301 const char* test000083::MODEL_STRING18 =
1302  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
1303  "<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
1304  " <model id=\"Model_1\" name=\"New Model\">"
1305  " <notes>"
1306  " <body xmlns=\"http://www.w3.org/1999/xhtml\">"
1307  " <p>L2V1 model with no global volume unit</p>"
1308  " <p>and two compartments. One has no unit, the other uses volume as the unit.</p>"
1309  " </body>"
1310  " </notes>"
1311  " <listOfCompartments>"
1312  " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" />"
1313  " <compartment id=\"compartment_2\" name=\"compartment_2\" size=\"1\" units=\"volume\"/>"
1314  " </listOfCompartments>"
1315  " </model>"
1316  "</sbml>"
1317  ;
1318 
1319 const char* test000083::MODEL_STRING19 =
1320  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
1321  "<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
1322  " <model id=\"Model_1\" name=\"New Model\">"
1323  " <notes>"
1324  " <body xmlns=\"http://www.w3.org/1999/xhtml\">"
1325  " <p>L2V1 model with no global volume unit</p>"
1326  " <p>and two compartments. One has no unit, the other uses litre as the unit.</p>"
1327  " </body>"
1328  " </notes>"
1329  " <listOfCompartments>"
1330  " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" />"
1331  " <compartment id=\"compartment_2\" name=\"compartment_2\" size=\"1\" units=\"litre\"/>"
1332  " </listOfCompartments>"
1333  " </model>"
1334  "</sbml>"
1335  ;
1336 
1337 const char* test000083::MODEL_STRING20 =
1338  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
1339  "<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
1340  " <model id=\"Model_1\" name=\"New Model\">"
1341  " <notes>"
1342  " <body xmlns=\"http://www.w3.org/1999/xhtml\">"
1343  " <p>L2V1 model with no global volume unit</p>"
1344  " <p>and two compartments. One has no unit, the other uses nl as the unit.</p>"
1345  " </body>"
1346  " </notes>"
1347  " <listOfUnitDefinitions>"
1348  " <unitDefinition id=\"my_volume\">"
1349  " <listOfUnits>"
1350  " <unit kind=\"litre\" scale=\"-9\" />"
1351  " </listOfUnits>"
1352  " </unitDefinition>"
1353  " </listOfUnitDefinitions>"
1354  " <listOfCompartments>"
1355  " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" />"
1356  " <compartment id=\"compartment_2\" name=\"compartment_2\" size=\"1\" units=\"my_volume\"/>"
1357  " </listOfCompartments>"
1358  " </model>"
1359  "</sbml>"
1360  ;
1361 
1362 const char* test000083::MODEL_STRING21 =
1363  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
1364  "<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
1365  " <model id=\"Model_1\" name=\"New Model\">"
1366  " <notes>"
1367  " <body xmlns=\"http://www.w3.org/1999/xhtml\">"
1368  " <p>L2V1 model with no global volume unit</p>"
1369  " <p>and two compartments. One has nl as the unit, the other one has no unit.</p>"
1370  " </body>"
1371  " </notes>"
1372  " <listOfUnitDefinitions>"
1373  " <unitDefinition id=\"my_volume\">"
1374  " <listOfUnits>"
1375  " <unit kind=\"litre\" scale=\"-9\" />"
1376  " </listOfUnits>"
1377  " </unitDefinition>"
1378  " </listOfUnitDefinitions>"
1379  " <listOfCompartments>"
1380  " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" units=\"my_volume\"/>"
1381  " <compartment id=\"compartment_2\" name=\"compartment_2\" size=\"1\" />"
1382  " </listOfCompartments>"
1383  " </model>"
1384  "</sbml>"
1385  ;
void test_import_compartment_units_10()
Definition: test000083.cpp:423
void test_import_compartment_units_5()
Definition: test000083.cpp:195
static const char * MODEL_STRING2
Definition: test000083.h:60
void test_import_compartment_units_16()
Definition: test000083.cpp:666
void test_import_compartment_units_21()
Definition: test000083.cpp:886
void test_import_compartment_units_15()
Definition: test000083.cpp:622
void test_import_compartment_units_8()
Definition: test000083.cpp:335
void setUp()
Definition: test000083.cpp:36
void test_import_compartment_units_9()
Definition: test000083.cpp:379
void test_import_compartment_units_3()
Definition: test000083.cpp:99
const size_t & getNumber() const
void test_import_compartment_units_14()
Definition: test000083.cpp:578
static const char * MODEL_STRING16
Definition: test000083.h:101
void test_import_compartment_units_13()
Definition: test000083.cpp:555
void tearDown()
Definition: test000083.cpp:44
static const char * MODEL_STRING21
Definition: test000083.h:116
static const char * MODEL_STRING15
Definition: test000083.h:98
static const char * MODEL_STRING17
Definition: test000083.h:104
void test_import_compartment_units_2()
Definition: test000083.cpp:72
static const char * MODEL_STRING8
Definition: test000083.h:77
void test_import_compartment_units_19()
Definition: test000083.cpp:798
void test_import_compartment_units_12()
Definition: test000083.cpp:511
static CCopasiDataModel * pCOPASIDATAMODEL
Definition: test000083.h:118
void test_import_compartment_units_7()
Definition: test000083.cpp:291
#define MCSBML
void test_import_compartment_units_20()
Definition: test000083.cpp:842
static size_t size()
static const char * MODEL_STRING7
Definition: test000083.h:74
static const char * MODEL_STRING19
Definition: test000083.h:110
static const char * MODEL_STRING1
Definition: test000083.h:58
void test_import_compartment_units_6()
Definition: test000083.cpp:239
static const char * MODEL_STRING3
Definition: test000083.h:62
void test_import_compartment_units_4()
Definition: test000083.cpp:151
static CCopasiDataModel * addDatamodel()
void test_import_compartment_units_11()
Definition: test000083.cpp:467
static const char * MODEL_STRING4
Definition: test000083.h:65
static const char * MODEL_STRING9
Definition: test000083.h:80
static const char * MODEL_STRING13
Definition: test000083.h:92
static const char * MODEL_STRING18
Definition: test000083.h:107
static const char * MODEL_STRING6
Definition: test000083.h:71
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)
void test_import_compartment_units_18()
Definition: test000083.cpp:754
static void init(int argc, char *argv[], const bool &withGui=false)
static const char * MODEL_STRING14
Definition: test000083.h:95
Definition: CModel.h:50
static const char * MODEL_STRING10
Definition: test000083.h:83
static const char * MODEL_STRING11
Definition: test000083.h:86
static const char * MODEL_STRING5
Definition: test000083.h:68
static const char * MODEL_STRING20
Definition: test000083.h:113
void test_import_compartment_units_17()
Definition: test000083.cpp:710
void test_import_compartment_units_1()
Definition: test000083.cpp:49