void GAccountService::SaveAccountsToFile(const std::string& filename) const { rapidxml::xml_document<char> xml; rapidxml::xml_node<char>* rot = xml.allocate_node(rapidxml::node_pi, xml.allocate_string("xml version=\"1.0\" encoding=\"UTF-8\"")); xml.append_node(rot); rapidxml::xml_node<char>* accsNode = xml.allocate_node(rapidxml::node_element, xml.allocate_string("Accounts")); xml.append_node(accsNode); for (AccountContainerT::const_iterator iter = _accounts.begin(); iter != _accounts.end(); ++iter) { const Account& acc = iter->second; rapidxml::xml_node<char>* accNode = xml.allocate_node(rapidxml::node_element, xml.allocate_string("Account")); accNode->append_attribute(xml.allocate_attribute("account", acc.account)); accNode->append_attribute(xml.allocate_attribute("password", acc.password)); accNode->append_attribute(xml.allocate_attribute("accid", xml.allocate_string(KToStr(acc.accid).c_str()))); accNode->append_attribute(xml.allocate_attribute("gmlevel", xml.allocate_string(KToStr(acc.gmlevel).c_str()))); accNode->append_attribute(xml.allocate_attribute("lastserverid", xml.allocate_string(KToStr(acc.lastserverid).c_str()))); accNode->append_attribute(xml.allocate_attribute("lastip", acc.lastip)); accNode->append_attribute(xml.allocate_attribute("lasttime", xml.allocate_string(KToStr(acc.lasttime).c_str()))); accsNode->append_node(accNode); } std::ofstream xmlfile(_accountsFilename); xmlfile << xml; }
void DiK2Configs::LoadConfig(const DiString& config) { auto file = DiAssetManager::GetInstance().OpenArchive(config, true); if (!file) { DI_WARNING("Failed to load the config: %s", config.c_str()); return; } shared_ptr<DiXMLFile> xmlfile(new DiXMLFile()); xmlfile->Load(file->GetAsString()); DiXMLElement node = xmlfile->GetRoot(); DiXMLElement child = node.GetChild(); while (child) { DiString name = child.GetName(); if (name == "Property") { DiString key = child.GetAttribute("key"); DiString val = child.GetAttribute("value"); CommandMgr->RegisterString(key, val, 0); } child = child.GetNext(); } }
void DiEditorManager::SaveAll(const DiString& fxFileName) { DiFxTokensParser parser; shared_ptr<DiXMLFile> xmlfile(new DiXMLFile()); DiXMLElement root = xmlfile->CreateRoot("Effects"); mRootObject->TraversalChildren([&](size_t id, DiBaseEditorObj* obj){ if(obj->GetType() == "ParticleSystem") { auto psObj = dynamic_cast<DiParticleSystemObj*>(obj); DiParticleSystemPtr ps = psObj->GetParticleSystem(); auto nd = root.CreateChild("ParticleSystem"); parser.WriteSystem(ps, nd); } else if(obj->GetType() == "ReferenceModel") { auto refmdObj = dynamic_cast<DiRefModelObj*>(obj); refmdObj->Save(root); } }); xmlfile->Save(fxFileName); SetCurrentFileName(fxFileName); }
void runAllTests(int argc, char const *argv[]){ cute::suite s; s.push_back(CUTE(testIndexSetFrontWithInt)); s.push_back(CUTE(testIndexSetBackWithInt)); s.push_back(CUTE(testIndexSetSizeAfterCreation)); s.push_back(CUTE(testSetAtWithInt)); s.push_back(CUTE(testBracketOperatorFrontWithInt)); s.push_back(CUTE(testBracketOperatorWithInt)); s.push_back(CUTE(testBracketOperatorBackWithInt)); s.push_back(CUTE(testNegativeBracketToPositiveIndex)); s.push_back(CUTE(testIndexSetFrontWithString)); s.push_back(CUTE(testIndexSetBackWithString)); s.push_back(CUTE(testSetAtWithString)); s.push_back(CUTE(testBracketOperatorFrontWithString)); s.push_back(CUTE(testBracketOperatorWithString)); s.push_back(CUTE(testBracketOperatorBackWithString)); s.push_back(CUTE(testNegativeBracketToPositiveIndexString)); s.push_back(CUTE(testNegativeIndexBorder)); s.push_back(CUTE(testPositiveIndexBorder)); s.push_back(CUTE(testNestedIndexableSets)); s.push_back(CUTE(testDefaultConstructor)); s.push_back(CUTE(testRangeConstructor)); s.push_back(CUTE(testCopyConstructor)); s.push_back(CUTE(testCaselessCompare)); s.push_back(CUTE(testMoveConstructor)); cute::xml_file_opener xmlfile(argc,argv); cute::xml_listener<cute::ide_listener<> > lis(xmlfile.out); cute::makeRunner(lis,argc,argv)(s, "AllTests"); }
void runAllTests(int argc, char const *argv[]){ cute::suite s; s.push_back(CUTE(testoutputOfSwitch)); cute::xml_file_opener xmlfile(argc,argv); cute::xml_listener<cute::ide_listener<> > lis(xmlfile.out); cute::makeRunner(lis,argc,argv)(s, "AllTests"); }
void System3d::saveCalibrationXML(string filename) { if(filename.length() > 5) { if( filename.substr(filename.length()-4) == ".xml" ) { FileStorage xmlfile(filename, FileStorage::WRITE); xmlfile << "chessboard_pattern_parameters" << "{" << "horizontal" << 0.0988 << "vertical" << 0.0994 << "}" ; if( pmdPoints.size() == webcamPoints.size() ) { xmlfile << "detected_corners" << "["; for(int i=0; i<pmdPoints.size(); i++) { xmlfile << "{" << "IFMcam_corners" << "[" << pmdPoints[i] << "]"; xmlfile << "webcam_corners" << "[" << webcamPoints[i] << "]" << "}"; } xmlfile << "]"; } xmlfile.release(); } else cout << "Error: wrong file name\n"; } else cout << "Error: wrong file name\n"; }
void MOOSAppDocumentation::loadXML() { string repository_path = getRepositoryPath(); string doc_path = repository_path + "/src/app/" + m_moosapp_name + "/" + m_moosapp_name + ".xml"; // Test file existance with ifstream ifstream xmlfile(doc_path.c_str()); if(!xmlfile) { red(" ERROR: unable to load " + m_moosapp_name + ".xml documentation file."); blk(" Please check file existance at:"); blk(" " + doc_path + "\n"); exit(0); } // Test XML validity string item_error = ""; m_xml_doc = new XMLDocument(); if(m_xml_doc->LoadFile(doc_path.c_str()) != XML_NO_ERROR || !parseXML(item_error)) { red(" ERROR: unable to load " + m_moosapp_name + ".xml documentation file."); if(item_error != "") blk(" Unable to read <" + item_error + ">"); blk(" Please check XML validity at:"); blk(" " + doc_path + "\n"); exit(0); } }
void tst_ICheck::doTests() { QString msg; QString xmltestfile = getTestFileFolder(); xmltestfile += "/Test.xml"; QFile xmlfile(xmltestfile); bool failed = false; if (xmlfile.exists()){ QDomDocument document; if (document.setContent(&xmlfile)) { QDomElement rootnd = document.documentElement(); if(rootnd.isElement()){ QDomNodeList nodeList = rootnd.childNodes(); for(int i = 0; i < nodeList.count(); i++){ QDomNode nd = nodeList.at(i); TestCase test(nd); if(!test.run()){ QWARN(test.getErrorMsg().toLatin1()); failed = true; } } } } } else { QFAIL ( QString(xmltestfile + " file not found").toLatin1() ); } if(failed) QFAIL ( "Test failed, please read warnings!" ); }
void runAllTests(int argc, char const *argv[]){ cute::suite s; //TODO add your test here s.push_back(CUTE(ZeroethFibonacciNumberIsZero)); cute::xml_file_opener xmlfile(argc,argv); cute::xml_listener<cute::ide_listener<> > lis(xmlfile.out); cute::makeRunner(lis,argc,argv)(s, "AllTests"); }
void ImpTradeSession::start(const std::string &sessionName, const std::string &account, const std::string &accPassword, TradeAPI::EventReceiverPtr &receiver) { std::unique_lock<std::mutex> lck(_mtx_ss); // check if thread is running if (_session_manager) throw TradeAPI::api_issue_error("Session has started."); // init params boost::filesystem::path xmlfile(boost::filesystem::initial_path().append("JZXInterface.xml")); if (boost::filesystem::exists(xmlfile)) { namespace pt = boost::property_tree; pt::ptree tree; try { pt::read_xml(xmlfile.string(), tree); _startTime = tree.get(sessionName + ".StartTime", _startTime); _endTime = tree.get(sessionName + ".EndTime", _endTime); _storePath = tree.get<std::string>(sessionName + ".StorePath"); _heartBtInt = tree.get(sessionName + ".HeartBtInt", 10); _numOfTraders = tree.get(sessionName + ".NumOfTraders", 1); _szServerName = tree.get<std::string>(sessionName + ".szServerName"); _nProtocol = tree.get(sessionName + ".nProtocol", 0); _szAddress = tree.get<std::string>(sessionName + ".szAddress"); _nPort = tree.get(sessionName + ".nPort", 0); _szSendQName = tree.get<std::string>(sessionName + ".szSendQName"); _szReceiveQName = tree.get<std::string>(sessionName + ".szReceiveQName"); _szReserved = tree.get<std::string>(sessionName + ".szReserved"); _timeout = tree.get(sessionName + ".Timeout", 0); _encryptType = tree.get(sessionName + ".EncryptType", 0); _orgid = tree.get<std::string>(sessionName + ".orgid"); _operway = tree.get<std::string>(sessionName + ".operway"); _netaddr = tree.get<std::string>(sessionName + ".netaddr"); _username = tree.get<std::string>(sessionName + ".UserName"); _password = tree.get<std::string>(sessionName + ".Password"); _SHA = tree.get<std::string>(sessionName + ".SHA"); _SZA = tree.get<std::string>(sessionName + ".SZA"); } catch (std::exception &e) { throw TradeAPI::api_issue_error(std::string("Load config file error:") + e.what()); } } // set event receiver _event_receiver = receiver; _sessionName = sessionName; _account = account; _accountPassword = accPassword; _worker_running = true; // start traders if (_numOfTraders > 10) _numOfTraders = 10; for (int i = 0; i < _numOfTraders; i++) { _traders.push_back(THREADPTR(new std::thread(&ImpTradeSession::trader_procedure, this))); } // start thread _session_manager.reset(new std::thread(&ImpTradeSession::session_manager_procedure, this)); }
void runAllTests(int argc, char const *argv[]){ cute::suite s; //TODO add your test here s.push_back(CUTE(thisIsATest)); s.push_back(CUTE(ReadTemperatureAndHunidityTest)); cute::xml_file_opener xmlfile(argc,argv); cute::xml_listener<cute::ide_listener<> > lis(xmlfile.out); cute::makeRunner(lis,argc,argv)(s, "AllTests"); }
void runAllTests(int argc, char const *argv[]){ cute::suite s; //TODO add your test here s.push_back(CUTE(shouldPrintSimpleTable)); s.push_back(CUTE(shouldLookLikeLoopGenerated)); cute::xml_file_opener xmlfile(argc,argv); cute::xml_listener<cute::ide_listener<> > lis(xmlfile.out); cute::makeRunner(lis,argc,argv)(s, "AllTests"); }
void odkFormReader::processXML(QString inputFile, QString mainTable) { tables.clear(); treeItems.clear(); doc = QDomDocument("ODKDocument"); QFile xmlfile(inputFile); if (!xmlfile.open(QIODevice::ReadOnly)) return; if (!doc.setContent(&xmlfile)) { xmlfile.close(); return; } xmlfile.close(); QDomNodeList list; QDomElement item; QDomNode node; QDomElement mainInstance; list = doc.elementsByTagName("instance"); if (list.count() > 0) { int pos; for (pos = 0; pos <= list.count()-1;pos++) { item = list.item(pos).toElement(); if (item.attribute("id","NONE") == "NONE") { mainInstance = item; break; } } } item = mainInstance.firstChild().toElement(); surveyID =item.tagName(); list = doc.elementsByTagName("h:body"); if (list.count() > 0) { node = list.item(0).firstChild(); TtableDef nulltable; nulltable.name = "NULL"; extractFields(node,mainTable,nulltable,"main",surveyID); } //Now that we have the list of tables we move the list into a tree }
bool runAllTests(int argc, char const *argv[]) { cute::suite s { }; //TODO add your test here s.push_back(CUTE(test_two_is_prime)); s.push_back(CUTE(test_print_primes_up_to_two)); cute::xml_file_opener xmlfile(argc, argv); cute::xml_listener<cute::ide_listener<>> lis(xmlfile.out); auto runner { cute::makeRunner(lis, argc, argv) }; bool success = runner(s, "AllTests"); return success; }
void runAllTests(int argc, char const *argv[]) { cute::suite s { }; s.push_back(CUTE(constructorEmpty)); s.push_back(CUTE(constructorInitList)); s.push_back(CUTE(constructorCntValue)); s.push_back(CUTE(constructorIterator)); cute::xml_file_opener xmlfile(argc, argv); cute::xml_listener<cute::ide_listener<> > lis(xmlfile.out); cute::makeRunner(lis, argc, argv)(s, "AllTests"); }
void runAllTests(int argc, char const *argv[]) { cute::suite s; s.push_back(CUTE(shouldSumZeroes)); s.push_back(CUTE(shouldSumOneNumber)); s.push_back(CUTE(shouldSumTwoNumbersOnTwoLines)); s.push_back(CUTE(shouldSumTwoNumbers)); s.push_back(CUTE(shouldSumOneNegativeNumber)); s.push_back(CUTE(shouldSumTwoNegativeNumbers)); cute::xml_file_opener xmlfile(argc,argv); cute::xml_listener<cute::ide_listener<> > lis(xmlfile.out); cute::makeRunner(lis,argc,argv)(s, "AllTests"); }
void runAllTests(int argc, char const *argv[]){ cute::suite s; //TODO add your test here s.push_back(CUTE(testFizzBuzzSequenceUpTo16)); s.push_back(CUTE(fizzBuzzSingle1)); s.push_back(CUTE(FizzBuzzSingleFizz)); s.push_back(CUTE(FizzBuzzSingleBuzz)); s.push_back(CUTE(FizzBuzzSequenceToBuzz)); cute::xml_file_opener xmlfile(argc,argv); cute::xml_listener<cute::ide_listener<> > lis(xmlfile.out); cute::makeRunner(lis,argc,argv)(s, "AllTests"); }
void runAllTests(int argc, char const *argv[]) { cute::suite s; s.push_back(CUTE(longreadlntest)); s.push_back(CUTE(emptyreadlntest)); s.push_back(CUTE(failedreadlntest)); s.push_back(CUTE(successfulreadlntestwithoutlineend)); s.push_back(CUTE(readlnwithstringconsumestoeol)); s.push_back(CUTE(testNonStringAtEnd)); cute::xml_file_opener xmlfile(argc, argv); cute::xml_listener<cute::ide_listener<> > lis(xmlfile.out); cute::makeRunner(lis, argc, argv)(s, "AllTests"); }
void CMainDlg::OnBtnClick_Project_File_Add() { CNewFileDlg dlg(this); if(!m_strPrjPath.IsEmpty() && IDOK==dlg.DoModal()) { xml_document xmlDoc; if(!xmlDoc.load_file(m_strPrjIndex)) return; xml_node xmlRoot = xmlDoc.child(L"resource"); if(!xmlRoot) { return; } xml_node xmlType=xmlRoot.child(S_CT2W(dlg.m_strResType)); xml_node xmlNode=xmlType.child(L"file"); SStringW strName = S_CT2W(dlg.m_strResName); while(xmlNode) { if(xmlNode.attribute(L"name").value() == strName) { break; } xmlNode = xmlNode.next_sibling(L"file"); } if(xmlNode) {//检查type,name重复 SMessageBox(GetActiveWindow(),_T("指定的资源名重复"),_T("错误"),MB_OK|MB_ICONSTOP); return; } BuildFilePath(m_strPrjPath,dlg.m_strResPath,FALSE); CopyFile(dlg.m_strSrcFile,m_strPrjPath+_T("\\")+dlg.m_strResPath,FALSE); //改写XML文件 if(!xmlType) { xmlType = xmlRoot.append_child(S_CT2W(dlg.m_strResType)); } xmlNode = xmlType.append_child(L"file"); xmlNode.append_attribute(L"name").set_value(S_CT2W(dlg.m_strResName)); xmlNode.append_attribute(L"path").set_value(S_CT2W(dlg.m_strResPath)); FILE *f=_tfopen(m_strPrjIndex,_T("wb")); if(f) { xml_writer_file xmlfile(f); xmlDoc.print(xmlfile); fclose(f); OpenProject(m_strPrjIndex); } } }
void runAllTests(int argc, char const *argv[]){ cute::suite s; s.push_back(CUTE(testForAddition)); s.push_back(CUTE(testForSubstraction)); s.push_back(CUTE(testForMultiplication)); s.push_back(CUTE(testForDivision)); s.push_back(CUTE(testForInvalidArguments)); s.push_back(CUTE(testForModulo)); s.push_back(CUTE(testInputStream)); cute::xml_file_opener xmlfile(argc,argv); cute::xml_listener<cute::ide_listener<> > lis(xmlfile.out); cute::makeRunner(lis,argc,argv)(s, "AllTests"); }
void SpellDatabase::loadSpells(char * filename) { file<> xmlfile(filename); xml_document<> doc; doc.parse<0>(xmlfile.data()); Spell spell; for (xml_node<> *node = doc.first_node();node;node=node->next_sibling()) { spell = Spell(); spell.xml_read(&doc,&*node); spells.push_back(spell); } }
void runAllTests(int argc, char const *argv[]){ cute::suite s; //TODO add your test here s.push_back(CUTE(testInitialValue)); s.push_back(CUTE(testSpecifiedStartValue)); s.push_back(CUTE(testAddValue)); cute::xml_file_opener xmlfile(argc,argv); cute::xml_listener<cute::ide_listener<> > lis(xmlfile.out); cute::makeRunner(lis,argc,argv)(s, "AllTests"); }
void runAllTests(int argc, char const *argv[]){ cute::suite s; s.push_back(CUTE(test_empty)); s.push_back(CUTE(test_not_empty)); s.push_back(CUTE(test_insert_contains)); s.push_back(CUTE(test_not_contains)); s.push_back(CUTE(test_insert_duplicate_throws)); s.push_back(CUTE(test_clear)); s.push_back(CUTE(test_find)); s.push_back(CUTE(test_begin)); s.push_back(CUTE(test_iterator)); cute::xml_file_opener xmlfile(argc,argv); cute::xml_listener<cute::ide_listener<> > lis(xmlfile.out); cute::makeRunner(lis,argc,argv)(s, "AllTests"); }
bool runAllTests(int argc, char const *argv[]) { cute::suite s { }; //TODO add your test here s.push_back(CUTE(test_woccurrence_with_empty_input)); s.push_back(CUTE(test_woccurrence_with_one_input_word)); s.push_back(CUTE(test_woccurrence_with_two_input_words)); s.push_back(CUTE(test_wordoccurrence_with_one_word_on_multiple_lines)); s.push_back(CUTE(test_wordoccurrence_with_exercise_example_input)); s.push_back(CUTE(test_wordoccurrence_with_lorem_ipsum_input)); cute::xml_file_opener xmlfile(argc, argv); cute::xml_listener<cute::ide_listener<>> lis(xmlfile.out); auto runner { cute::makeRunner(lis, argc, argv) }; bool success = runner(s, "AllTests"); return success; }
void runAllTests(int argc, char const *argv[]){ cute::suite s; s.push_back(CUTE(shouldPrintZero)); s.push_back(CUTE(shouldPrintOne)); s.push_back(CUTE(shouldPrintTwo)); s.push_back(CUTE(shouldPrintThree)); s.push_back(CUTE(shouldPrintFour)); s.push_back(CUTE(shouldPrintFive)); s.push_back(CUTE(shouldPrintSix)); s.push_back(CUTE(shouldPrintSeven)); s.push_back(CUTE(shouldPrintEight)); s.push_back(CUTE(shouldPrintNine)); cute::xml_file_opener xmlfile(argc,argv); cute::xml_listener<cute::ide_listener<> > lis(xmlfile.out); cute::makeRunner(lis,argc,argv)(s, "AllTests"); }
void runAllTests(int argc, char const *argv[]){ cute::suite s; //TODO add your test here s.push_back(CUTE(test_module_nodeps)); s.push_back(CUTE(test_module_deps)); s.push_back(CUTE(test_deep_name_comare)); s.push_back(CUTE(testinput)); s.push_back(CUTE(testLevel1)); s.push_back(CUTE(testLevel2)); s.push_back(CUTE(testLevel3)); s.push_back(CUTE(testLevel4)); s.push_back(CUTE(testLevel5)); //s.push_back(CUTE(testLevel2)); cute::xml_file_opener xmlfile(argc,argv); cute::xml_listener<cute::ide_listener<> > lis(xmlfile.out); cute::makeRunner(lis,argc,argv)(s, "AllTests"); }
bool CFrameWndFactory::CreateFrameWnd(LPCWSTR factoryFile) { CXTPWinDwmWrapper().SetProcessDPIAware(); // Support high DPI on Vista or above. std::wstring xtpfile(getTranslationsPath(L"ToolkitPro.Resource.xml")); if (PathFileExistsW(xtpfile.c_str())) XTPResourceManager()->SetResourceFile(xtpfile.c_str()); else TRACE1("Warning: no translation file '%s'\n", xtpfile.c_str()); Object<IConfigXml> xmlfile(x3::clsidXmlFile); ASSERT_MESSAGE(xmlfile, "Need the configxml plugin."); xmlfile->SetFileName((getConfigPath() + factoryFile).c_str()); ASSERT_MESSAGE(xmlfile->Reload(), "No xml file or need to setup MSXML4."); ConfigSection root(xmlfile->GetData()->GetSection(L"")); ConfigSection mainframe(root.GetSection(L"mainframe")); bool mdi = root->GetBool(L"mdi", false); g_factoryRoot = root; g_factoryRoot->SetString(L"_appid", m_appid.c_str()); Object<IUIOptionsInit> initOptions(clsidUIOptions); initOptions->setFileName((getConfigPath() + root->GetString(L"optionsFile", L"uioptions.xml")).c_str()); RegisterDocTemplate(mdi, mainframe, root.GetSection(L"views")); if (mdi) { CMainMDIFrame* pFrame = new CMainMDIFrame; if (!pFrame->LoadFrame(0)) return FALSE; std::vector<ViewItem>::const_iterator it = s_views.begin(); for (; it != s_views.end(); ++it) { if (!it->caption.empty()) { CDocument* pDoc = it->pTemplate->OpenDocumentFile(NULL); pDoc->SetTitle(it->caption.c_str()); } } } return ProcessShellCommand(); }
void runAllTests(int argc, char const *argv[]){ cute::suite s; s.push_back(CUTE(testDefaultCtor)); s.push_back(CUTE(testValueCtor)); s.push_back(CUTE(testValueCtorWithLargeInput)); s.push_back(CUTE(testAddition)); s.push_back(CUTE(testAdditionWrap)); s.push_back(CUTE(testOutputOperator)); s.push_back(CUTE(testMultiplication)); s.push_back(CUTE(testAdditionWithInt)); s.push_back(CUTE(testAssignmentBackToInt)); s.push_back(CUTE(testAdditionWithIntExplicitCtor)); s.push_back(CUTE(testAssignmentBackToIntExplicitCtor)); cute::xml_file_opener xmlfile(argc,argv); cute::xml_listener<cute::ide_listener<> > lis(xmlfile.out); cute::makeRunner(lis,argc,argv)(s, "AllTests"); }
void runAllTests(int argc, char const *argv[]) { cute::suite s { }; //My tests s.push_back(CUTE(test_create_dyArray_no_args)); s.push_back(CUTE(test_create_dyArray_init_list)); s.push_back(CUTE(test_create_dyArray_eql_val)); s.push_back(CUTE(test_create_dyArray_istr_iter)); s.push_back(CUTE(test_create_dynArray_iter)); s.push_back(CUTE(test_at_func)); s.push_back(CUTE(test_at_func_lval)); s.push_back(CUTE(test_at_func_const)); s.push_back(CUTE(test_at_func_neg_index)); s.push_back(CUTE(test_oper_sqr_brac_lval)); s.push_back(CUTE(test_oper_sqr_brac_neg_index)); s.push_back(CUTE(test_oper_sqr_brac_const)); s.push_back(CUTE(test_func_front)); s.push_back(CUTE(test_func_front_lval)); s.push_back(CUTE(test_func_front_const)); s.push_back(CUTE(test_func_back)); s.push_back(CUTE(test_func_back_lval)); s.push_back(CUTE(test_func_back_const)); s.push_back(CUTE(test_func_capacity)); s.push_back(CUTE(test_func_clear)); s.push_back(CUTE(test_func_push_back)); s.push_back(CUTE(test_func_pop_back)); s.push_back(CUTE(test_func_resize_bigger)); s.push_back(CUTE(test_func_resize_smaller)); s.push_back(CUTE(test_func_resize_values)); s.push_back(CUTE(test_rand_acc_iter)); s.push_back(CUTE(test_rand_acc_iter_const)); s.push_back(CUTE(test_const_rand_acc_iter_const)); s.push_back(CUTE(test_rev_iter)); s.push_back(CUTE(test_rev_iter_const)); s.push_back(CUTE(test_const_rev_iter_const)); s.push_back(CUTE(test_func_erase)); s.push_back(CUTE(test_func_erase_cont_iter)); s.push_back(CUTE(test_func_erase_two_iter)); s.push_back(CUTE(test_func_erase_two_const_iter)); s.push_back(CUTE(test_make_dynArray)); cute::xml_file_opener xmlfile(argc, argv); cute::xml_listener<cute::ide_listener<> > lis(xmlfile.out); cute::makeRunner(lis, argc, argv)(s, "AllTests"); }
void runAllTests(int argc, char const *argv[]){ cute::suite s; s.push_back(CUTE(test_empty)); s.push_back(CUTE(test_not_empty)); s.push_back(CUTE(test_single_insert_front)); s.push_back(CUTE(test_latest_insert_front)); s.push_back(CUTE(test_multiple_insert_latest_front)); s.push_back(CUTE(test_begin_end_equal_with_empty_list)); s.push_back(CUTE(test_begin_end_unequal_with_element_in_list)); s.push_back(CUTE(test_begin)); s.push_back(CUTE(test_iterator)); s.push_back(CUTE(test_asVector)); s.push_back(CUTE(test_range_inserter)); s.push_back(CUTE(test_range_constructor)); cute::xml_file_opener xmlfile(argc,argv); cute::xml_listener<cute::ide_listener<> > lis(xmlfile.out); cute::makeRunner(lis,argc,argv)(s, "AllTests"); }