2007-08-25 02:07:04 +02:00
|
|
|
/*
|
2008-11-30 03:08:48 +01:00
|
|
|
Appconfig(Test) - accessing the always-available Appconfig singleton
|
2007-08-25 02:07:04 +02:00
|
|
|
|
2008-03-10 04:25:03 +01:00
|
|
|
Copyright (C) Lumiera.org
|
|
|
|
|
2008, Hermann Vosseler <Ichthyostega@web.de>
|
2007-08-25 02:07:04 +02:00
|
|
|
|
|
|
|
|
This program 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.
|
|
|
|
|
|
|
|
|
|
This program 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 this program; if not, write to the Free Software
|
|
|
|
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
|
|
|
|
|
|
* *****************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "common/test/run.hpp"
|
|
|
|
|
#include "common/util.hpp"
|
|
|
|
|
|
2008-11-26 05:19:59 +01:00
|
|
|
#include "lumiera/appconfig.hpp"
|
2008-04-14 05:15:16 +02:00
|
|
|
|
2007-08-25 02:07:04 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-11-30 03:08:48 +01:00
|
|
|
namespace lumiera {
|
|
|
|
|
namespace test {
|
2007-08-25 02:07:04 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class Appconfig_test : public Test
|
|
|
|
|
{
|
|
|
|
|
virtual void run (Arg arg)
|
|
|
|
|
{
|
|
|
|
|
testAccess("version");
|
2008-11-28 21:39:48 +01:00
|
|
|
UNIMPLEMENTED ("reorganise config access for C++");
|
2007-08-25 02:07:04 +02:00
|
|
|
}
|
|
|
|
|
|
2008-03-10 06:09:44 +01:00
|
|
|
/** @test accessing a value from lumiera::Appconfig */
|
2007-08-25 02:07:04 +02:00
|
|
|
void testAccess (const string& key)
|
2007-08-26 19:14:39 +02:00
|
|
|
{
|
2008-11-28 21:39:48 +01:00
|
|
|
// string ver = lumiera::Appconfig::get(key);
|
|
|
|
|
// ASSERT ( !util::isnil(ver));
|
2007-08-26 19:14:39 +02:00
|
|
|
}
|
2007-08-25 02:07:04 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
LAUNCHER (Appconfig_test, "function common");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace test
|
|
|
|
|
|
|
|
|
|
} // namespace util
|
|
|
|
|
|