lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [5911] Translate old testdeck to distinct xml input files


From: Greg Chicares
Subject: [lmi-commits] [5911] Translate old testdeck to distinct xml input files
Date: Sun, 22 Jun 2014 16:08:36 +0000

Revision: 5911
          http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=5911
Author:   chicares
Date:     2014-06-22 16:08:36 +0000 (Sun, 22 Jun 2014)
Log Message:
-----------
Translate old testdeck to distinct xml input files

Modified Paths:
--------------
    lmi/trunk/ihs_server7702.cpp

Modified: lmi/trunk/ihs_server7702.cpp
===================================================================
--- lmi/trunk/ihs_server7702.cpp        2014-06-22 15:10:14 UTC (rev 5910)
+++ lmi/trunk/ihs_server7702.cpp        2014-06-22 16:08:36 UTC (rev 5911)
@@ -35,6 +35,7 @@
 #include "assert_lmi.hpp"
 #include "basic_values.hpp"
 #include "fenv_lmi.hpp"
+#include "gpt_xml_document.hpp"
 #include "handle_exceptions.hpp"
 #include "ihs_irc7702.hpp"
 #include "ihs_server7702io.hpp"
@@ -43,6 +44,7 @@
 
 #include <cstdlib>
 #include <exception>
+#include <fstream>
 #include <iostream>
 #include <string>
 
@@ -94,11 +96,18 @@
             {
             // Run testdeck to validate this chain of conversions:
             //   Server7702Input --> gpt_input --> Server7702Input
+            std::string f = input.UniqueIdentifier + ".gpt";
+            std::ofstream ofs_input(f.c_str());
             gpt_input z = input.operator gpt_input();
+            gpt_xml_document x(z);
+            x.write(ofs_input);
             Server7702Input y(z);
             Server7702 contract(y);
             contract.Process();
             std::cout << contract.GetOutput();
+            f += ".txt";
+            std::ofstream ofs_output(f.c_str());
+            ofs_output << contract.GetOutput();
             while('\n' == std::cin.peek())
                 {
                 std::cin.get();




reply via email to

[Prev in Thread] Current Thread [Next in Thread]