void LocalStorageBox::prepare() { setTitle(langFactory(lng_local_storage_title)); addButton(langFactory(lng_box_ok), [this] { closeBox(); }); _clear->setClickedCallback([this] { clearStorage(); }); connect(App::wnd(), SIGNAL(tempDirCleared(int)), this, SLOT(onTempDirCleared(int))); connect(App::wnd(), SIGNAL(tempDirClearFailed(int)), this, SLOT(onTempDirClearFailed(int))); subscribe(Auth().downloaderTaskFinished(), [this] { update(); }); updateControls(); checkLocalStoredCounts(); }
Foam::isoCutFace::isoCutFace ( const fvMesh& mesh, scalarField& f ) : mesh_(mesh), f_(f), firstEdgeCut_(-1), lastEdgeCut_(-1), firstFullySubmergedPoint_(-1), nFullySubmergedPoints_(0), subFaceCentre_(Zero), subFaceArea_(Zero), subFacePoints_(10), surfacePoints_(4), subFaceCentreAndAreaIsCalculated_(false) { clearStorage(); }
int main (int argc, char ** argv) { printf ("STORAGE TESTS\n"); printf ("==================\n\n"); init (argc, argv); initPlugins (); for (size_t plugin = 0; plugin < numPlugins; ++plugin) { const char * tmpFile = elektraFilename (); printf ("Testing plugin %s\n", pluginNames[plugin]); fprintf (stdout, "Tmp-file: %s\n", tmpFile); // KeySet API tests clearStorage (plugin, tmpFile); test_ksDupFun (plugin, tmpFile, ksDup); clearStorage (plugin, tmpFile); test_ksDupFun (plugin, tmpFile, ksDeepDup); clearStorage (plugin, tmpFile); test_ksCopy (plugin, tmpFile); clearStorage (plugin, tmpFile); test_ksGetSize (plugin, tmpFile); clearStorage (plugin, tmpFile); test_double_get (plugin, tmpFile); // regression test clearStorage (plugin, tmpFile); test_ksAppendKey (plugin, tmpFile); clearStorage (plugin, tmpFile); test_ksAppend (plugin, tmpFile); clearStorage (plugin, tmpFile); test_ksCut (plugin, tmpFile); clearStorage (plugin, tmpFile); test_ksPop (plugin, tmpFile); clearStorage (plugin, tmpFile); test_ksLookup (plugin, tmpFile, 0); clearStorage (plugin, tmpFile); test_ksLookup (plugin, tmpFile, KDB_O_POP); clearStorage (plugin, tmpFile); test_ksLookupByName (plugin, tmpFile, 0); clearStorage (plugin, tmpFile); test_ksLookupByName (plugin, tmpFile, KDB_O_POP); // Key API tests clearStorage (plugin, tmpFile); test_keyFlags (plugin, tmpFile); clearStorage (plugin, tmpFile); test_keyDup (plugin, tmpFile); clearStorage (plugin, tmpFile); test_keyCopy_newKey (plugin, tmpFile); clearStorage (plugin, tmpFile); test_keyCopy_clearOverwriteKey (plugin, tmpFile); clearStorage (plugin, tmpFile); test_keyDel (plugin, tmpFile); clearStorage (plugin, tmpFile); test_keyClear (plugin, tmpFile); // Key Name API tests clearStorage (plugin, tmpFile); test_keyName (plugin, tmpFile); clearStorage (plugin, tmpFile); test_keySetName (plugin, tmpFile); clearStorage (plugin, tmpFile); test_keyGetFullName (plugin, tmpFile); clearStorage (plugin, tmpFile); test_keyGetBaseName (plugin, tmpFile); // Key Value API tests clearStorage (plugin, tmpFile); test_keyValue (plugin, tmpFile); clearStorage (plugin, tmpFile); test_keyString (plugin, tmpFile); clearStorage (plugin, tmpFile); test_keyGetBinary (plugin, tmpFile); clearStorage (plugin, tmpFile); test_keyGetString (plugin, tmpFile); clearStorage (plugin, tmpFile); test_keySetBinary (plugin, tmpFile); clearStorage (plugin, tmpFile); test_keySetString (plugin, tmpFile); } printf ("\ntest_storage RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError); return nbError; }
int main (int argc, char ** argv) { printf ("MMAPSTORAGE TESTS\n"); printf ("==================\n\n"); init (argc, argv); testDynArray (); const char * tmpFile = elektraFilename (); // call once before clearStorage, to test non existent file test_mmap_get_set (tmpFile); clearStorage (tmpFile); test_mmap_truncated_file (tmpFile); test_mmap_wrong_magic_number (tmpFile); test_mmap_wrong_format_version (tmpFile); test_mmap_wrong_magic_keyset (tmpFile); clearStorage (tmpFile); test_mmap_get_set_empty (tmpFile); clearStorage (tmpFile); test_mmap_get_set (tmpFile); clearStorage (tmpFile); test_mmap_set_get (tmpFile); test_mmap_get_after_reopen (tmpFile); test_mmap_set_get_large_keyset (tmpFile); test_mmap_ks_copy (tmpFile); clearStorage (tmpFile); test_mmap_empty_after_clear (tmpFile); test_mmap_meta (tmpFile); test_mmap_meta_get_after_reopen (tmpFile); test_mmap_metacopy (tmpFile); clearStorage (tmpFile); test_mmap_ks_copy_with_meta (tmpFile); clearStorage (tmpFile); test_mmap_opmphm (tmpFile); clearStorage (tmpFile); test_mmap_ksDupFun (tmpFile, ksDup); clearStorage (tmpFile); test_mmap_ksDupFun (tmpFile, ksDeepDup); clearStorage (tmpFile); test_mmap_ksCopy (tmpFile); test_mmap_open_pipe (); test_mmap_bad_file_permissions (tmpFile); test_mmap_unlink (tmpFile); printf ("\ntestmod_mmapstorage RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError); return nbError; }