亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? configurationmappertest.cpp

?? This software aims to create an applet and panel tools to manage a wireless interface card, such as
?? CPP
字號:
//
// ConfigurationMapperTest.cpp
//
// $Id: //poco/Main/Util/testsuite/src/ConfigurationMapperTest.cpp#1 $
//
// Copyright (c) 2004-2005, Guenter Obiltschnig/Applied Informatics.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// 1. Redistributions of source code must retain the above copyright
//    notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
//    notice, this list of conditions and the following disclaimer in the
//    documentation and/or other materials provided with the distribution.
//
// 3. Redistributions in any form must be accompanied by information on
//    how to obtain complete source code for this software and any
//    accompanying software that uses this software.  The source code
//    must either be included in the distribution or be available for no
//    more than the cost of distribution plus a nominal fee, and must be
//    freely redistributable under reasonable conditions.  For an
//    executable file, complete source code means the source code for all
//    modules it contains.  It does not include source code for modules or
//    files that typically accompany the major components of the operating
//    system on which the executable file runs.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//


#include "ConfigurationMapperTest.h"
#include "CppUnit/TestCaller.h"
#include "CppUnit/TestSuite.h"
#include "Util/ConfigurationMapper.h"
#include "Util/MapConfiguration.h"
#include "Foundation/AutoPtr.h"
#include "Foundation/Exception.h"
#include <algorithm>


using Util::AbstractConfiguration;
using Util::ConfigurationMapper;
using Util::MapConfiguration;
using Foundation::AutoPtr;


ConfigurationMapperTest::ConfigurationMapperTest(const std::string& name): CppUnit::TestCase(name)
{
}


ConfigurationMapperTest::~ConfigurationMapperTest()
{
}


void ConfigurationMapperTest::testMapper1()
{
	AutoPtr<AbstractConfiguration> pConf = createConfiguration();
	AutoPtr<AbstractConfiguration> pMapper = new ConfigurationMapper("", "", pConf);
	assert (pMapper->hasProperty("config.value1"));
	assert (pMapper->hasProperty("config.value2"));

	AbstractConfiguration::Keys keys;
	pMapper->keys(keys);
	assert (keys.size() == 1);
	assert (std::find(keys.begin(), keys.end(), "config") != keys.end());

	pMapper->keys("config", keys);
	assert (keys.size() == 3);
	assert (std::find(keys.begin(), keys.end(), "value1") != keys.end());
	assert (std::find(keys.begin(), keys.end(), "value2") != keys.end());
	assert (std::find(keys.begin(), keys.end(), "sub") != keys.end());
	
	assert (pMapper->getString("config.value1") == "v1");
	assert (pMapper->getString("config.sub.value2") == "v4");
	
	pMapper->setString("config.value3", "v5");
	assert (pMapper->getString("config.value3") == "v5");
	assert (pConf->getString("config.value3") == "v5");
}


void ConfigurationMapperTest::testMapper2()
{
	AutoPtr<AbstractConfiguration> pConf = createConfiguration();
	AutoPtr<AbstractConfiguration> pMapper = new ConfigurationMapper("config", "root.conf", pConf);

	assert (pMapper->hasProperty("root.conf.value1"));
	assert (pMapper->hasProperty("root.conf.value2"));

	AbstractConfiguration::Keys keys;
	pMapper->keys(keys);
	assert (keys.size() == 1);
	assert (std::find(keys.begin(), keys.end(), "root") != keys.end());

	pMapper->keys("root", keys);
	assert (keys.size() == 1);
	assert (std::find(keys.begin(), keys.end(), "conf") != keys.end());

	pMapper->keys("root.conf", keys);
	assert (keys.size() == 3);
	assert (std::find(keys.begin(), keys.end(), "value1") != keys.end());
	assert (std::find(keys.begin(), keys.end(), "value2") != keys.end());
	assert (std::find(keys.begin(), keys.end(), "sub") != keys.end());

	assert (pMapper->getString("root.conf.value1") == "v1");
	assert (pMapper->getString("root.conf.sub.value2") == "v4");
	
	pMapper->setString("root.conf.value3", "v5");
	assert (pMapper->getString("root.conf.value3") == "v5");
	assert (pConf->getString("config.value3") == "v5");
}


