- deleted "gera ora!" test-global_preferences_serializer.cc
git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@772 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
parent
4ab7123ced
commit
cab84a0e3d
|
@ -1,75 +0,0 @@
|
|||
// src/testsuite/test-stepforward.cc - Copyright 2005, 2006, University
|
||||
// of Padova, dept. of Pure and Applied
|
||||
// Mathematics
|
||||
//
|
||||
// This file is part of SGPEMv2.
|
||||
//
|
||||
// This is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// SGPEMv2 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 General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with SGPEMv2; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
/* This executable tests for workingness of the save preferences method,
|
||||
* and nothing else. */
|
||||
|
||||
#include "config.h"
|
||||
#include "glibmm/ustring.h"
|
||||
#include "backend/global_preferences_serializer.hh"
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
|
||||
|
||||
|
||||
// from here and further until the bottom, all to throw away I suppose
|
||||
|
||||
int
|
||||
main(int argc, char** argv) {
|
||||
|
||||
using namespace sgpem;
|
||||
using Glib::ustring;
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
|
||||
if(argc<2)
|
||||
{
|
||||
cout << "GlobalPreferencesSerializer class test program" << endl;
|
||||
cout << "Syntax: test-global_preferences_serializer filename [mod1 mod2 ...][% pol1 pol2 ...]" << endl << endl;
|
||||
cout << "This test add modules directories (mod1 mod2 ...) and modules directories (mod1 mod2 ...)"
|
||||
<< endl
|
||||
<< "to GlobalPreferences, write it to the file \"filename\", read it and compare." << endl;
|
||||
cout << "NOTE: 1) Test fails with invalid filenames." << endl;
|
||||
cout << " 2) File \"filename\" remains in current directory after test execution."
|
||||
<< endl << endl;
|
||||
return 2;
|
||||
}
|
||||
|
||||
GlobalPreferences& gp = GlobalPreferences::get_instance();
|
||||
int i=2;
|
||||
while(i<argc && (*argv[i]!='%'))
|
||||
{
|
||||
gp.add_modules_dir( Glib::ustring(argv[i]) );
|
||||
i++;
|
||||
}
|
||||
i++;
|
||||
while(i<argc)
|
||||
{
|
||||
gp.add_policies_dir( Glib::ustring(argv[i]) );
|
||||
i++;
|
||||
}
|
||||
|
||||
GlobalPreferencesSerializer gpSer(gp);
|
||||
gpSer.file_write(Glib::ustring(argv[1]));
|
||||
|
||||
// TODO - terminate me as soon as possible - please!!!
|
||||
|
||||
exit(0);
|
||||
}
|
Loading…
Reference in New Issue