Skip to content

Commit

Permalink
[CORRECTIVE] Remove depracated element test
Browse files Browse the repository at this point in the history
  • Loading branch information
epekkar committed Dec 4, 2023
1 parent a179308 commit de6c895
Showing 1 changed file with 0 additions and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ private slots:
void testAssertion();
void testVendorExtensions();

void testWriteConfigurableElementValues();
void testWriteViewOverrides();

private:
Expand Down Expand Up @@ -763,59 +762,6 @@ void tst_DesignConfigurationWriter::testVendorExtensions()
compareOutputToExpected(output, expectedOutput);
}

//-----------------------------------------------------------------------------
// Function: tst_DesignConfigurationWriter::testWriteConfigurableElementValues()
//-----------------------------------------------------------------------------
void tst_DesignConfigurationWriter::testWriteConfigurableElementValues()
{
VLNV vlnv(VLNV::DESIGNCONFIGURATION, "tuni.fi", "TestLibrary", "TestDesignConfiguration", "0.1");
designConfiguration_ = QSharedPointer<DesignConfiguration>(new DesignConfiguration(vlnv, Document::Revision::Std14));

QMap<QString, QString> configurableElementValues;
configurableElementValues.insert("referencedID","referencedValue");
configurableElementValues.insert("otherID", "4-4-4");

designConfiguration_->setVersion("3.0.0");
designConfiguration_->setConfigurableElementValues("testInstance", configurableElementValues);

QString output;
QXmlStreamWriter xmlStreamWriter(&output);

xmlStreamWriter.setAutoFormatting(true);
xmlStreamWriter.setAutoFormattingIndent(-1);

DesignConfigurationWriter::writeDesignConfiguration(xmlStreamWriter, designConfiguration_);

QString expectedOutput(
"<?xml version=\"1.0\"?>\n"
"<ipxact:designConfiguration "
"xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" "
"xmlns:ipxact=\"http://www.accellera.org/XMLSchema/IPXACT/1685-2014\" "
"xmlns:kactus2=\"http://kactus2.cs.tut.fi\" "
"xsi:schemaLocation=\"http://www.accellera.org/XMLSchema/IPXACT/1685-2014 "
"http://www.accellera.org/XMLSchema/IPXACT/1685-2014/index.xsd\""
">\n"
"\t<ipxact:vendor>tuni.fi</ipxact:vendor>\n"
"\t<ipxact:library>TestLibrary</ipxact:library>\n"
"\t<ipxact:name>TestDesignConfiguration</ipxact:name>\n"
"\t<ipxact:version>0.1</ipxact:version>\n"
"\t<ipxact:vendorExtensions>\n"
"\t\t<kactus2:version>3.0.0</kactus2:version>\n"
"\t\t<kactus2:configurableElementValues>\n"
"\t\t\t<kactus2:componentInstance>\n"
"\t\t\t\t<kactus2:uuid>testInstance</kactus2:uuid>\n"
"\t\t\t\t<kactus2:configurableElementValue referenceId=\"otherID\" value=\"4-4-4\"/>\n"
"\t\t\t\t<kactus2:configurableElementValue referenceId=\"referencedID\""
" value=\"referencedValue\"/>\n"
"\t\t\t</kactus2:componentInstance>\n"
"\t\t</kactus2:configurableElementValues>\n"
"\t</ipxact:vendorExtensions>\n"
"</ipxact:designConfiguration>\n"
);

compareOutputToExpected(output, expectedOutput);
}

//-----------------------------------------------------------------------------
// Function: tst_DesignConfigurationWriter::testWriteViewOverrides()
//-----------------------------------------------------------------------------
Expand Down

0 comments on commit de6c895

Please sign in to comment.