1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
25 * Author : Renaud BARATE - EDF R&D
36 int main(int argc, char** argv)
39 cerr << "Exec_Test expects three parameters, usage: Exec_Test <scriptA> <scriptB> <result>" << endl;
43 const char * scriptAFileName = argv[1];
44 const char * scriptBFileName = argv[2];
45 const char * resultFileName = argv[3];
47 ifstream scriptAStream(scriptAFileName);
50 while (getline(scriptAStream, line)) {
51 if (line.compare(0, 2, string("a=")) == 0) {
52 a = strtol(line.substr(2).c_str(), NULL, 10);
55 scriptAStream.close();
57 cerr << "Exec_Test couldn't parse value \"a\" in " << scriptAFileName << endl;
61 ifstream scriptBStream(scriptBFileName);
63 while (getline(scriptBStream, line)) {
64 if (line.compare(0, 2, string("b=")) == 0) {
65 b = strtol(line.substr(2).c_str(), NULL, 10);
68 scriptBStream.close();
70 cerr << "Exec_Test couldn't parse value \"b\" in " << scriptBFileName << endl;
75 ofstream resultStream(resultFileName);
76 resultStream << "c = " << c;