void ConfigurationMapperTest::testMapper3()
{
	AutoPtr<AbstractConfiguration> pConf = createConfiguration();
	AutoPtr<AbstractConfiguration> pMapper = new ConfigurationMapper("", "root", pConf);

	assert (pMapper->hasProperty("root.config.value1"));
	assert (pMapper->hasProperty("root.config.value2"));

	AbstractConfiguration::Keys keys;
	pMapper->keys(keys);
	assert (keys.size() == 1);
	assert (std::find(keys.begin(), keys.end(), "root") != keys.end());

	pMapper->keys("root", keys);
	assert (keys.size() == 1);
	assert (std::find(keys.begin(), keys.end(), "config") != keys.end());

	pMapper->keys("root.config", keys);
	assert (keys.size() == 3);
	assert (std::find(keys.begin(), keys.end(), "value1") != keys.end());
	assert (std::find(keys.begin(), keys.end(), "value2") != keys.end());
	assert (std::find(keys.begin(), keys.end(), "sub") != keys.end());
	
	assert (pMapper->getString("root.config.value1") == "v1");
	assert (pMapper->getString("root.config.sub.value2") == "v4");
	
	pMapper->setString("root.config.value3", "v5");
	assert (pMapper->getString("root.config.value3") == "v5");
	assert (pConf->getString("config.value3") == "v5");
}


void ConfigurationMapperTest::testMapper4()
{
	AutoPtr<AbstractConfiguration> pConf = createConfiguration();
	AutoPtr<AbstractConfiguration> pMapper = new ConfigurationMapper("config", "", pConf);

	assert (pMapper->hasProperty("value1"));
	assert (pMapper->hasProperty("value2"));

	AbstractConfiguration::Keys keys;
	pMapper->keys(keys);
	assert (keys.size() == 3);
	assert (std::find(keys.begin(), keys.end(), "value1") != keys.end());
	assert (std::find(keys.begin(), keys.end(), "value2") != keys.end());
	assert (std::find(keys.begin(), keys.end(), "sub") != keys.end());
	
	assert (pMapper->getString("value1") == "v1");
	assert (pMapper->getString("sub.value2") == "v4");
	
	pMapper->setString("value3", "v5");
	assert (pMapper->getString("value3") == "v5");
	assert (pConf->getString("config.value3") == "v5");
}


AbstractConfiguration* ConfigurationMapperTest::createConfiguration() const
{
	AbstractConfiguration* pConfig = new MapConfiguration;
	
	pConfig->setString("config.value1", "v1");
	pConfig->setString("config.value2", "v2");
	pConfig->setString("config.sub.value1", "v3");
	pConfig->setString("config.sub.value2", "v4");
	
	return pConfig;
}


void ConfigurationMapperTest::setUp()
{
}


void ConfigurationMapperTest::tearDown()
{
}


