17 #include "utilities.hpp"
56 std::string s = message.
getText();
57 CPPUNIT_ASSERT(!s.empty());
58 CPPUNIT_ASSERT(s.find(std::string(
"Call to delay function used in function definition")) != std::string::npos);
63 CPPUNIT_ASSERT(
false);
67 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
68 "<sbml xmlns=\"http://www.sbml.org/sbml/level2/version3\" level=\"2\" version=\"3\">\n"
69 " <model id=\"Model_1\" name=\"New Model\">\n"
71 " <body xmlns=\"http://www.w3.org/1999/xhtml\">\n"
72 " <p>Model with a delay call in a function definition. This should lead to an exception and the model should not be imported.</p>\n"
75 " <listOfFunctionDefinitions>"
76 " <functionDefinition id=\"function_1\" name=\"function with delay\">"
77 " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
83 " <csymbol encoding=\"text\" definitionURL=\"http://www.sbml.org/sbml/symbols/delay\">\n"
91 " </functionDefinition>"
92 " </listOfFunctionDefinitions>"
93 " <listOfUnitDefinitions>\n"
94 " <unitDefinition id=\"volume\">\n"
96 " <unit kind=\"litre\" scale=\"-3\"/>\n"
98 " </unitDefinition>\n"
99 " <unitDefinition id=\"substance\">\n"
101 " <unit kind=\"mole\" scale=\"-3\"/>\n"
103 " </unitDefinition>\n"
104 " </listOfUnitDefinitions>\n"
105 " <listOfParameters>\n"
106 " <parameter id=\"parameter_1\" name=\"K1\" value=\"4\"/>\n"
107 " <parameter id=\"parameter_2\" name=\"K2\" value=\"5\"/>\n"
108 " </listOfParameters>\n"
110 " <assignmentRule variable=\"parameter_1\">\n"
111 " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">\n"
113 " <ci> function_1 </ci>"
114 " <ci> parameter_2 </ci>"
117 " </assignmentRule>\n"
Header file of class CExpression.
Header file of class CModelEntity and CModelValue.
const std::string & getText() const
static CCopasiDataModel * pCOPASIDATAMODEL
const CCopasiMessage::Type & getType() const
static const char * MODEL_STRING
static CCopasiDataModel * addDatamodel()
void test_delay_in_function()
static CCopasiMessage getLastMessage()
bool importSBMLFromString(const std::string &sbmlDocumentText, CProcessReport *pImportHandler=NULL, const bool &deleteOldData=true)
static void init(int argc, char *argv[], const bool &withGui=false)