I have a gtest generated text file with format like this
................text_file_1......................................
FisheyeLens.
getCoefficients
MaxRadius
DistortUndistortEquidistant
DistortUndistortEquisolid
DistortUndistortStereographic
DistortUndistortOrthographic
InversePoly
Rig
Perlin
Lens.
DistortUndistort
BrownLens.
MaxRadius
DistortUndistort
Environment.
FloatingPoint
ComputePrimaryAxis
i want it to be in the following format
..................text_file_2...............................
FisheyeLens.getCoefficients
FisheyeLens.MaxRadius
FisheyeLens.DistortUndistortEquidistant
FisheyeLens.DistortUndistortEquisolid
FisheyeLens.DistortUndistortStereographic
FisheyeLens.DistortUndistortOrthographic
FisheyeLens.InversePoly
FisheyeLens.Rig
FisheyeLens.Perlin
Lens.DistortUndistort
BrownLens.MaxRadius
BrownLens.DistotUndistort
Enviroment.FloatingPoint
Enviroment.ComputerPrimaryAxis
What I have tried:
I have written a code to read the text_file_2
while ( (line=file.ReadLine()) != null)
{
writer.WriteStartElement("Test");
writer.WriteAttributeString("ID", "{AB02A59E-2DF9-4EF4-AD3A-7B14BB3341BC}");
writer.WriteAttributeString("StartTime", "");
writer.WriteAttributeString("Description", "Runing Gtest through veracity");
writer.WriteAttributeString("InstanceName", "RunGTest "+propertyNode);
writer.WriteAttributeString("Result", "Failed");
writer.WriteAttributeString("Enabled", "1");
writer.WriteAttributeString("Checksum", "");
writer.WriteAttributeString("EndTime", "");
writer.WriteStartElement("PropertyCollection");
writer.WriteStartElement("Property");
writer.WriteAttributeString("Name", "External app path");
writer.WriteAttributeString("Description", "Specify the path relative to Bin folder or you can specify the absolute path.May use env variable");
writer.WriteString(textBox1.Text);
writer.WriteEndElement();
writer.WriteStartElement("Property");
writer.WriteAttributeString("Name", "Command line parameters");
writer.WriteAttributeString("Description", "specify the command line parameter for Gtest");
writer.WriteString("--gtest_filter =" + line);
writer.WriteEndElement();
writer.WriteStartElement("Property");
writer.WriteAttributeString("Name", "Capture Std Out");
writer.WriteAttributeString("Description", "Set this to true if the external app uses std out");
writer.WriteString("1");
writer.WriteEndElement();
writer.WriteStartElement("Property");
writer.WriteAttributeString("Name", "File Name to Capture Std Out");
writer.WriteAttributeString("Description", "Has effect only when property 'Capture Std Out'is set to true to Capture Std Out");
writer.WriteString("Output.txt");
writer.WriteEndElement();
writer.WriteStartElement("Property");
writer.WriteAttributeString("Name", "Pass Phrase");
writer.WriteAttributeString("Description", "Pass phrase to look for in the std out or the output file to determine if the test passed or failed");
writer.WriteString("FAILED");
writer.WriteEndElement();
writer.WriteEndElement();
writer.WriteEndElement();
propertyNode += 1;
}
But i m unsure of how do i do it for text_file_1