diff options
author | Jean-Noël Rouvignac <jn.rouvignac@gmail.com> | 2013-01-30 11:44:23 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2013-01-30 12:54:40 +0000 |
commit | 97eb8a6e0eb830f37dcba64a51d725aab4c5ff53 (patch) | |
tree | a1a95b8249052d846a997ad1729758168d6a3b24 /jvmaccess/workbench/javainfo | |
parent | f8569cd9a28a3a8856dba4ad53218aa6cc073521 (diff) |
Removed several useless macros: A2OU, A2S, C2U, C2S, OUSTR, OUSTRING
Change-Id: Ie859cb2dfdc7103c379fce56be88eef8fe390afd
Reviewed-on: https://gerrit.libreoffice.org/1924
Tested-by: Luboš Luňák <l.lunak@suse.cz>
Reviewed-by: Luboš Luňák <l.lunak@suse.cz>
Diffstat (limited to 'jvmaccess/workbench/javainfo')
-rw-r--r-- | jvmaccess/workbench/javainfo/javainfotest.cxx | 96 |
1 files changed, 47 insertions, 49 deletions
diff --git a/jvmaccess/workbench/javainfo/javainfotest.cxx b/jvmaccess/workbench/javainfo/javainfotest.cxx index ddfd94db17ca..26d86dc2cf47 100644 --- a/jvmaccess/workbench/javainfo/javainfotest.cxx +++ b/jvmaccess/workbench/javainfo/javainfotest.cxx @@ -35,8 +35,6 @@ using ::rtl::OUString; using ::rtl::OUStringToOString; using ::rtl::OString; -#define OUSTR( x ) ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( x )) - #define JAVA_VERSION "1.4.1_01" bool test_constructor1(); @@ -77,9 +75,9 @@ bool test_constructor1() printf("\ntest JavaInfo::JavaInfo(const OUString& usJavaHome\n" \ "!Check output for correctness\n\n"); try{ - JavaInfo info(OUSTR("file:///d:/java/j2sdk1.4.1_01")); -// JavaInfo info(OUSTR("file:///local/jl/java/j2sdk1.4.0")); -// JavaInfo info(OUSTR("file:///usr/local2/jl/java/j2sdk1.4.0")); + JavaInfo info("file:///d:/java/j2sdk1.4.1_01"); +// JavaInfo info("file:///local/jl/java/j2sdk1.4.0"); +// JavaInfo info("file:///usr/local2/jl/java/j2sdk1.4.0"); printInfo(info); }catch( JavaInfo::InitException& ) @@ -97,11 +95,11 @@ bool test_constructor2() bool arRet[20]; int i= 0; - JavaInfo a(OUSTR("file:///d:/java/j2sdk1.4.1_01")); + JavaInfo a("file:///d:/java/j2sdk1.4.1_01"); // ----------------------------------------------------- -// JavaInfo a(OUSTR("file:///usr/local2/jl/java/j2sdk1.4.0")); +// JavaInfo a("file:///usr/local2/jl/java/j2sdk1.4.0"); //------------------------------------------------------------ -// JavaInfo a(OUSTR("file:///local/jl/java/j2sdk1.4.0")); +// JavaInfo a("file:///local/jl/java/j2sdk1.4.0"); try{ JavaInfo info= JavaInfo(OUString(), 0); arRet[i++]= true; @@ -119,14 +117,14 @@ bool test_constructor2() } try{ - JavaInfo info(OUString(OUSTR(JAVA_VERSION)), JavaInfo::EqualVersion); + JavaInfo info(OUString(JAVA_VERSION), JavaInfo::EqualVersion); arRet[i++]= info.compareVersions(a) == 0; } catch( ...) { arRet[i++]= false; } try{ - JavaInfo info(OUString(OUSTR(JAVA_VERSION)), 0); + JavaInfo info(OUString(JAVA_VERSION), 0); arRet[i++]= info.compareVersions(a) == 0; } catch( ...) { @@ -134,28 +132,28 @@ bool test_constructor2() } try{ - JavaInfo info(OUString(OUSTR(JAVA_VERSION)), JavaInfo::EqualVersion | JavaInfo::GreaterVersion); + JavaInfo info(OUString(JAVA_VERSION), JavaInfo::EqualVersion | JavaInfo::GreaterVersion); arRet[i++]= info.compareVersions(a) >= 0; } catch( ...) { arRet[i++]= false; } try{ - JavaInfo info(OUString(OUSTR(JAVA_VERSION)), JavaInfo::EqualVersion | JavaInfo::SmallerVersion); + JavaInfo info(OUString(JAVA_VERSION), JavaInfo::EqualVersion | JavaInfo::SmallerVersion); arRet[i++]= info.compareVersions(a) <= 0; } catch( ...) { arRet[i++]= false; } try{ - JavaInfo info(OUString(OUSTR(JAVA_VERSION)), JavaInfo::SmallerVersion); + JavaInfo info(OUString(JAVA_VERSION), JavaInfo::SmallerVersion); arRet[i++]= info.compareVersions(a) < 0; } catch( ...) { arRet[i++]= false; } try{ - JavaInfo info(OUString(OUSTR(JAVA_VERSION)), JavaInfo::GreaterVersion); + JavaInfo info(OUString(JAVA_VERSION), JavaInfo::GreaterVersion); arRet[i++]= info.compareVersions(a) > 0; } catch( ...) { @@ -163,7 +161,7 @@ bool test_constructor2() } try{ - JavaInfo info(OUString(OUSTR(JAVA_VERSION)), JavaInfo::EqualVersion | JavaInfo::SmallerVersion + JavaInfo info(OUString(JAVA_VERSION), JavaInfo::EqualVersion | JavaInfo::SmallerVersion | JavaInfo::Accessibility); arRet[i++]= info.compareVersions(a) <= 0 && info.supportsAccessibility(); } @@ -171,7 +169,7 @@ bool test_constructor2() arRet[i++]= false; } try{ - JavaInfo info(OUString(OUSTR(JAVA_VERSION)), JavaInfo::GreaterVersion | JavaInfo::Accessibility); + JavaInfo info(OUString(JAVA_VERSION), JavaInfo::GreaterVersion | JavaInfo::Accessibility); arRet[i++]= info.compareVersions(a) > 0 && info.supportsAccessibility(); } catch( ...) { @@ -208,25 +206,25 @@ bool test_compareVersions() "! Check output for correctness\n\n"); - JavaInfo a(OUSTR("file:///C:/Program%20Files/JavaSoft/JRE/1.3.1")); - JavaInfo b(OUSTR("file:///C:/Program%20Files/JavaSoft/JRE/1.3.1_04")); - JavaInfo c(OUSTR("file:///C:/Program%20Files/Java/j2re1.4.0_03")); - JavaInfo d(OUSTR("file:///C:/Program%20Files/Java/j2re1.4.2_04")); -// JavaInfo e(OUSTR("file:///d:/java/j2sdk1.4.0_01")); -// JavaInfo f(OUSTR("file:///d:/java/j2sdk1.4.0_02")); -// JavaInfo g(OUSTR("file:///d:/java/j2sdk1.4.1")); -// JavaInfo h(OUSTR("file:///d:/java/j2sdk1.4.1_01")); - -// JavaInfo a(OUSTR("file:///usr/local2/jl/java/j2re1_3_1_02")); -// JavaInfo b(OUSTR("file:///usr/local2/jl/java/j2sdk1.4.0")); -// JavaInfo c(OUSTR("file:///usr/local2/jl/java/j2sdk1.4.1")); -// JavaInfo d(OUSTR("file:///usr/local2/jl/java/j2re1.4.1_01")); - -// JavaInfo a(OUSTR("file:///local/jl/java/jre1.3.1")); -// JavaInfo b(OUSTR("file:///local/jl/java/jdk1.3.1_04")); -// JavaInfo c(OUSTR("file:///local/jl/java/j2sdk1.4.0")); -// JavaInfo d(OUSTR("file:///local/jl/java/j2sdk1.4.1")); -// JavaInfo e(OUSTR("file:///local/jl/java/j2re1.4.1_01")); + JavaInfo a("file:///C:/Program%20Files/JavaSoft/JRE/1.3.1"); + JavaInfo b("file:///C:/Program%20Files/JavaSoft/JRE/1.3.1_04"); + JavaInfo c("file:///C:/Program%20Files/Java/j2re1.4.0_03"); + JavaInfo d("file:///C:/Program%20Files/Java/j2re1.4.2_04"); +// JavaInfo e("file:///d:/java/j2sdk1.4.0_01"); +// JavaInfo f("file:///d:/java/j2sdk1.4.0_02"); +// JavaInfo g("file:///d:/java/j2sdk1.4.1"); +// JavaInfo h("file:///d:/java/j2sdk1.4.1_01"); + +// JavaInfo a("file:///usr/local2/jl/java/j2re1_3_1_02"); +// JavaInfo b("file:///usr/local2/jl/java/j2sdk1.4.0"); +// JavaInfo c("file:///usr/local2/jl/java/j2sdk1.4.1"); +// JavaInfo d("file:///usr/local2/jl/java/j2re1.4.1_01"); + +// JavaInfo a("file:///local/jl/java/jre1.3.1"); +// JavaInfo b("file:///local/jl/java/jdk1.3.1_04"); +// JavaInfo c("file:///local/jl/java/j2sdk1.4.0"); +// JavaInfo d("file:///local/jl/java/j2sdk1.4.1"); +// JavaInfo e("file:///local/jl/java/j2re1.4.1_01"); // fprintf(stderr,"###ok1"); if( (a.compareVersions(a) == 0 @@ -300,22 +298,22 @@ bool test_createBestInfo() bool test_isEqual() { printf("\ntest JavaInfo::isEqual\n"); - JavaInfo a(OUSTR(JAVA_VERSION)); // accessible - JavaInfo b(OUSTR(JAVA_VERSION)); + JavaInfo a(JAVA_VERSION); // accessible + JavaInfo b(JAVA_VERSION); - JavaInfo c(OUSTR("file:///c:/local/r/j2sdk1.4.0"));// not Accessible - JavaInfo d(OUSTR("file:///d:/java/copy_j2sdk1.4.0")); + JavaInfo c("file:///c:/local/r/j2sdk1.4.0");// not Accessible + JavaInfo d("file:///d:/java/copy_j2sdk1.4.0"); //------------------------------------------------------------------- -// JavaInfo a(OUSTR("file:///usr/local2/jl/java/j2re1_3_1_02")); -// JavaInfo b(OUSTR("file:///usr/local2/jl/java/j2re1_3_1_02")); +// JavaInfo a("file:///usr/local2/jl/java/j2re1_3_1_02"); +// JavaInfo b("file:///usr/local2/jl/java/j2re1_3_1_02"); -// JavaInfo c(OUSTR("file:///usr/local2/jl/java/j2sdk1.4.1")); -// JavaInfo d(OUSTR("file:///usr/local2/jl/java/copyj2sdk1.4.1")); +// JavaInfo c("file:///usr/local2/jl/java/j2sdk1.4.1"); +// JavaInfo d("file:///usr/local2/jl/java/copyj2sdk1.4.1"); -// JavaInfo a(OUSTR("file:///local/jl/java/jre1.3.1")); -// JavaInfo b(OUSTR("file:///local/jl/java/jre1.3.1")); -// JavaInfo c(OUSTR("file:///local/jl/java/j2sdk1.4.1")); -// JavaInfo d(OUSTR("file:///local/jl/java/copyj2sdk1.4.1")); +// JavaInfo a("file:///local/jl/java/jre1.3.1"); +// JavaInfo b("file:///local/jl/java/jre1.3.1"); +// JavaInfo c("file:///local/jl/java/j2sdk1.4.1"); +// JavaInfo d("file:///local/jl/java/copyj2sdk1.4.1"); bool arRet[20]; int i= 0; @@ -336,8 +334,8 @@ bool test_isEqual() bool test_getJarFilePath() { printf("\ntest JavaInfo::getJarFilePath\n"); - JavaInfo info(OUString(OUSTR("1.3.1")), JavaInfo::GreaterVersion | JavaInfo::EqualVersion ); - OUString s= info.getJarFilePath(OUSTR("javaplugin.jar")); + JavaInfo info(OUString("1.3.1"), JavaInfo::GreaterVersion | JavaInfo::EqualVersion ); + OUString s= info.getJarFilePath("javaplugin.jar"); printf("check if this URL is correct:\n"); OString oPath= OUStringToOString(s, osl_getThreadTextEncoding()); |