Skip to content

Commit

Permalink
Merge pull request #105 from sbmlteam/sk-fix-other-library-tests
Browse files Browse the repository at this point in the history
Sk fix other library tests
  • Loading branch information
skeating committed May 24, 2023
2 parents 20585bc + 9f128a2 commit 24c55ab
Show file tree
Hide file tree
Showing 33 changed files with 36,818 additions and 36,990 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,7 @@ CaContent::hasRequiredAttributes() const
* Write any contained elements
*/
void
CaContent::writeElements(LIBSBML_CPP_NAMESPACE_QUALIFIER XMLOutputStream&
stream) const
CaContent::writeElements(XMLOutputStream& stream) const
{
CaBase::writeElements(stream);
}
Expand Down Expand Up @@ -653,8 +652,7 @@ CaContent::unsetAttribute(const std::string& attributeName)
* Adds the expected attributes for this element
*/
void
CaContent::addExpectedAttributes(LIBSBML_CPP_NAMESPACE_QUALIFIER
ExpectedAttributes& attributes)
CaContent::addExpectedAttributes(ExpectedAttributes& attributes)
{
CaBase::addExpectedAttributes(attributes);

Expand All @@ -675,11 +673,8 @@ CaContent::addExpectedAttributes(LIBSBML_CPP_NAMESPACE_QUALIFIER
* Reads the expected attributes into the member data variables
*/
void
CaContent::readAttributes(
const LIBSBML_CPP_NAMESPACE_QUALIFIER XMLAttributes&
attributes,
const LIBSBML_CPP_NAMESPACE_QUALIFIER
ExpectedAttributes& expectedAttributes)
CaContent::readAttributes(const XMLAttributes& attributes,
const ExpectedAttributes& expectedAttributes)
{
unsigned int level = getLevel();
unsigned int version = getVersion();
Expand Down Expand Up @@ -797,8 +792,7 @@ CaContent::readAttributes(
* Writes the attributes to the stream
*/
void
CaContent::writeAttributes(LIBSBML_CPP_NAMESPACE_QUALIFIER XMLOutputStream&
stream) const
CaContent::writeAttributes(XMLOutputStream& stream) const
{
CaBase::writeAttributes(stream);

Expand Down Expand Up @@ -882,7 +876,7 @@ CaContent_getLocation(const CaContent_t * cc)
}

return cc->getLocation().empty() ? NULL :
safe_strdup(cc->getLocation().c_str());
omex_safe_strdup(cc->getLocation().c_str());
}


Expand All @@ -898,7 +892,8 @@ CaContent_getFormat(const CaContent_t * cc)
return NULL;
}

return cc->getFormat().empty() ? NULL : safe_strdup(cc->getFormat().c_str());
return cc->getFormat().empty() ? NULL :
omex_safe_strdup(cc->getFormat().c_str());
}


Expand Down
17 changes: 5 additions & 12 deletions deviser/pytest_files/test_other_library/test-code/omex/CaContent.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@


#include <omex/CaBase.h>
#include <common/libsbml-namespace.h>


LIBCOMBINE_CPP_NAMESPACE_BEGIN
Expand Down Expand Up @@ -301,8 +300,7 @@ class LIBCOMBINE_EXTERN CaContent : public CaBase
/**
* Write any contained elements
*/
virtual void writeElements(LIBSBML_CPP_NAMESPACE_QUALIFIER XMLOutputStream&
stream) const;
virtual void writeElements(XMLOutputStream& stream) const;

/** @endcond */

Expand Down Expand Up @@ -577,8 +575,7 @@ class LIBCOMBINE_EXTERN CaContent : public CaBase
/**
* Adds the expected attributes for this element
*/
virtual void addExpectedAttributes(LIBSBML_CPP_NAMESPACE_QUALIFIER
ExpectedAttributes& attributes);
virtual void addExpectedAttributes(ExpectedAttributes& attributes);

/** @endcond */

Expand All @@ -589,11 +586,8 @@ class LIBCOMBINE_EXTERN CaContent : public CaBase
/**
* Reads the expected attributes into the member data variables
*/
virtual void readAttributes(
const LIBSBML_CPP_NAMESPACE_QUALIFIER
XMLAttributes& attributes,
const LIBSBML_CPP_NAMESPACE_QUALIFIER
ExpectedAttributes& expectedAttributes);
virtual void readAttributes(const XMLAttributes& attributes,
const ExpectedAttributes& expectedAttributes);

/** @endcond */

Expand All @@ -604,8 +598,7 @@ class LIBCOMBINE_EXTERN CaContent : public CaBase
/**
* Writes the attributes to the stream
*/
virtual void writeAttributes(LIBSBML_CPP_NAMESPACE_QUALIFIER XMLOutputStream&
stream) const;
virtual void writeAttributes(XMLOutputStream& stream) const;

/** @endcond */

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,7 @@ CaListOfContents::getItemTypeCode() const
* Creates a new CaContent in this CaListOfContents
*/
CaBase*
CaListOfContents::createObject(LIBSBML_CPP_NAMESPACE_QUALIFIER XMLInputStream&
stream)
CaListOfContents::createObject(XMLInputStream& stream)
{
const std::string& name = stream.peek().getName();
CaBase* object = NULL;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@

#include <omex/CaListOf.h>
#include <omex/CaContent.h>
#include <common/libsbml-namespace.h>


LIBCOMBINE_CPP_NAMESPACE_BEGIN
Expand Down Expand Up @@ -369,8 +368,7 @@ class LIBCOMBINE_EXTERN CaListOfContents : public CaListOf
/**
* Creates a new CaContent in this CaListOfContents
*/
virtual CaBase* createObject(LIBSBML_CPP_NAMESPACE_QUALIFIER XMLInputStream&
stream);
virtual CaBase* createObject(XMLInputStream& stream);

/** @endcond */

Expand Down

0 comments on commit 24c55ab

Please sign in to comment.