CppUnit::Test* ConfigurationMapperTest::suite()
{
	CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("ConfigurationMapperTest");

	CppUnit_addTest(pSuite, ConfigurationMapperTest, testMapper1);
	CppUnit_addTest(pSuite, ConfigurationMapperTest, testMapper2);
	CppUnit_addTest(pSuite, ConfigurationMapperTest, testMapper3);
	CppUnit_addTest(pSuite, ConfigurationMapperTest, testMapper4);

	return pSuite;
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品少妇一区二区三区在线播放| 成人福利视频在线| 欧美日韩中文国产| 亚洲午夜私人影院| 欧美一卡二卡在线| 韩国成人在线视频| 综合av第一页| 欧美艳星brazzers| 奇米影视一区二区三区| 久久精品日产第一区二区三区高清版| 国产成人av电影在线播放| 国产精品视频九色porn| 色琪琪一区二区三区亚洲区| 亚洲v日本v欧美v久久精品| 欧美一区二区三区四区视频| 国产成人精品一区二区三区网站观看 | 国产一区二区三区在线观看精品| 国产欧美精品国产国产专区 | 69堂成人精品免费视频| 韩国中文字幕2020精品| 综合欧美亚洲日本| 日韩精品一区二区三区在线播放| 盗摄精品av一区二区三区| 亚洲妇女屁股眼交7| 2023国产一二三区日本精品2022| 99国产精品国产精品久久| 日韩二区三区在线观看| 国产精品成人一区二区三区夜夜夜| 91国偷自产一区二区三区成为亚洲经典| 丝袜亚洲精品中文字幕一区| 日本一区二区成人在线| 欧美三级蜜桃2在线观看| 成人免费黄色大片| 日本vs亚洲vs韩国一区三区二区| 欧美激情资源网| 日韩一级片在线播放| 91老司机福利 在线| 九九九久久久精品| 午夜在线电影亚洲一区| 国产精品网曝门| 日韩午夜激情免费电影| 色伊人久久综合中文字幕| 国产一区久久久| 日本怡春院一区二区| 亚洲视频1区2区| 国产亚洲欧美色| 日韩免费看的电影| 欧美日本一区二区在线观看| 不卡视频在线观看| 国产麻豆精品95视频| 国产成人在线影院| 美腿丝袜亚洲一区| 亚洲精品国产第一综合99久久 | 日本一区二区三区免费乱视频| fc2成人免费人成在线观看播放| 一个色综合av| 强制捆绑调教一区二区| 亚洲黄网站在线观看| caoporn国产精品| 精品入口麻豆88视频| 精品一二线国产| 亚欧色一区w666天堂| 一区二区三区久久久| 亚洲欧美视频在线观看视频| 国产欧美一区二区精品久导航| 69久久99精品久久久久婷婷| 欧美视频在线一区| 色婷婷国产精品| 欧洲在线/亚洲| 欧美日韩dvd在线观看| 欧美色综合网站| 欧美性感一类影片在线播放| 91在线精品一区二区三区| av在线一区二区三区| 99精品视频在线观看| 日本高清不卡aⅴ免费网站| 色婷婷综合激情| 一本久久a久久免费精品不卡| eeuss鲁片一区二区三区在线看| 成人精品免费视频| 成人免费的视频| 97精品超碰一区二区三区| 91麻豆精东视频| 在线中文字幕一区| 91精品国产综合久久久久| 日韩色视频在线观看| 精品国产一区二区三区四区四| 久久婷婷国产综合国色天香| 国产日韩精品一区二区浪潮av| 国产精品视频你懂的| 亚洲精品水蜜桃| 国产一区二区不卡老阿姨| 国模冰冰炮一区二区| 成人免费毛片高清视频| 一本一道久久a久久精品| 欧美丰满美乳xxx高潮www| 日韩欧美一级二级三级| 中文字幕高清不卡| 亚洲一区二区美女| 激情国产一区二区| 成人黄色软件下载| 欧美日韩一级黄| www欧美成人18+| 亚洲少妇最新在线视频| 亚洲1区2区3区视频| 国产一区二区三区四区五区美女| av网站一区二区三区| 欧美精品 日韩| xfplay精品久久| 亚洲精品视频在线看| 久久97超碰色| 色就色 综合激情| 欧美电影免费观看高清完整版在线| 欧美国产一区在线| 亚洲aaa精品| 成人一区二区三区| 日韩视频免费直播| 一区二区三区中文在线| 国产一二三精品| 欧美日本国产一区| 国产精品夫妻自拍| 蜜乳av一区二区三区| 91国产福利在线| 国产清纯白嫩初高生在线观看91 | 亚洲一二三四在线观看| 免费高清不卡av| 在线观看亚洲成人| 国产亚洲精久久久久久| 五月激情综合婷婷| 91在线观看视频| 久久免费偷拍视频| 欧美aⅴ一区二区三区视频| 99久久亚洲一区二区三区青草| 日韩欧美一级二级三级久久久| 亚洲欧美另类图片小说| 国产精品主播直播| 91精品国产91久久久久久一区二区 | 亚洲欧美欧美一区二区三区| 国产在线精品一区二区| 在线成人av影院| 一区二区三区在线看| 99久久99久久精品免费看蜜桃| 久久久久国产精品麻豆ai换脸 | 色香蕉成人二区免费| 亚洲一区二区三区在线| 懂色av中文一区二区三区 | 国产欧美一区二区在线| 久久精品国产在热久久| 欧美午夜精品理论片a级按摩| 国产精品亲子伦对白| 国产精品白丝jk白祙喷水网站| 91精品国产综合久久香蕉麻豆| 亚洲综合久久av| 一本久久a久久免费精品不卡| 国产精品卡一卡二| 国产99久久久国产精品免费看 | 亚洲另类在线一区| 成人动漫一区二区三区| 久久―日本道色综合久久| 捆绑变态av一区二区三区| 7777精品伊人久久久大香线蕉超级流畅 | 一区二区三区**美女毛片| 9人人澡人人爽人人精品| 国产清纯白嫩初高生在线观看91 | 欧美日韩精品一区二区三区四区| 国产精品三级电影| 99视频国产精品| 亚洲欧洲99久久| 色婷婷香蕉在线一区二区| 亚洲另类在线制服丝袜| 色综合天天综合网天天狠天天| 国产精品久久久久aaaa| gogo大胆日本视频一区| 亚洲精品va在线观看| 欧美日韩精品一二三区| 日日摸夜夜添夜夜添亚洲女人| 欧美精选一区二区| 久久99深爱久久99精品| 久久色视频免费观看| 国产成人在线电影| 国产精品乱人伦| 色婷婷久久久亚洲一区二区三区| 亚洲午夜在线观看视频在线| 欧美高清精品3d| 国产综合久久久久影院| 亚洲国产岛国毛片在线| 色婷婷激情综合| 美女诱惑一区二区| 国产精品久久久久久久久免费樱桃 | 综合分类小说区另类春色亚洲小说欧美 | 色婷婷综合久色| 午夜国产精品一区| 精品卡一卡二卡三卡四在线| 国产高清久久久| 亚洲专区一二三| 日韩欧美国产三级| 成人动漫av在线| 青青草视频一区| 久久天堂av综合合色蜜桃网| 91麻豆免费视频|