void test3(void) { map<string, string> mapIS; cout << "Init 3, 4, 5." << mapIS["3"] << mapIS["4"] << mapIS["5"] << "\n\tResults:" << endl; dumpMapReverse(mapIS); mapIS["4"] = "middle"; cout << "\nForced 4 set." << "\n\tResults:" << endl; dumpMapReverse(mapIS); cout << endl; auto itL(mapIS.lower_bound("4")); cout << "std::map::lower_bound(\"4\") := \"4\"\n\t[" << itL->first << "] " << itL->second << endl; string testS("3"); testS.append("\377\377\377"); //$c(255,255,255) auto itU(mapIS.upper_bound(testS)); cout << "std::map::upper_bound(\"3\" + $c(255,255,255)) := \"4\"\n\t[" << itU->first << "] " << itU->second << endl; }
void test3(void) { map<string, string> mapIS; cout << "Init 3, 4, 5." << mapIS["3"] << mapIS["4"] << mapIS["5"] << "\n\tResults:" << endl; dumpMapReverse(mapIS); mapIS.erase(begin(mapIS), begin(mapIS)); // does nothing //cout << "\nErase \"3\" " << (mapIS.erase("3") ? "found" : ""); //cout << "\nErase \"44\" " << (mapIS.erase("44") ? "found" : "NOT found") << flush; mapIS["4"] = "middle"; cout << "\nForced 4 set." << "\n\tResults:" << endl; dumpMapReverse(mapIS); cout << endl; auto itL(mapIS.lower_bound("4")); cout << "std::map::lower_bound(\"4\") := \"4\"\n\t[" << itL->first << "] " << itL->second << endl; string testS("3"); testS.append("\377\377\377"); //$c(255,255,255) auto itU(mapIS.upper_bound(testS)); cout << "std::map::upper_bound(\"3\" + $c(255,255,255)) := \"4\"\n\t[" << itU->first << "] " << itU->second << endl; }
int main (void) { testA (); testB (); testC (); testD (); testE (); testF (); testG (); testH (); testI (); testJ (); testK (); testL (); testM (); testN (); testO (); testP (); testQ (); testR (); testS (); testT (); testU (); testV (); /* testW (); testX (); testY (); testZ (); */ exit (0); }
int main(int argc , char ** argv) { util_install_signals(); { const char * config_file = argv[1]; ert_test_context_type * test_context = ert_test_context_alloc( "ENKF_OBS_FS" , config_file ); { testS( test_context ); test_iget( test_context ); test_container( test_context ); } ert_test_context_free( test_context ); exit(0); } }