Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions src/sbml/conversion/test/TestLevelVersionConverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,32 @@ START_TEST (test_specref_ref_real)
END_TEST


START_TEST (test_convertToL3V2)
{
SBMLNamespaces sbmlns(3, 2);
ConversionProperties prop(&sbmlns);
prop.addOption("strict", true, "should validity be preserved");
prop.addOption("setLevelAndVersion", true, "convert the document to the given level and version");
prop.addOption("ignorePackages", true);

SBMLLevelVersionConverter converter;
converter.setProperties(&prop);

string filename(TestDataDirectory);
filename += "issue-316.xml";

SBMLDocument* d = readSBMLFromFile(filename.c_str());

// convert to L3V2
converter.setDocument(d);
int returnCode = converter.convert();
fail_unless(returnCode == LIBSBML_OPERATION_SUCCESS);

delete d;
}
END_TEST


Suite *
create_suite_TestLevelVersionConverter (void)
{
Expand All @@ -475,6 +501,7 @@ create_suite_TestLevelVersionConverter (void)
tcase_add_test(tcase, test_convertL3V1ToL2V5_strict);
tcase_add_test(tcase, test_convertL2V5ToL3V1_strict);
tcase_add_test(tcase, test_convertToL1V1);
tcase_add_test(tcase, test_convertToL3V2);

tcase_add_test(tcase, test_compartment_size);

Expand Down
Loading