diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-11-24 14:10:04 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-11-24 14:10:04 +0100 |
commit | 25711a9a384c31f870d6d9ce6fbd0b0c18824c5e (patch) | |
tree | efa2feb4baa1fc606e072eb3cb3d0b48ba7711fd /registry | |
parent | 5a9dc6e8452cec6068a30bb8d7f6edbeacd3174d (diff) |
Remove dead registry/workben/ stuff
Change-Id: Ie777efded5a5ebe3aad8d2310e174e6f32a21bc3
Diffstat (limited to 'registry')
-rw-r--r-- | registry/workben/makefile.mk | 77 | ||||
-rw-r--r-- | registry/workben/regspeed.cxx | 257 | ||||
-rw-r--r-- | registry/workben/regtest.cxx | 331 | ||||
-rw-r--r-- | registry/workben/test.cxx | 45 |
4 files changed, 0 insertions, 710 deletions
diff --git a/registry/workben/makefile.mk b/registry/workben/makefile.mk deleted file mode 100644 index 7d904645fef3..000000000000 --- a/registry/workben/makefile.mk +++ /dev/null @@ -1,77 +0,0 @@ -# -# This file is part of the LibreOffice project. -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# This file incorporates work covered by the following license notice: -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed -# with this work for additional information regarding copyright -# ownership. The ASF licenses this file to you under the Apache -# License, Version 2.0 (the "License"); you may not use this file -# except in compliance with the License. You may obtain a copy of -# the License at http://www.apache.org/licenses/LICENSE-2.0 . -# - -PRJ=.. - -PRJNAME=registry -TARGET=regtest -TARGETTYPE=CUI -LIBTARGET=NO - -ENABLE_EXCEPTIONS := TRUE - -# --- Settings ----------------------------------------------------- -.INCLUDE : settings.mk - -# --- Files -------------------------------------------------------- -CDEFS += -DDLL_VERSION=$(EMQ)"$(DLLPOSTFIX)$(EMQ)" - -RGTLIB = rgt.lib -.IF "$(OS)"!="WNT" -RGTLIB = -lrgt$(DLLPOSTFIX) -.ENDIF - - -CXXFILES= regtest.cxx \ - test.cxx \ - regspeed.cxx - - -APP1TARGET= $(TARGET) -APP1OBJS= $(OBJ)$/regtest.obj - -APP1STDLIBS=\ - $(SALLIB) \ - $(REGLIB) - -APP2TARGET= test -APP2OBJS= $(OBJ)$/test.obj -APP2RPATH=NONE -.IF "$(OS)"!="WNT" && "$(OS)"!="MACOSX" - -.IF "$(OS)"=="LINUX" || "$(OS)"=="FREEBSD" -APP2LINKFLAGS=-Wl,-z,origin -Wl,-rpath,\''$$ORIGIN:$$ORIGIN/../lib'\' -.ENDIF - -.IF "$(OS)"=="SOLARIS" -APP2LINKFLAGS=-R\''$$ORIGIN/../lib:$$ORIGIN'\' -.ENDIF - -.ENDIF # "$(OS)"=="UNX" - -APP2STDLIBS=\ - $(RGTLIB) - -APP3TARGET= regspeed -APP3OBJS= $(OBJ)$/regspeed.obj - -APP3STDLIBS=\ - $(SALLIB) \ - $(REGLIB) - -.INCLUDE : target.mk diff --git a/registry/workben/regspeed.cxx b/registry/workben/regspeed.cxx deleted file mode 100644 index cce5234c49e2..000000000000 --- a/registry/workben/regspeed.cxx +++ /dev/null @@ -1,257 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - - -#include <iostream> -#include <stdio.h> -#include <stdlib.h> -#include <time.h> -#include <sys/timeb.h> -#include <sys/types.h> - -#include "registry/registry.h" -#include <rtl/ustring.hxx> -#include <rtl/alloc.h> - -using namespace std; - -/***************************************************************** - MyTimer -*****************************************************************/ -#ifndef UNX -class MyTimer -{ -public: - void start() { _ftime( &m_start ); }; - void stop() - { - _ftime( &m_stop ); - m_diff = difftime(m_stop.time, m_start.time); - if (m_stop.millitm > m_start.millitm) - { - m_diff += ((double)(m_stop.millitm - m_start.millitm)) / 1000; - } - else - { - m_diff -= 1; - m_diff += ((double)(1000 - (m_start.millitm - m_stop.millitm))) / 1000; - } - printf(" %.4f Sekunden\n", m_diff); - }; - -protected: - struct _timeb m_start, m_stop; - double m_diff; -}; -#else -extern "C" int ftime(struct timeb *pt); - -class MyTimer -{ -public: - void start() { ftime( &m_start ); }; - void stop() - { - ftime( &m_stop ); - m_diff = difftime(m_stop.time, m_start.time); - if (m_stop.millitm > m_start.millitm) - { - m_diff += ((double)(m_stop.millitm - m_start.millitm)) / 1000; - } - else - { - m_diff -= 1; - m_diff += ((double)(1000 - (m_start.millitm - m_stop.millitm))) / 1000; - } - printf(" %.4f Sekunden\n", m_diff); - }; - -protected: - struct timeb m_start, m_stop; - double m_diff; -}; -#endif - - -#if (defined UNX) -int main( int argc, char * argv[] ) -#else -int _cdecl main( int argc, char * argv[] ) -#endif -{ - RegHandle hReg; - RegKeyHandle hRootKey, hKey, hSubKey, hSubSubKey; - OUString sName1("regkey"); - OUString sName2("regSubkey"); - OUString sName3("regSubSubkey"); - OUString keyName1; - OUString keyName2; - OUString keyName3; - int S1 = 10; - int S2 = 10; - int S3 = 10; - MyTimer aTimer; - - if (argc < 4) - { - cerr << "using regspeed count1 count2 count3\n"; - exit(1); - } - - S1 = atoi(argv[1]); - S2 = atoi(argv[2]); - S3 = atoi(argv[3]); - - OUString speedReg( "speed.reg"); - if (reg_createRegistry(speedReg.pData, &hReg)) - { - cout << "creating registry \"test.reg\" failed\n"; - } else - { - if (reg_openRootKey(hReg, &hRootKey)) - { - cout << "open root key \"test.reg\" failed\n"; - } else - { - printf("\n %d keys anlegen, oeffnen und schliessen dauert ... ", (S1 * S2 * S3)); - aTimer.start(); - - for (sal_Int32 i=0; i < S1; i++) - { - keyName1 = sName1; - keyName1 += OUString().valueOf(i); - if (reg_createKey(hRootKey, keyName1.pData, &hKey)) - cout << "creating key \"" << OUStringToOString(keyName1, RTL_TEXTENCODING_ASCII_US).getStr() - << "\" failed\n"; - - for (sal_Int32 j=0; j < S2; j++) - { - keyName2 = sName2; - keyName2 += OUString().valueOf(j); - if (reg_createKey(hKey, keyName2.pData, &hSubKey)) - cout << "creating key \"" << OUStringToOString(keyName2, RTL_TEXTENCODING_ASCII_US).getStr() - << "\" failed\n"; - - for (sal_Int32 n=0; n < S3; n++) - { - keyName3 = sName3; - keyName3 += OUString().valueOf(n); - if (reg_createKey(hSubKey, keyName3.pData, &hSubSubKey)) - cout << "creating key \"" << OUStringToOString(keyName3, RTL_TEXTENCODING_ASCII_US).getStr() - << "\" failed\n"; - - if (reg_closeKey(hSubSubKey)) - cout << "closing key \"" << OUStringToOString(keyName3, RTL_TEXTENCODING_ASCII_US).getStr() - << "\" failed\n"; - } - - if (reg_closeKey(hSubKey)) - cout << "closing key \"" << OUStringToOString(keyName2, RTL_TEXTENCODING_ASCII_US).getStr() - << "\" failed\n"; - } - - if (reg_closeKey(hKey)) - cout << "closing key \"" << OUStringToOString(keyName1, RTL_TEXTENCODING_ASCII_US).getStr() - << "\" failed\n"; - } - - aTimer.stop(); - - printf("\n %d keys oeffnen und schliessen dauert ... ", (S1 * S2 * S3)); - aTimer.start(); - - for (sal_Int32 i=0; i < S1; i++) - { - keyName1 = "/"; - keyName1 += sName1; - keyName1 += OUString().valueOf(i); - if (reg_openKey(hRootKey, keyName1.pData, &hKey)) - cout << "open key \"" << OUStringToOString(keyName1, RTL_TEXTENCODING_ASCII_US).getStr() - << "\" failed\n"; - - for (sal_Int32 j=0; j < S2; j++) - { - keyName2 = "/"; - keyName2 += sName1; - keyName2 += OUString().valueOf(i); - keyName2 += "/"; - keyName2 += sName2; - keyName2 += OUString().valueOf(j); - if (reg_openKey(hRootKey, keyName2.pData, &hSubKey)) - cout << "open key \"" << OUStringToOString(keyName2, RTL_TEXTENCODING_ASCII_US).getStr() - << "\" failed\n"; - - for (sal_Int32 n=0; n < S3; n++) - { - keyName3 = "/"; - keyName3 += sName1; - keyName3 += OUString().valueOf(i); - keyName3 += "/"; - keyName3 += sName2; - keyName3 += OUString().valueOf(j); - keyName3 += "/"; - keyName3 += sName3; - keyName3 += OUString().valueOf(n); - if (reg_openKey(hRootKey, keyName3.pData, &hSubSubKey)) - cout << "open key \"" << OUStringToOString(keyName3, RTL_TEXTENCODING_ASCII_US).getStr() - << "\" failed\n"; - - if (reg_closeKey(hSubSubKey)) - cout << "open key \"" << OUStringToOString(keyName3, RTL_TEXTENCODING_ASCII_US).getStr() - << "\" failed\n"; - } - - if (reg_closeKey(hSubKey)) - cout << "closing key \"" << OUStringToOString(keyName2, RTL_TEXTENCODING_ASCII_US).getStr() - << "\" failed\n"; - } - - if (reg_closeKey(hKey)) - cout << "closing key \"" << OUStringToOString(keyName1, RTL_TEXTENCODING_ASCII_US).getStr() - << "\" failed\n"; - } - - aTimer.stop(); - - printf("\n 1 key oeffnen und schliessen dauert ... "); - aTimer.start(); - - if (reg_openKey(hRootKey, keyName3.pData, &hSubSubKey)) - cout << "open key \"" << OUStringToOString(keyName3, RTL_TEXTENCODING_ASCII_US).getStr() - << "\" failed\n"; - - if (reg_closeKey(hSubSubKey)) - cout << "open key \"" << OUStringToOString(keyName3, RTL_TEXTENCODING_ASCII_US).getStr() - << "\" failed\n"; - - aTimer.stop(); - - } - - if (reg_closeKey(hRootKey)) - cout << "closing root key failed\n"; - if (reg_closeRegistry(hReg)) - cout << "\t41. closing registry \"test.reg\" failed\n"; - } - - return 0; -} - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/registry/workben/regtest.cxx b/registry/workben/regtest.cxx deleted file mode 100644 index cf6b06dfd03e..000000000000 --- a/registry/workben/regtest.cxx +++ /dev/null @@ -1,331 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - - -#include <iostream> -#include <stdio.h> - -#include "registry/registry.h" -#include <rtl/ustring.hxx> -#include <rtl/alloc.h> - -using namespace std; - - -#if (defined UNX) -int main() -#else -int _cdecl main() -#endif -{ - RegHandle hReg; - RegKeyHandle hRootKey, hKey1, hKey2, hKey3, hKey4, hKey5; - - cout << "\n Simple Registry Test !!! \n\n"; - - if (reg_createRegistry(OUString("test4.rdb").pData, &hReg)) - cout << "\t0. creating registry \"test4.rdb\" failed\n"; - else - cout << "0. registry test4.rdb is created\n"; - - if (reg_openRootKey(hReg, &hRootKey)) - cout << "1. open root key \"test4.rdb\" failed\n"; - else - cout << "1. root key of \"test4.rdb\" is opened\n"; - - if (reg_createKey(hRootKey, OUString("myFirstKey").pData, &hKey1)) - cout << "\t2. creating key \"myFirstKey\" failed\n"; - else - cout << "2. key \"myFirstKey\" is created\n"; - if (reg_createKey(hRootKey, OUString("mySecondKey").pData, &hKey2)) - cout << "\t3. creating key \"mySecondKey\" failed\n"; - else - cout << "3. key \"mySecondKey\" is created\n"; - if (reg_createKey(hKey1, OUString("myFirstSubKey").pData, &hKey3)) - cout << "\t4. creating subkey \"myFirstSubKey\" failed\n"; - else - cout << "4. subkey \"myFirstSubKey\" is created\n"; - if (reg_createKey(hKey1, OUString("mySecondSubKey").pData, &hKey4)) - cout << "\t5. creating subkey \"mySecondSubKey\" failed\n"; - else - cout << "5. subkey \"mySecondSubKey\" is created\n"; - if (reg_createKey(hRootKey, OUString("myThirdKey").pData, &hKey5)) - cout << "\t6. creating key \"myThirdKey\" is created\n\n"; - else - cout << "6. key \"myThirdKey\" is created\n\n"; - - - RegKeyHandle* phSubKeys; - sal_uInt32 nSubKeys; - if (reg_openSubKeys(hRootKey, OUString("myFirstKey").pData, &phSubKeys, &nSubKeys)) - cout << "\t7. open subkeys of \"myfirstKey\" failed\n"; - else - cout << "7. open " << nSubKeys << "subkeys of \"myfirstKey\"\n"; - - OUString keyName; - if (reg_getKeyName(phSubKeys[0], &keyName.pData)) - cout << "\tname of subkey 1 = " << OUStringToOString(keyName, RTL_TEXTENCODING_ASCII_US).getStr() << "\n"; - if (reg_getKeyName(phSubKeys[1], &keyName.pData)) - cout << "\tname of subkey 2 = " << OUStringToOString(keyName, RTL_TEXTENCODING_ASCII_US).getStr() << "\n"; - - if (reg_closeSubKeys(phSubKeys, nSubKeys)) - cout << "\t8. close subkeys of \"myfirstKey\" failed\n\n"; - else - cout << "8. close " << nSubKeys << "subkeys of \"myfirstKey\"\n\n"; - - - char* Value=(char*)"Mein erster Value"; - if (reg_setValue(hRootKey, OUString("mySecondKey").pData, RegValueType::STRING, Value, 18)) - cout << "\t9. setValue of key \"mySecondKey\" failed\n"; - else - cout << "9. setValue (string Value) of key \"mySecondKey\"\n"; - - RegValueType valueType; - sal_uInt32 valueSize; - sal_Char* readValue; - if (reg_getValueInfo(hRootKey, OUString("mySecondKey").pData, &valueType, &valueSize)) - cout << "\t10. getValueInfo of key \"mySecondKey\" failed\n"; - else - cout << "10. getValueInfo of key \"mySecondKey\"\n"; - - readValue = (sal_Char*)rtl_allocateMemory(valueSize); - if (reg_getValue(hKey2, OUString().pData, readValue)) - cout << "\t11. getValue of key \"mySecondKey\" failed\n"; - else - { - cout << "11. getValue of key \"mySecondKey\"\n"; - - cout << "read Value,\n\tvalueType = " << (long)valueType - << "\n\tvalueSize = " << valueSize - << "\n\tvalue = " << readValue << "\n\n"; - } - rtl_freeMemory(readValue); - - if (reg_closeKey(hKey1) || - reg_closeKey(hKey3) || - reg_closeKey(hKey4)) - cout << "\t12. closing \"myFirstKey\" \"myfistSubKey\" \"mySecondSubKey\" failed\n"; - else - cout << "12. keys \"myFirstKey\" \"myfistSubKey\" \"mySecondSubKey\" are closed\n"; - - if (reg_deleteKey(hRootKey, OUString("myFirstKey").pData)) - cout << "13.\t delete key \"myFirstKey\" failed\n"; - else - cout << "13. key \"myFirstKey\" is deleted\n"; - - if (reg_closeKey(hKey2)) - cout << "\t14. closing key \"mySecondKey\" failed\n"; - else - cout << "14. key \"mySecondKey\" is closed\n"; - - if (reg_openKey(hRootKey, OUString("mySecondKey").pData, &hKey2)) - cout << "\n15. open key \"mySecondKey\" failed\n"; - else - cout << "15. key \"mySecondKey\" is opended\n"; - - if (reg_closeKey(hKey5)) - cout << "\t15. closing key \"myThirdSubKey\" failed\n"; - else - cout << "15. key \"myThirdSubKey\" is closed\n"; - if (reg_deleteKey(hRootKey, OUString("myThirdKey").pData)) - cout << "\t16. delete key \"myThirdKey\" failed\n"; - else - cout << "16. key \"myThirdKey\" is deleted\n"; - - if (reg_openKey(hRootKey, OUString("myThirdKey").pData, &hKey5)) - cout << "\t17. open key \"myThirdKey\" failed\n"; - else - cout << "17. key \"myThirdKey\" is opened\n"; - - cout << "\n close open keys\n\n"; - - if (reg_closeKey(hKey2)) - cout << "\t18. closing key \"mySecondKey\" failed\n"; - else - cout << "18. key \"mySecondKey\" is closed\n"; - - if (reg_closeKey(hRootKey)) - cout << "\t19. closing root key failed\n"; - else - cout << "19. root key is closed\n"; - - if (reg_closeRegistry(hReg)) - cout << "\t20. closing registry \"test4.rdb\" failed\n"; - else - cout << "20. registry \"test4.rdb\" is closed\n"; - - // Test loadkey - cout << "\nTest load key\n\n"; - - RegHandle hReg2; - RegKeyHandle hRootKey2, h2Key1, h2Key2, h2Key3, h2Key4, h2Key5; - - if (reg_createRegistry(OUString("test5.rdb").pData, &hReg2)) - cout << "\t21. creating registry \"test5.rdb\" failed\n"; - else - cout << "21. registry \"test5.rdb\" is created\n"; - - if (reg_openRootKey(hReg2, &hRootKey2)) - cout << "\t22. open root key of \"test5.rdb\" failed\n"; - else - cout << "22. root key of \"test5.rdb\" is opened\n"; - - if (reg_createKey(hRootKey2, OUString("reg2FirstKey").pData, &h2Key1)) - cout << "\t23. creating key \"reg2FirstKey\" failed\n"; - else - cout << "23. key \"reg2FirstKey\" is created\n"; - if (reg_createKey(hRootKey2, OUString("reg2SecondKey").pData, &h2Key2)) - cout << "\t24. creating key \"reg2SecondKey\" failed\n"; - else - cout << "24. key \"reg2SecondKey\" is created\n"; - if (reg_createKey(h2Key1, OUString("reg2FirstSubKey").pData, &h2Key3)) - cout << "\t25. creating key \"reg2FirstSubKey\" failed\n"; - else - cout << "25. key \"reg2FirstSubKey\" is created\n"; - if (reg_createKey(h2Key1, OUString("reg2SecondSubKey").pData, &h2Key4)) - cout << "\26. creating key \"reg2SecondSubKey\" failed\n"; - else - cout << "26. key \"reg2SecondSubKey\" is created\n"; - if (reg_createKey(hRootKey2, OUString("reg2ThirdKey").pData, &h2Key5)) - cout << "\n27. creating key \"reg2ThirdKey\" failed\n"; - else - cout << "27. key \"reg2ThirdKey\" is created\n"; - - sal_uInt32 nValue= 123456789; - if (reg_setValue(h2Key3, OUString().pData, RegValueType::LONG, &nValue, sizeof(sal_uInt32))) - cout << "\t27.b) setValue of key \"reg2FirstSubKey\" failed\n"; - else - cout << "27.b). setValue (long Value) of key \"reg2FirstSubKey\"\n"; - - if (reg_closeKey(h2Key1) || - reg_closeKey(h2Key2) || - reg_closeKey(h2Key3) || - reg_closeKey(h2Key4) || - reg_closeKey(h2Key5)) - cout << "\n\t28. closing keys of \"test5.rdb\" failed\n"; - else - cout << "\n28. all keys of \"test5.rdb\" closed\n"; - - if (reg_closeKey(hRootKey2)) - cout << "\t29. root key of \"test5.rdb\" failed\n"; - else - cout << "29. root key of \"test5.rdb\" is closed\n"; - - if (reg_closeRegistry(hReg2)) - cout << "\t30. registry test5.rdb is closed\n"; - else - cout << "30. registry test5.rdb is closed\n"; - - if (reg_openRegistry(OUString("test4.rdb").pData, &hReg, RegAccessMode::READWRITE)) - cout << "\t31. registry test4.rdb is opened\n"; - else - cout << "31. registry test4.rdb is opened\n"; - - if (reg_openRootKey(hReg, &hRootKey)) - cout << "\t32. open root key of \"test4.rdb\" is failed\n"; - else - cout << "32. root key of \"test4.rdb\" is opened\n"; - - if (reg_loadKey(hRootKey, OUString("allFromTest2").pData, - OUString("test5.rdb").pData)) - cout << "\n\t33. load all keys from \"test5.rdb\" under key \"allFromTest2\" failed\n"; - else - cout << "\n33. load all keys from test5.rdb under key \"allFromTest2\"\n"; - - if (reg_saveKey(hRootKey, OUString("allFromTest2").pData, - OUString("test6.rdb").pData)) - cout << "\n\t34. save all keys under \"allFromTest2\" in test6.rdb\n"; - else - cout << "\n34. save all keys under \"allFromTest2\" in test6.rdb\n"; - - - if (reg_createKey(hRootKey, OUString("allFromTest3").pData, &hKey1)) - cout << "\t35. creating key \"allFromTest3\" failed\n"; - else - cout << "36. key \"allFromTest3\" is created\n"; - if (reg_createKey(hKey1, OUString("myFirstKey2").pData, &hKey2)) - cout << "\t37. creating key \"myFirstKey2\" failed\n"; - else - cout << "37. key \"myFirstKey2\" is created\n"; - if (reg_createKey(hKey1, OUString("mySecondKey2").pData, &hKey3)) - cout << "\t38. creating key \"mySecondKey2\" failed\n"; - else - cout << "38. key \"mySecondKey2\" is created\n"; - - if (reg_mergeKey(hRootKey, OUString("allFromTest3").pData, - OUString("test6.rdb").pData, sal_False, sal_False)) - cout << "\n\t39. merge all keys under \"allFromTest2\" with all in test6.rdb\n"; - else - cout << "\n39. merge all keys under \"allFromTest2\" with all in test6.rdb\n"; - - if (reg_closeKey(hKey1)) - cout << "\n\t40. closing key \"allFromTest3\" of \"test5.rdb\" failed\n"; - else - cout << "\n40. closing key \"allFromTest3\" of \"test5.rdb\"\n"; - if (reg_closeKey(hKey2)) - cout << "\n\t41. closing key \"myFirstKey2\" of \"test5.rdb\" failed\n"; - else - cout << "\n41. closing key \"myFirstKey2\" of \"test5.rdb\"\n"; - if (reg_closeKey(hKey3)) - cout << "\n\t42. closing key \"mySecondKey2\" of \"test5.rdb\" failed\n"; - else - cout << "\n42. closing key \"mySecondKey2\" of \"test5.rdb\"\n"; - - - if (reg_deleteKey(hRootKey, OUString("/allFromTest3/reg2FirstKey/reg2FirstSubKey").pData)) - cout << "\n\t43. delete key \"/allFromTest3/reg2FirstKey/reg2FirstSubKey\" failed\n"; - else - cout << "\n43. key \"/allFromTest3/reg2FirstKey/reg2FirstSubKey\" is deleted\n"; - - if (reg_openRegistry(OUString("test4.rdb").pData, &hReg2, RegAccessMode::READONLY)) - cout << "\n\t44. registry test4.rdb is opened for read only\n"; - else - cout << "\n44. registry test4.rdb is opened for read only\n"; - - RegHandle hReg3; - if (reg_openRegistry(OUString("test4.rdb").pData, &hReg3, RegAccessMode::READONLY)) - cout << "\n\t44.a). registry test4.rdb is opened for read only\n"; - else - cout << "\n44.a). registry test4.rdb is opened for read only\n"; - - if (reg_closeRegistry(hReg2)) - cout << "\t45. closing registry \"test4.rdb\" failed\n"; - else - cout << "45. registry \"test4.rdb\" is closed\n"; - - if (reg_closeKey(hRootKey)) - cout << "\n\t46. closing root key of \"test4.rdb\" failed\n"; - else - cout << "\n46. root key of \"test4.rdb\" is closed\n"; - - if (reg_closeRegistry(hReg)) - cout << "\t47. closing registry \"test4.rdb\" failed\n"; - else - cout << "47. registry \"test4.rdb\" is closed\n"; - - if (reg_closeRegistry(hReg3)) - cout << "\t47.a). closing registry \"test4.rdb\" failed\n"; - else - cout << "47.a). registry \"test4.rdb\" is closed\n"; - - return 0; -} - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/registry/workben/test.cxx b/registry/workben/test.cxx deleted file mode 100644 index 96f552b08ed0..000000000000 --- a/registry/workben/test.cxx +++ /dev/null @@ -1,45 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - - -#include <stdio.h> - -#if (defined UNX) -int main() -#else -int _cdecl main() -#endif -{ - void test_coreReflection(); - void test_registry_CppApi(); - void test_generateMerge1(); - void test_generateMerge2(); - void test_merge(); - - test_coreReflection(); - test_registry_CppApi(); - test_generateMerge1(); - test_generateMerge2(); - test_merge(); - - return 0; -} - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |