COPASI API  4.16.103
test000086.cpp
Go to the documentation of this file.
1 // Begin CVS Header
2 // $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/sbml/unittests/test000086.cpp,v $
3 // $Revision: 1.2 $
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 "test000086.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* test000086::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  // make sure there is no warning about inconsistent units
57  unsigned int i = 0, iMax = CCopasiMessage::size();
58  unsigned int found24 = 0;
59  unsigned int found55 = 0;
60  unsigned int found66 = 0;
61  unsigned int found79 = 0;
62 
63  while (i < iMax)
64  {
66 
67  // check for messages about inconsistent units
68  if (message.getNumber() == MCSBML + 24)
69  {
70  ++found24;
71  }
72 
73  // check for import errors
74  if (message.getNumber() == MCSBML + 55)
75  {
76  ++found55;
77  }
78 
79  // check for import errors
80  if (message.getNumber() == MCSBML + 66)
81  {
82  ++found66;
83  }
84 
85  // check for import errors
86  if (message.getNumber() == MCSBML + 79)
87  {
88  ++found79;
89  }
90 
91  ++i;
92  }
93 
94  CPPUNIT_ASSERT(found55 == 0);
95  CPPUNIT_ASSERT(found24 == 0);
96  CPPUNIT_ASSERT(found66 == 0);
97  CPPUNIT_ASSERT(found79 == 1);
98 }
99 
101 {
102  CCopasiDataModel* pDataModel = pCOPASIDATAMODEL;
103  CPPUNIT_ASSERT(pDataModel->importSBMLFromString(MODEL_STRING2));
104  CModel* pModel = pDataModel->getModel();
105  CPPUNIT_ASSERT(pModel->getCompartments().size() == 1);
106  CPPUNIT_ASSERT(pModel != NULL);
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 found66 = 0;
112  unsigned int found79 = 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 + 66)
132  {
133  ++found66;
134  }
135 
136  // check for import errors
137  if (message.getNumber() == MCSBML + 79)
138  {
139  ++found79;
140  }
141 
142  ++i;
143  }
144 
145  CPPUNIT_ASSERT(found55 == 0);
146  CPPUNIT_ASSERT(found24 == 0);
147  CPPUNIT_ASSERT(found66 == 0);
148  CPPUNIT_ASSERT(found79 == 1);
149 }
150 
152 {
153  CCopasiDataModel* pDataModel = pCOPASIDATAMODEL;
154  CPPUNIT_ASSERT(pDataModel->importSBMLFromString(MODEL_STRING3));
155  CModel* pModel = pDataModel->getModel();
156  CPPUNIT_ASSERT(pModel->getCompartments().size() == 1);
157  CPPUNIT_ASSERT(pModel != NULL);
158  // make sure there is no warning about inconsistent units
159  unsigned int i = 0, iMax = CCopasiMessage::size();
160  unsigned int found24 = 0;
161  unsigned int found55 = 0;
162  unsigned int found66 = 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 + 66)
183  {
184  ++found66;
185  }
186 
187  // check for import errors
188  if (message.getNumber() == MCSBML + 79)
189  {
190  ++found79;
191  }
192 
193  ++i;
194  }
195 
196  CPPUNIT_ASSERT(found55 == 0);
197  CPPUNIT_ASSERT(found24 == 0);
198  CPPUNIT_ASSERT(found66 == 0);
199  CPPUNIT_ASSERT(found79 == 0);
200 }
201 
203 {
204  CCopasiDataModel* pDataModel = pCOPASIDATAMODEL;
205  CPPUNIT_ASSERT(pDataModel->importSBMLFromString(MODEL_STRING4));
206  CModel* pModel = pDataModel->getModel();
207  CPPUNIT_ASSERT(pModel->getCompartments().size() == 1);
208  CPPUNIT_ASSERT(pModel != NULL);
209  // make sure there is no warning about inconsistent units
210  unsigned int i = 0, iMax = CCopasiMessage::size();
211  unsigned int found24 = 0;
212  unsigned int found55 = 0;
213  unsigned int found66 = 0;
214  unsigned int found79 = 0;
215 
216  while (i < iMax)
217  {
219 
220  // check for messages about inconsistent units
221  if (message.getNumber() == MCSBML + 24)
222  {
223  ++found24;
224  }
225 
226  // check for import errors
227  if (message.getNumber() == MCSBML + 55)
228  {
229  ++found55;
230  }
231 
232  // check for import errors
233  if (message.getNumber() == MCSBML + 66)
234  {
235  ++found66;
236  }
237 
238  // check for import errors
239  if (message.getNumber() == MCSBML + 79)
240  {
241  ++found79;
242  }
243 
244  ++i;
245  }
246 
247  CPPUNIT_ASSERT(found55 == 0);
248  CPPUNIT_ASSERT(found24 == 0);
249  CPPUNIT_ASSERT(found66 == 0);
250  CPPUNIT_ASSERT(found79 == 1);
251 }
252 
254 {
255  CCopasiDataModel* pDataModel = pCOPASIDATAMODEL;
256  CPPUNIT_ASSERT(pDataModel->importSBMLFromString(MODEL_STRING5));
257  CModel* pModel = pDataModel->getModel();
258  CPPUNIT_ASSERT(pModel->getCompartments().size() == 1);
259  CPPUNIT_ASSERT(pModel != NULL);
260  // make sure there is no warning about inconsistent units
261  unsigned int i = 0, iMax = CCopasiMessage::size();
262  unsigned int found24 = 0;
263  unsigned int found55 = 0;
264  unsigned int found66 = 0;
265  unsigned int found79 = 0;
266 
267  while (i < iMax)
268  {
270 
271  // check for messages about inconsistent units
272  if (message.getNumber() == MCSBML + 24)
273  {
274  ++found24;
275  }
276 
277  // check for import errors
278  if (message.getNumber() == MCSBML + 55)
279  {
280  ++found55;
281  }
282 
283  // check for import errors
284  if (message.getNumber() == MCSBML + 66)
285  {
286  ++found66;
287  }
288 
289  // check for import errors
290  if (message.getNumber() == MCSBML + 79)
291  {
292  ++found79;
293  }
294 
295  ++i;
296  }
297 
298  CPPUNIT_ASSERT(found55 == 0);
299  CPPUNIT_ASSERT(found24 == 0);
300  CPPUNIT_ASSERT(found66 == 0);
301  CPPUNIT_ASSERT(found79 == 1);
302 }
303 
305 {
306  CCopasiDataModel* pDataModel = pCOPASIDATAMODEL;
307  CPPUNIT_ASSERT(pDataModel->importSBMLFromString(MODEL_STRING6));
308  CModel* pModel = pDataModel->getModel();
309  CPPUNIT_ASSERT(pModel->getCompartments().size() == 1);
310  CPPUNIT_ASSERT(pModel != NULL);
311  // make sure there is no warning about inconsistent units
312  unsigned int i = 0, iMax = CCopasiMessage::size();
313 
314  while (i < iMax)
315  {
317  // make sure there is no message about units not being consistent
318  CPPUNIT_ASSERT(message.getNumber() != MCSBML + 24);
319  // make sure all units were imported
320  CPPUNIT_ASSERT(message.getNumber() != MCSBML + 55);
321  CPPUNIT_ASSERT(message.getNumber() != MCSBML + 66);
322  CPPUNIT_ASSERT(message.getNumber() != MCSBML + 79);
323  ++i;
324  }
325 }
326 
328 {
329  CCopasiDataModel* pDataModel = pCOPASIDATAMODEL;
330  CPPUNIT_ASSERT(pDataModel->importSBMLFromString(MODEL_STRING7));
331  CModel* pModel = pDataModel->getModel();
332  CPPUNIT_ASSERT(pModel->getCompartments().size() == 1);
333  CPPUNIT_ASSERT(pModel != NULL);
334  // make sure there is no warning about inconsistent units
335  unsigned int i = 0, iMax = CCopasiMessage::size();
336  unsigned int found24 = 0;
337  unsigned int found55 = 0;
338  unsigned int found66 = 0;
339  unsigned int found79 = 0;
340 
341  while (i < iMax)
342  {
344 
345  // check for messages about inconsistent units
346  if (message.getNumber() == MCSBML + 24)
347  {
348  ++found24;
349  }
350 
351  // check for import errors
352  if (message.getNumber() == MCSBML + 55)
353  {
354  ++found55;
355  }
356 
357  // check for import errors
358  if (message.getNumber() == MCSBML + 66)
359  {
360  ++found66;
361  }
362 
363  // check for import errors
364  if (message.getNumber() == MCSBML + 79)
365  {
366  ++found79;
367  }
368 
369  ++i;
370  }
371 
372  CPPUNIT_ASSERT(found55 == 0);
373  CPPUNIT_ASSERT(found24 == 0);
374  CPPUNIT_ASSERT(found66 == 0);
375  CPPUNIT_ASSERT(found79 == 1);
376 }
377 
379 {
380  CCopasiDataModel* pDataModel = pCOPASIDATAMODEL;
381  CPPUNIT_ASSERT(pDataModel->importSBMLFromString(MODEL_STRING8));
382  CModel* pModel = pDataModel->getModel();
383  CPPUNIT_ASSERT(pModel->getCompartments().size() == 1);
384  CPPUNIT_ASSERT(pModel != NULL);
385  // make sure there is no warning about inconsistent units
386  unsigned int i = 0, iMax = CCopasiMessage::size();
387  unsigned int found24 = 0;
388  unsigned int found55 = 0;
389  unsigned int found66 = 0;
390  unsigned int found79 = 0;
391 
392  while (i < iMax)
393  {
395 
396  // check for messages about inconsistent units
397  if (message.getNumber() == MCSBML + 24)
398  {
399  ++found24;
400  }
401 
402  // check for import errors
403  if (message.getNumber() == MCSBML + 55)
404  {
405  ++found55;
406  }
407 
408  // check for import errors
409  if (message.getNumber() == MCSBML + 66)
410  {
411  ++found66;
412  }
413 
414  // check for import errors
415  if (message.getNumber() == MCSBML + 79)
416  {
417  ++found79;
418  }
419 
420  ++i;
421  }
422 
423  CPPUNIT_ASSERT(found55 == 0);
424  CPPUNIT_ASSERT(found24 == 0);
425  CPPUNIT_ASSERT(found66 == 0);
426  CPPUNIT_ASSERT(found79 == 0);
427 }
428 
430 {
431  CCopasiDataModel* pDataModel = pCOPASIDATAMODEL;
432  CPPUNIT_ASSERT(pDataModel->importSBMLFromString(MODEL_STRING9));
433  CModel* pModel = pDataModel->getModel();
434  CPPUNIT_ASSERT(pModel->getCompartments().size() == 1);
435  CPPUNIT_ASSERT(pModel != NULL);
436  // make sure there is no warning about inconsistent units
437  unsigned int i = 0, iMax = CCopasiMessage::size();
438  unsigned int found24 = 0;
439  unsigned int found55 = 0;
440  unsigned int found66 = 0;
441  unsigned int found79 = 0;
442 
443  while (i < iMax)
444  {
446 
447  // check for messages about inconsistent units
448  if (message.getNumber() == MCSBML + 24)
449  {
450  ++found24;
451  }
452 
453  // check for import errors
454  if (message.getNumber() == MCSBML + 55)
455  {
456  ++found55;
457  }
458 
459  // check for import errors
460  if (message.getNumber() == MCSBML + 66)
461  {
462  ++found66;
463  }
464 
465  // check for import errors
466  if (message.getNumber() == MCSBML + 79)
467  {
468  ++found79;
469  }
470 
471  ++i;
472  }
473 
474  CPPUNIT_ASSERT(found55 == 0);
475  CPPUNIT_ASSERT(found24 == 0);
476  CPPUNIT_ASSERT(found66 == 0);
477  CPPUNIT_ASSERT(found79 == 1);
478 }
479 
481 {
482  CCopasiDataModel* pDataModel = pCOPASIDATAMODEL;
483  CPPUNIT_ASSERT(pDataModel->importSBMLFromString(MODEL_STRING10));
484  CModel* pModel = pDataModel->getModel();
485  CPPUNIT_ASSERT(pModel->getCompartments().size() == 1);
486  CPPUNIT_ASSERT(pModel != NULL);
487  // make sure there is no warning about inconsistent units
488  unsigned int i = 0, iMax = CCopasiMessage::size();
489  unsigned int found24 = 0;
490  unsigned int found55 = 0;
491  unsigned int found66 = 0;
492  unsigned int found79 = 0;
493 
494  while (i < iMax)
495  {
497 
498  // check for messages about inconsistent units
499  if (message.getNumber() == MCSBML + 24)
500  {
501  ++found24;
502  }
503 
504  // check for import errors
505  if (message.getNumber() == MCSBML + 55)
506  {
507  ++found55;
508  }
509 
510  // check for import errors
511  if (message.getNumber() == MCSBML + 66)
512  {
513  ++found66;
514  }
515 
516  // check for import errors
517  if (message.getNumber() == MCSBML + 79)
518  {
519  ++found79;
520  }
521 
522  ++i;
523  }
524 
525  CPPUNIT_ASSERT(found55 == 0);
526  CPPUNIT_ASSERT(found24 == 0);
527  CPPUNIT_ASSERT(found66 == 0);
528  CPPUNIT_ASSERT(found79 == 1);
529 }
530 
532 {
533  CCopasiDataModel* pDataModel = pCOPASIDATAMODEL;
534  CPPUNIT_ASSERT(pDataModel->importSBMLFromString(MODEL_STRING11));
535  CModel* pModel = pDataModel->getModel();
536  CPPUNIT_ASSERT(pModel->getCompartments().size() == 2);
537  CPPUNIT_ASSERT(pModel != NULL);
538  // make sure there is no warning about inconsistent units
539  unsigned int i = 0, iMax = CCopasiMessage::size();
540  unsigned int found24 = 0;
541  unsigned int found55 = 0;
542  unsigned int found66 = 0;
543  unsigned int found79 = 0;
544 
545  while (i < iMax)
546  {
548 
549  // check for messages about inconsistent units
550  if (message.getNumber() == MCSBML + 24)
551  {
552  ++found24;
553  }
554 
555  // check for import errors
556  if (message.getNumber() == MCSBML + 55)
557  {
558  ++found55;
559  }
560 
561  // check for import errors
562  if (message.getNumber() == MCSBML + 66)
563  {
564  ++found66;
565  }
566 
567  // check for import errors
568  if (message.getNumber() == MCSBML + 79)
569  {
570  ++found79;
571  }
572 
573  ++i;
574  }
575 
576  CPPUNIT_ASSERT(found55 == 0);
577  CPPUNIT_ASSERT(found24 == 0);
578  CPPUNIT_ASSERT(found66 == 0);
579  CPPUNIT_ASSERT(found79 == 0);
580 }
581 
582 const char* test000086::MODEL_STRING1 =
583  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
584  "<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
585  " <model id=\"Model_1\" name=\"New Model\">"
586  " <notes>"
587  " <body xmlns=\"http://www.w3.org/1999/xhtml\">"
588  " <p>L2V1 model with a compartment with length units.</p>"
589  " </body>"
590  " </notes>"
591  " <listOfCompartments>"
592  " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" spatialDimensions=\"0\" units=\"length\"/>"
593  " </listOfCompartments>"
594  " </model>"
595  "</sbml>"
596  ;
597 
598 const char* test000086::MODEL_STRING2 =
599  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
600  "<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
601  " <model id=\"Model_1\" name=\"New Model\">"
602  " <notes>"
603  " <body xmlns=\"http://www.w3.org/1999/xhtml\">"
604  " <p>L2V1 model with a compartment with metre units.</p>"
605  " </body>"
606  " </notes>"
607  " <listOfCompartments>"
608  " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" spatialDimensions=\"0\" units=\"metre\"/>"
609  " </listOfCompartments>"
610  " </model>"
611  "</sbml>"
612  ;
613 
614 const char* test000086::MODEL_STRING3 =
615  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
616  "<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
617  " <model id=\"Model_1\" name=\"New Model\">"
618  " <notes>"
619  " <body xmlns=\"http://www.w3.org/1999/xhtml\">"
620  " <p>L2V1 model with a compartment with no units.</p>"
621  " </body>"
622  " </notes>"
623  " <listOfCompartments>"
624  " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" spatialDimensions=\"0\" />"
625  " </listOfCompartments>"
626  " </model>"
627  "</sbml>"
628  ;
629 
630 const char* test000086::MODEL_STRING4 =
631  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
632  "<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
633  " <model id=\"Model_1\" name=\"New Model\">"
634  " <notes>"
635  " <body xmlns=\"http://www.w3.org/1999/xhtml\">"
636  " <p>L2V1 model with a 0D compartment with volume units.</p>"
637  " </body>"
638  " </notes>"
639  " <listOfCompartments>"
640  " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" spatialDimensions=\"0\" units=\"volume\"/>"
641  " </listOfCompartments>"
642  " </model>"
643  "</sbml>"
644  ;
645 
646 const char* test000086::MODEL_STRING5 =
647  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
648  "<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
649  " <model id=\"Model_1\" name=\"New Model\">"
650  " <notes>"
651  " <body xmlns=\"http://www.w3.org/1999/xhtml\">"
652  " <p>L2V1 model with a 0D compartment with area units.</p>"
653  " </body>"
654  " </notes>"
655  " <listOfCompartments>"
656  " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" spatialDimensions=\"0\" units=\"area\"/>"
657  " </listOfCompartments>"
658  " </model>"
659  "</sbml>"
660  ;
661 
662 const char* test000086::MODEL_STRING6 =
663  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
664  "<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
665  " <model id=\"Model_1\" name=\"New Model\">"
666  " <notes>"
667  " <body xmlns=\"http://www.w3.org/1999/xhtml\">"
668  " <p>L2V1 model with a 0D compartment with dimensionless units.</p>"
669  " </body>"
670  " </notes>"
671  " <listOfCompartments>"
672  " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" spatialDimensions=\"0\" units=\"dimensionless\"/>"
673  " </listOfCompartments>"
674  " </model>"
675  "</sbml>"
676  ;
677 
678 const char* test000086::MODEL_STRING7 =
679  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
680  "<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
681  " <model id=\"Model_1\" name=\"New Model\">"
682  " <notes>"
683  " <body xmlns=\"http://www.w3.org/1999/xhtml\">"
684  " <p>L2V1 model with a 0D compartment with m^2 units.</p>"
685  " </body>"
686  " </notes>"
687  " <listOfUnitDefinitions>"
688  " <unitDefinition id=\"my_dimensionless\">"
689  " <listOfUnits>"
690  " <unit kind=\"metre\" scale=\"0\" exponent=\"2\" />"
691  " </listOfUnits>"
692  " </unitDefinition>"
693  " </listOfUnitDefinitions>"
694  " <listOfCompartments>"
695  " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" spatialDimensions=\"0\" units=\"my_dimensionless\"/>"
696  " </listOfCompartments>"
697  " </model>"
698  "</sbml>"
699  ;
700 
701 const char* test000086::MODEL_STRING8 =
702  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
703  "<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
704  " <model id=\"Model_1\" name=\"New Model\">"
705  " <notes>"
706  " <body xmlns=\"http://www.w3.org/1999/xhtml\">"
707  " <p>L2V1 model with a 0D compartment with dimensionless units.</p>"
708  " </body>"
709  " </notes>"
710  " <listOfUnitDefinitions>"
711  " <unitDefinition id=\"my_dimensionless\">"
712  " <listOfUnits>"
713  " <unit kind=\"dimensionless\" scale=\"0\" />"
714  " </listOfUnits>"
715  " </unitDefinition>"
716  " </listOfUnitDefinitions>"
717  " <listOfCompartments>"
718  " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" spatialDimensions=\"0\" units=\"my_dimensionless\"/>"
719  " </listOfCompartments>"
720  " </model>"
721  "</sbml>"
722  ;
723 
724 const char* test000086::MODEL_STRING9 =
725  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
726  "<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
727  " <model id=\"Model_1\" name=\"New Model\">"
728  " <notes>"
729  " <body xmlns=\"http://www.w3.org/1999/xhtml\">"
730  " <p>L2V1 model with a 0D compartment with mole units.</p>"
731  " </body>"
732  " </notes>"
733  " <listOfUnitDefinitions>"
734  " <unitDefinition id=\"my_dimensionless\">"
735  " <listOfUnits>"
736  " <unit kind=\"mole\" scale=\"0\" />"
737  " </listOfUnits>"
738  " </unitDefinition>"
739  " </listOfUnitDefinitions>"
740  " <listOfCompartments>"
741  " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" spatialDimensions=\"0\" units=\"my_dimensionless\"/>"
742  " </listOfCompartments>"
743  " </model>"
744  "</sbml>"
745  ;
746 
747 const char* test000086::MODEL_STRING10 =
748  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
749  "<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
750  " <model id=\"Model_1\" name=\"New Model\">"
751  " <notes>"
752  " <body xmlns=\"http://www.w3.org/1999/xhtml\">"
753  " <p>L2V1 model with a 0D compartment with substance units.</p>"
754  " </body>"
755  " </notes>"
756  " <listOfCompartments>"
757  " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" spatialDimensions=\"0\" units=\"substance\"/>"
758  " </listOfCompartments>"
759  " </model>"
760  "</sbml>"
761  ;
762 
763 const char* test000086::MODEL_STRING11 =
764  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
765  "<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
766  " <model id=\"Model_1\" name=\"New Model\">"
767  " <notes>"
768  " <body xmlns=\"http://www.w3.org/1999/xhtml\">"
769  " <p>L2V1 model with two compartments. One has no unit, the other uses dimensionless as the unit.</p>"
770  " </body>"
771  " </notes>"
772  " <listOfCompartments>"
773  " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" spatialDimensions=\"0\" />"
774  " <compartment id=\"compartment_2\" name=\"compartment_2\" size=\"1\" spatialDimensions=\"0\" units=\"dimensionless\"/>"
775  " </listOfCompartments>"
776  " </model>"
777  "</sbml>"
778  ;
void test_import_compartment_units_5()
Definition: test000086.cpp:253
void setUp()
Definition: test000086.cpp:36
void test_import_compartment_units_10()
Definition: test000086.cpp:480
void test_import_compartment_units_8()
Definition: test000086.cpp:378
static CCopasiDataModel * pCOPASIDATAMODEL
Definition: test000086.h:81
static const char * MODEL_STRING1
Definition: test000086.h:49
void test_import_compartment_units_3()
Definition: test000086.cpp:151
static const char * MODEL_STRING3
Definition: test000086.h:55
static const char * MODEL_STRING11
Definition: test000086.h:79
const size_t & getNumber() const
static const char * MODEL_STRING9
Definition: test000086.h:73
void test_import_compartment_units_1()
Definition: test000086.cpp:49
void test_import_compartment_units_7()
Definition: test000086.cpp:327
static const char * MODEL_STRING8
Definition: test000086.h:70
#define MCSBML
void test_import_compartment_units_4()
Definition: test000086.cpp:202
static const char * MODEL_STRING4
Definition: test000086.h:58
static const char * MODEL_STRING2
Definition: test000086.h:52
void test_import_compartment_units_6()
Definition: test000086.cpp:304
static size_t size()
static const char * MODEL_STRING6
Definition: test000086.h:64
static CCopasiDataModel * addDatamodel()
static const char * MODEL_STRING5
Definition: test000086.h:61
static CCopasiMessage getLastMessage()
bool importSBMLFromString(const std::string &sbmlDocumentText, CProcessReport *pImportHandler=NULL, const bool &deleteOldData=true)
void test_import_compartment_units_2()
Definition: test000086.cpp:100
static void init(int argc, char *argv[], const bool &withGui=false)
Definition: CModel.h:50
void test_import_compartment_units_11()
Definition: test000086.cpp:531
void test_import_compartment_units_9()
Definition: test000086.cpp:429
void tearDown()
Definition: test000086.cpp:44
static const char * MODEL_STRING10
Definition: test000086.h:76
static const char * MODEL_STRING7
Definition: test000086.h:67