aboutsummaryrefslogtreecommitdiffstats
path: root/m0/mutator_report.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--m0/mutator_report.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/m0/mutator_report.cpp b/m0/mutator_report.cpp
index 1e0459f..3b6a2d3 100644
--- a/m0/mutator_report.cpp
+++ b/m0/mutator_report.cpp
@@ -69,8 +69,7 @@ namespace Devi {
/************************************************end of XMLReportBase*************************************************/
/*********************************************************************************************************************/
/******************************************************XMLReport******************************************************/
-XMLReport::XMLReport()
-{
+ XMLReport::XMLReport() {
RootPointer = XMLReportDoc.NewElement("mutator:Report");
RootPointer->SetAttribute("xmlns:mutator", "http://www.w3.org/2001/XMLSchema");
}
@@ -176,7 +175,7 @@ bool XMLReport::isReportEmpty(void)
return false;
}
-void XMLReport::SaveReport(void)
+void XMLReport::SaveReport(std::string savepath)
{
if(this->isReportEmpty())
{
@@ -185,7 +184,7 @@ void XMLReport::SaveReport(void)
XMLReportDoc.InsertEndChild(RootPointer);
- XMLError XMLErrorResult = XMLReportDoc.SaveFile("./misrareport.xml");
+ XMLError XMLErrorResult = XMLReportDoc.SaveFile(savepath.c_str());
if (XMLErrorResult != XML_SUCCESS)
{
@@ -197,9 +196,9 @@ void XMLReport::SaveReport(void)
/*****************************************************JSONReport******************************************************/
JSONReport::JSONReport() {}
-void JSONReport::JSONCreateReport(void)
+void JSONReport::JSONCreateReport(std::string outpath)
{
- JSONRepFile.open("./test/misrareport.json", std::ios::out);
+ JSONRepFile.open(outpath, std::ios::out);
}
void JSONReport::JSONAddElement(ASTContext* ASTC, SourceLocation SL, std::string MisraRule, std::string Description)