X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2FDEVEL%2Fgdome_xslt%2FC%2B%2B%2Ftest%2Fmain.cc;fp=helm%2FDEVEL%2Fgdome_xslt%2FC%2B%2B%2Ftest%2Fmain.cc;h=0000000000000000000000000000000000000000;hb=869549224eef6278a48c16ae27dd786376082b38;hp=9c9625fdda0aa177dea079cfdce7c43f9cc14779;hpb=89262281b6e83bd2321150f81f1a0583645eb0c8;p=helm.git diff --git a/helm/DEVEL/gdome_xslt/C++/test/main.cc b/helm/DEVEL/gdome_xslt/C++/test/main.cc deleted file mode 100644 index 9c9625fdd..000000000 --- a/helm/DEVEL/gdome_xslt/C++/test/main.cc +++ /dev/null @@ -1,52 +0,0 @@ -/* This file is a test for the XSLT engine working on Gdome documents. - * - * Copyright (C) 2002 Claudio Sacerdoti Coen - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * For more information, please send an email to - */ - -#include -#include -#include "GdomeSmartDOMXSLT.hh" - -namespace DOM = GdomeSmartDOM; - -#define OUTPUT_FILE "../../test_files/output.xml" -#define CORRECT_OUTPUT_FILE "../../test_files/output.xml.correct" - -int -main(void) -{ - int bytes; - DOM::DOMImplementation di; - std::vector< std::pair > params; - - params.push_back(make_pair(DOM::GdomeString("parameter1"), DOM::GdomeString("'value1'"))); - params.push_back(make_pair(DOM::GdomeString("parameter2"), DOM::GdomeString("'value2'"))); - params.push_back(make_pair(DOM::GdomeString("parameter3"), DOM::GdomeString("'value3'"))); - - DOM::Document input = di.createDocumentFromURI("../../test_files/input.xml"); - DOM::Document style = di.createDocumentFromURI("../../test_files/stylesheet.xsl"); - - DOM::XSLTStylesheet style_libxslt(style); - DOM::Document output = style_libxslt.apply(input, params); - style_libxslt.save(output, OUTPUT_FILE); - - cout << "The test was successful iff " << OUTPUT_FILE << " is equal to " << CORRECT_OUTPUT_FILE << endl; - - return 0; -}