[Libreoffice-commits] .: sal/qa

2012-04-06 Thread Lubos Lunak
 sal/qa/rtl/strings/test_ostring_stringliterals.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 2dde3c3ebb8e66535bb9d9d50c5494323d2bc876
Author: Luboš Luňák l.lu...@suse.cz
Date:   Fri Apr 6 16:15:09 2012 +0200

reset the flag before checking it it will be set again

diff --git a/sal/qa/rtl/strings/test_ostring_stringliterals.cxx 
b/sal/qa/rtl/strings/test_ostring_stringliterals.cxx
index 2baac11..3bed05a 100644
--- a/sal/qa/rtl/strings/test_ostring_stringliterals.cxx
+++ b/sal/qa/rtl/strings/test_ostring_stringliterals.cxx
@@ -84,6 +84,7 @@ CPPUNIT_TEST_SUITE_END();
 rtl_string_unittest_const_literal = false, \
 ( void ) rtl::OString( argument ), \
 result_tmp = rtl_string_unittest_const_literal, \
+rtl_string_unittest_const_literal = false, \
 ( void ) rtl::OStringBuffer( argument ), \
 rtl_string_unittest_const_literal  result_tmp )
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sal/qa sal/textenc sal/workben

2012-04-05 Thread Jan Holesovsky
 sal/qa/osl/process/osl_Thread.cxx|   22 +++
 sal/qa/rtl_strings/rtl_old_testostring.cxx   |1 
 sal/textenc/tcvtmb.cxx   |   26 -
 sal/workben/clipboardwben/testcopy/cbcpytest.cxx |   61 ++---
 sal/workben/clipboardwben/testpaste/cbptest.cxx  |   65 ++-
 sal/workben/clipboardwben/testviewer/cbvtest.cxx |   57 +---
 sal/workben/testpipe.cxx |   20 +++
 7 files changed, 121 insertions(+), 131 deletions(-)

New commits:
commit 8307fe9f65ef6011014d75041b3ddbc90d421b6a
Author: Mark Wolf mark.wolf.mu...@gmail.com
Date:   Wed Apr 4 17:35:53 2012 -0400

Translated German comments to English in folder 'sal'.

sal/qa/rtl_strings/rtl_old_testostring.cxx contains some German comments 
still
but the code itself uses test strings in German. When the test strings 
appear
in the comments, they were left unchanged to maintain consistency.

Mark Wolf

diff --git a/sal/qa/osl/process/osl_Thread.cxx 
b/sal/qa/osl/process/osl_Thread.cxx
index 47aa9ee..65b2943 100644
--- a/sal/qa/osl/process/osl_Thread.cxx
+++ b/sal/qa/osl/process/osl_Thread.cxx
@@ -70,23 +70,23 @@ using namespace osl;
 using ::rtl::OString;
 
 // 
-
-// Kleine Stopuhr
+// Small stopwatch
 class StopWatch {
-TimeValue t1,t2;// Start und Stopzeit
+TimeValue t1,t2;// Start and stoptime
 
 protected:
 sal_Int32 m_nNanoSec;
 sal_Int32 m_nSeconds;
 
-bool m_bIsValid;   // TRUE, wenn gestartet 
und gestoppt
-bool m_bIsRunning; // TRUE, wenn gestartet.
+bool m_bIsValid;   // TRUE, when started 
and stopped
+bool m_bIsRunning; // TRUE, when started
 
 public:
 StopWatch();
 ~StopWatch() {}
 
-void start(); // Startet Timer
-void stop();  // Stoppt Timer
+void start(); // Starts time
+void stop();  // Stops time
 
 double getSeconds() const;
 double getTenthSec() const;
@@ -94,7 +94,7 @@ public:
 
 // = Stop Watch 
=
 
-// Eine kleine Stop-Uhr fuer den internen Gebrauch.
+// A small stopwatch for internal use
 // (c) Lars Langhans 29.12.1996 22:10
 
 StopWatch::StopWatch():m_bIsValid(false),m_bIsRunning(false) {}
@@ -116,12 +116,12 @@ void StopWatch::stop()
 // pre: Timer should be started
 // post: Timer will stopped
 
-// gettimeofday(t2, 0); // Timer ausfragen
+// gettimeofday(t2, 0); // Ask timer
 osl_getSystemTime( t2 );
 t_print(# %u %u nsecs\n, (unsigned) t2.Seconds, (unsigned) t2.Nanosec);
 
 if (m_bIsRunning)
-{// check ob gestartet.
+{// check if started.
 m_nSeconds = static_castsal_Int32(t2.Seconds) - 
static_castsal_Int32(t1.Seconds);
 if ( t2.Nanosec  t1.Nanosec )
m_nNanoSec = static_castsal_Int32(t2.Nanosec) - 
static_castsal_Int32(t1.Nanosec);
@@ -143,8 +143,8 @@ void StopWatch::stop()
 
 double StopWatch::getSeconds() const
 {
-// pre: gueltig = TRUE
-// BACK: Zeit in Sekunden.
+// pre: valid = TRUE
+// BACK: time in seconds
 
 double nValue = 0.0;
 if (m_bIsValid)
diff --git a/sal/qa/rtl_strings/rtl_old_testostring.cxx 
b/sal/qa/rtl_strings/rtl_old_testostring.cxx
index 70fca4d..435b428 100644
--- a/sal/qa/rtl_strings/rtl_old_testostring.cxx
+++ b/sal/qa/rtl_strings/rtl_old_testostring.cxx
@@ -80,7 +80,6 @@ void oldtests::test_OString()
 TEST_ENSURE( s2.lastIndexOf('M') == 0, test_OString error 10);
 TEST_ENSURE( s2.lastIndexOf('t', s2.getLength() - 8) == 8, test_OString 
error 9);
 
-
 //  Mein erster RTL OString ist ein String aus der RTL Library\n
 //   ||||||||||||
 //  Index0510   15   20   25   30   35   40   45   50   55
diff --git a/sal/textenc/tcvtmb.cxx b/sal/textenc/tcvtmb.cxx
index cea7cda..c696c84 100644
--- a/sal/textenc/tcvtmb.cxx
+++ b/sal/textenc/tcvtmb.cxx
@@ -160,13 +160,12 @@ sal_Size ImplDBCSToUnicode( const void* pData, 
SAL_UNUSED_PARAMETER void*,
 
 if ( !cConv )
 {
-/* Wir vergleichen den kompletten Trailbereich den wir */
-/* definieren, der normalerweise groesser sein kann als */
-/* der definierte. Dies machen wir, damit Erweiterungen 
von */
-/* uns nicht beruecksichtigten Encodings so weit wie */
-/* moeglich auch richtig zu behandeln, das double 

[Libreoffice-commits] .: sal/qa

2012-04-03 Thread Lubos Lunak
 sal/qa/osl/security/osl_Security.cxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit c813c009479db3fab58fc48740ab8f80ceb93a26
Author: Luboš Luňák l.lu...@suse.cz
Date:   Tue Apr 3 14:01:30 2012 +0200

don't skip first cmdline argument

It looks like this one is also meant to be called manually or something,
and the original version didn't skip the first argument either.

diff --git a/sal/qa/osl/security/osl_Security.cxx 
b/sal/qa/osl/security/osl_Security.cxx
index 92b9fe4..1c4f029 100644
--- a/sal/qa/osl/security/osl_Security.cxx
+++ b/sal/qa/osl/security/osl_Security.cxx
@@ -637,8 +637,7 @@ void MyTestPlugInImpl::initialize( 
CPPUNIT_NS::TestFactoryRegistry *,
 rtl::OUString args[ 3 ];
 int argsCount = 0;
 sal_uInt32 n = rtl_getAppCommandArgCount();
-// skip first, that's the module name
-for (sal_uInt32 i = 1; i  n; ++i)
+for (sal_uInt32 i = 0; i  n; ++i)
 {
 rtl::OUString arg;
 rtl_getAppCommandArg(i, arg.pData);
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sal/qa

2012-03-28 Thread Lubos Lunak
 sal/qa/rtl/strings/test_ostring_stringliterals.cxx  |   10 +-
 sal/qa/rtl/strings/test_oustring_stringliterals.cxx |   14 +++---
 2 files changed, 12 insertions(+), 12 deletions(-)

New commits:
commit bb070c05b6e2d09b15fed673507a523c11eb2a19
Author: Luboš Luňák l.lu...@suse.cz
Date:   Wed Mar 28 23:48:17 2012 +0200

CPPUNIT_ASSERT_EQUAL() takes expected as the first argument

diff --git a/sal/qa/rtl/strings/test_ostring_stringliterals.cxx 
b/sal/qa/rtl/strings/test_ostring_stringliterals.cxx
index 494c1da..0d5036a 100644
--- a/sal/qa/rtl/strings/test_ostring_stringliterals.cxx
+++ b/sal/qa/rtl/strings/test_ostring_stringliterals.cxx
@@ -261,15 +261,15 @@ void test::ostring::StringLiterals::checkBuffer()
 rtl_string_unittest_const_literal_function = false;
 buf.append( foo );
 CPPUNIT_ASSERT( rtl_string_unittest_const_literal_function == true );
-CPPUNIT_ASSERT_EQUAL( buf.toString(), rtl::OString( foo ));
+CPPUNIT_ASSERT_EQUAL( rtl::OString( foo ), buf.toString());
 rtl_string_unittest_const_literal_function = false;
 buf.append( bar );
 CPPUNIT_ASSERT( rtl_string_unittest_const_literal_function == true );
-CPPUNIT_ASSERT_EQUAL( buf.toString(), rtl::OString( foobar ));
+CPPUNIT_ASSERT_EQUAL( rtl::OString( foobar ), buf.toString());
 rtl_string_unittest_const_literal_function = false;
 buf.insert( 3, baz );
 CPPUNIT_ASSERT( rtl_string_unittest_const_literal_function == true );
-CPPUNIT_ASSERT_EQUAL( buf.toString(), rtl::OString( foobazbar ));
+CPPUNIT_ASSERT_EQUAL( rtl::OString( foobazbar ), buf.toString());
 #else
 buf.append( foobazbar );
 #endif
@@ -279,8 +279,8 @@ void test::ostring::StringLiterals::checkBuffer()
 rtl_string_unittest_const_literal = false; // start checking for OString 
conversions
 rtl_string_unittest_const_literal_function = false; // and check for const 
variants
 char d[] = d;
-CPPUNIT_ASSERT_EQUAL( buf.append( d ).toString(), foobazbard );
-CPPUNIT_ASSERT_EQUAL( buf.insert( 3, d ).toString(), foodbazbard );
+CPPUNIT_ASSERT_EQUAL( foobazbard, buf.append( d ).toString());
+CPPUNIT_ASSERT_EQUAL( foodbazbard, buf.insert( 3, d ).toString() );
 CPPUNIT_ASSERT( rtl_string_unittest_const_literal == false );
 CPPUNIT_ASSERT( rtl_string_unittest_const_literal_function == false );
 }
diff --git a/sal/qa/rtl/strings/test_oustring_stringliterals.cxx 
b/sal/qa/rtl/strings/test_oustring_stringliterals.cxx
index 2070698..6316478 100644
--- a/sal/qa/rtl/strings/test_oustring_stringliterals.cxx
+++ b/sal/qa/rtl/strings/test_oustring_stringliterals.cxx
@@ -99,10 +99,10 @@ void test::oustring::StringLiterals::checkCtors()
 
 // Check that contents are correct and equal to the case when 
RTL_CONSTASCII_USTRINGPARAM is used.
 // Also check that embedded \0 is included.
-CPPUNIT_ASSERT_EQUAL( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(  )), 
rtl::OUString(  ));
-CPPUNIT_ASSERT_EQUAL( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( \0 )), 
rtl::OUString( \0 ));
-CPPUNIT_ASSERT_EQUAL( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ab )), 
rtl::OUString( ab ));
-CPPUNIT_ASSERT_EQUAL( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( a\0b 
)), rtl::OUString( a\0b ));
+CPPUNIT_ASSERT_EQUAL( rtl::OUString(  ), rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM(  )));
+CPPUNIT_ASSERT_EQUAL( rtl::OUString( \0 ), rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM( \0 )));
+CPPUNIT_ASSERT_EQUAL( rtl::OUString( ab ), rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM( ab )));
+CPPUNIT_ASSERT_EQUAL( rtl::OUString( a\0b ), rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM( a\0b )));
 }
 
 void test::oustring::StringLiterals::testcall( const char str[] )
@@ -175,11 +175,11 @@ void test::oustring::StringLiterals::checkBuffer()
 {
 rtl::OUStringBuffer buf;
 buf.append( foo );
-CPPUNIT_ASSERT_EQUAL( buf.toString(), rtl::OUString( foo ));
+CPPUNIT_ASSERT_EQUAL( rtl::OUString( foo ), buf.toString());
 buf.append( bar );
-CPPUNIT_ASSERT_EQUAL( buf.toString(), rtl::OUString( foobar ));
+CPPUNIT_ASSERT_EQUAL( rtl::OUString( foobar ), buf.toString());
 buf.insert( 3, baz );
-CPPUNIT_ASSERT_EQUAL( buf.toString(), rtl::OUString( foobazbar ));
+CPPUNIT_ASSERT_EQUAL( rtl::OUString( foobazbar ), buf.toString());
 char d[] = d;
 CPPUNIT_ASSERT( !VALID_CONVERSION( buf.append( d )));
 CPPUNIT_ASSERT( !VALID_CONVERSION( buf.insert( 0, d )));
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sal/qa

2012-03-27 Thread Lubos Lunak
 sal/qa/osl/process/osl_process.cxx |   72 ++---
 1 file changed, 36 insertions(+), 36 deletions(-)

New commits:
commit 533eadeb46c3db40daf0f18f89096c24e7f9c2bd
Author: Luboš Luňák l.lu...@suse.cz
Date:   Wed Mar 28 06:26:58 2012 +0200

CPPUNIT_ASSERT_MESSAGE - CPPUNIT_ASSERT_EQUAL_MESSAGE

diff --git a/sal/qa/osl/process/osl_process.cxx 
b/sal/qa/osl/process/osl_process.cxx
index 367d6d9..8580ab2 100644
--- a/sal/qa/osl/process/osl_process.cxx
+++ b/sal/qa/osl/process/osl_process.cxx
@@ -159,10 +159,10 @@ public:
 0,
 process);
 
-CPPUNIT_ASSERT_MESSAGE
+CPPUNIT_ASSERT_EQUAL_MESSAGE
 (
 osl_createProcess failed,
-osl_error == osl_Process_E_None
+osl_Process_E_None, osl_error
 );
 
 TimeValue timeout;
@@ -171,18 +171,18 @@ public:
 
 osl_error = osl_joinProcessWithTimeout(process, timeout);
 
-CPPUNIT_ASSERT_MESSAGE
+CPPUNIT_ASSERT_EQUAL_MESSAGE
 (
 osl_joinProcessWithTimeout returned without timeout failure,
-osl_Process_E_TimedOut == osl_error
+osl_Process_E_TimedOut, osl_error
 );
 
 osl_error = osl_terminateProcess(process);
 
-CPPUNIT_ASSERT_MESSAGE
+CPPUNIT_ASSERT_EQUAL_MESSAGE
 (
 osl_terminateProcess failed,
-osl_error == osl_Process_E_None
+osl_Process_E_None, osl_error
 );
 
 osl_freeProcessHandle(process);
@@ -209,10 +209,10 @@ public:
 0,
 process);
 
-CPPUNIT_ASSERT_MESSAGE
+CPPUNIT_ASSERT_EQUAL_MESSAGE
 (
 osl_createProcess failed,
-osl_error == osl_Process_E_None
+osl_Process_E_None, osl_error
 );
 
 TimeValue timeout;
@@ -221,10 +221,10 @@ public:
 
 osl_error = osl_joinProcessWithTimeout(process, timeout);
 
-CPPUNIT_ASSERT_MESSAGE
+CPPUNIT_ASSERT_EQUAL_MESSAGE
 (
 osl_joinProcessWithTimeout returned with failure,
-osl_Process_E_None == osl_error
+osl_Process_E_None, osl_error
 );
 
 osl_freeProcessHandle(process);
@@ -249,18 +249,18 @@ public:
 0,
 process);
 
-CPPUNIT_ASSERT_MESSAGE
+CPPUNIT_ASSERT_EQUAL_MESSAGE
 (
 osl_createProcess failed,
-osl_error == osl_Process_E_None
+osl_Process_E_None, osl_error
 );
 
 osl_error = osl_joinProcessWithTimeout(process, NULL);
 
-CPPUNIT_ASSERT_MESSAGE
+CPPUNIT_ASSERT_EQUAL_MESSAGE
 (
 osl_joinProcessWithTimeout returned with failure,
-osl_Process_E_None == osl_error
+osl_Process_E_None, osl_error
 );
 
 osl_freeProcessHandle(process);
@@ -285,18 +285,18 @@ public:
 0,
 process);
 
-CPPUNIT_ASSERT_MESSAGE
+CPPUNIT_ASSERT_EQUAL_MESSAGE
 (
 osl_createProcess failed,
-osl_error == osl_Process_E_None
+osl_Process_E_None, osl_error
 );
 
 osl_error = ::osl_joinProcess(process);
 
-CPPUNIT_ASSERT_MESSAGE
+CPPUNIT_ASSERT_EQUAL_MESSAGE
 (
 osl_joinProcess returned with failure,
-osl_Process_E_None == osl_error
+osl_Process_E_None, osl_error
 );
 
 osl_freeProcessHandle(process);
@@ -450,11 +450,11 @@ public:
 OUString create_temp_file(OUString temp_file_url)
 {
 FileBase::RC rc = FileBase::createTempFile(0, 0, temp_file_url);
-CPPUNIT_ASSERT_MESSAGE(createTempFile failed, FileBase::E_None == 
rc);
+CPPUNIT_ASSERT_EQUAL_MESSAGE(createTempFile failed, 
FileBase::E_None, rc);
 
 OUString temp_file_path;
 rc = FileBase::getSystemPathFromFileURL(temp_file_url, temp_file_path);
-CPPUNIT_ASSERT_MESSAGE(getSystemPathFromFileURL failed, 
FileBase::E_None == rc);
+CPPUNIT_ASSERT_EQUAL_MESSAGE(getSystemPathFromFileURL failed, 
FileBase::E_None, rc);
 
 return temp_file_path;
 }
@@ -584,18 +584,18 @@ public:
 0,
 process);
 
-CPPUNIT_ASSERT_MESSAGE
+CPPUNIT_ASSERT_EQUAL_MESSAGE
 (
 osl_createProcess failed,
-osl_error == osl_Process_E_None
+osl_Process_E_None, osl_error
 );
 
 osl_error = ::osl_joinProcess(process);
 
-CPPUNIT_ASSERT_MESSAGE
+CPPUNIT_ASSERT_EQUAL_MESSAGE
 (
 osl_joinProcess returned with failure,
-osl_Process_E_None == osl_error
+osl_Process_E_None, osl_error
 );
 
 osl_freeProcessHandle(process);
@@ -638,18 +638,18 @@ public:
 SAL_N_ELEMENTS(child_env),
 process);
 
-CPPUNIT_ASSERT_MESSAGE
+CPPUNIT_ASSERT_EQUAL_MESSAGE
 (
 

[Libreoffice-commits] .: sal/qa

2012-03-26 Thread Lubos Lunak
 sal/qa/rtl/strings/test_ostring_stringliterals.cxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 205ee3062e494733f10b13057135b1eb8646e93d
Author: Luboš Luňák l.lu...@suse.cz
Date:   Mon Mar 26 19:09:34 2012 +0200

finish work-in-progress test

diff --git a/sal/qa/rtl/strings/test_ostring_stringliterals.cxx 
b/sal/qa/rtl/strings/test_ostring_stringliterals.cxx
index 2176a50..d665ee2 100644
--- a/sal/qa/rtl/strings/test_ostring_stringliterals.cxx
+++ b/sal/qa/rtl/strings/test_ostring_stringliterals.cxx
@@ -157,8 +157,7 @@ void test::ostring::StringLiterals::checkNonConstUsage()
 
 rtl_string_unittest_const_literal = false; // start checking for OString 
conversions
 rtl_string_unittest_const_literal_function = false; // and check for const 
variants
-sleep(10);
-rtl::OString() = (const char*)foo;
+CPPUNIT_ASSERT_EQUAL( foo, rtl::OString() = (const char*)foo );
 CPPUNIT_ASSERT_EQUAL( foo, rtl::OString() = foo_c );
 // if this is not true, some of the calls above converted to OString
 CPPUNIT_ASSERT( rtl_string_unittest_const_literal == false );
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sal/qa

2012-03-12 Thread Lubos Lunak
 sal/qa/rtl/strings/test_ostring_stringliterals.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit 9fabd6c078b1aeaa565887ee83fb57daf5c123e0
Author: Luboš Luňák l.lu...@suse.cz
Date:   Mon Mar 12 16:11:20 2012 +0100

handle msvc not even compiling a test that should fail

but that is fine, because outside the unittest it should fail
everywhere

diff --git a/sal/qa/rtl/strings/test_ostring_stringliterals.cxx 
b/sal/qa/rtl/strings/test_ostring_stringliterals.cxx
index 46da8c8..22f79ab 100644
--- a/sal/qa/rtl/strings/test_ostring_stringliterals.cxx
+++ b/sal/qa/rtl/strings/test_ostring_stringliterals.cxx
@@ -100,7 +100,12 @@ void test::ostring::StringLiterals::checkCtors()
 
 void test::ostring::StringLiterals::testcall( const char str[] )
 {
+#ifndef _MSC_VER
 CPPUNIT_ASSERT( !CONST_CTOR_USED( str ));
+#else
+// MSVC just errors out on this for some reason, which is fine as well
+(void)str;
+#endif
 }
 
 #undef CONST_CTOR_USED
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sal/qa

2012-03-07 Thread Lubos Lunak
 sal/qa/rtl/strings/test_oustring_stringliterals.cxx |   40 ++--
 1 file changed, 20 insertions(+), 20 deletions(-)

New commits:
commit 5420d7092f9a96fee694b1b1ce6d52c671912e9c
Author: Luboš Luňák l.lu...@suse.cz
Date:   Wed Mar 7 14:57:30 2012 +0100

use the new license header, this file has been written by me

diff --git a/sal/qa/rtl/strings/test_oustring_stringliterals.cxx 
b/sal/qa/rtl/strings/test_oustring_stringliterals.cxx
index 142f53d..ce2d22a 100644
--- a/sal/qa/rtl/strings/test_oustring_stringliterals.cxx
+++ b/sal/qa/rtl/strings/test_oustring_stringliterals.cxx
@@ -1,30 +1,30 @@
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
  *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the License); you may not use this file except in compliance with
+ * the License or as specified alternatively below. You may obtain a copy of
+ * the License at http://www.mozilla.org/MPL/
  *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * Software distributed under the License is distributed on an AS IS basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
  *
- * OpenOffice.org - a multi-platform office productivity suite
+ * Major Contributor(s):
+ * Copyright (C) 2012 Lubos Lunak l.lu...@suse.cz (initial developer)
  *
- * This file is part of OpenOffice.org.
+ * All Rights Reserved.
  *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
+ * For minor contributions see the git repository.
  *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org.  If not, see
- * http://www.openoffice.org/license.html
- * for a copy of the LGPLv3 License.
- *
- /
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the GPLv3+), or
+ * the GNU Lesser General Public License Version 3 or later (the LGPLv3+),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
 
 // activate the extra needed ctor
 #define RTL_STRING_UNITTEST
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sal/qa

2012-01-21 Thread Michael Meeks
 sal/qa/osl/file/osl_File.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit e981b4271089607d6086ce965505020fe17b519f
Author: Michael Meeks michael.me...@suse.com
Date:   Sat Jan 21 20:53:01 2012 +

sal: re-disable file based unit tests that don't pass

diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx
index 6d885c4..a41c761 100644
--- a/sal/qa/osl/file/osl_File.cxx
+++ b/sal/qa/osl/file/osl_File.cxx
@@ -4807,14 +4807,14 @@ namespace osl_File
 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( osl_File::read, osl_File );
 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( osl_File::write, osl_File );
 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( osl_File::readLine, osl_File );
-// FIXME: disabled these tests for now ... they seem not to pass ...
-//CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( osl_File::copy, osl_File );
-//CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( osl_File::move, osl_File );
+CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( osl_File::copy, osl_File );
+CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( osl_File::move, osl_File );
 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( osl_File::remove, osl_File );
 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( osl_File::setAttributes, osl_File 
);
 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( osl_File::setTime, osl_File );
 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( osl_File::sync, osl_File );
-CPPUNIT_REGISTRY_ADD_TO_DEFAULT( osl_File );
+// FIXME: to enable these tests (when they work cross-platform) we need to add 
the below:
+//CPPUNIT_REGISTRY_ADD_TO_DEFAULT( osl_File );
 
 }// namespace osl_File
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sal/qa sal/rtl

2012-01-15 Thread Stephan Bergmann
 sal/qa/osl/mutex/osl_Mutex.cxx |8 
 sal/rtl/source/uri.cxx |6 ++
 2 files changed, 10 insertions(+), 4 deletions(-)

New commits:
commit 5eea018d806f96e70c42e6d26922bb6a0c35d466
Author: Stephan Bergmann sberg...@redhat.com
Date:   Sun Jan 15 22:42:25 2012 +0100

Clang -Wdangling-else, -Wuninitialized.

diff --git a/sal/qa/osl/mutex/osl_Mutex.cxx b/sal/qa/osl/mutex/osl_Mutex.cxx
index f4f34d6..745f35b 100644
--- a/sal/qa/osl/mutex/osl_Mutex.cxx
+++ b/sal/qa/osl/mutex/osl_Mutex.cxx
@@ -266,7 +266,7 @@ protected:
 {
 // block here if the mutex has been acquired
 Mutex* pGlobalMutex;
-pGlobalMutex = pGlobalMutex-getGlobalMutex( );
+pGlobalMutex = Mutex::getGlobalMutex( );
 pGlobalMutex-acquire( );
 printf(# Global Mutex acquired. \n );
 pGlobalMutex-release( );
@@ -522,7 +522,7 @@ namespace osl_Mutex
 void getGlobalMutex_001()
 {
 Mutex* pGlobalMutex;
-pGlobalMutex = pGlobalMutex-getGlobalMutex();
+pGlobalMutex = Mutex::getGlobalMutex();
 pGlobalMutex-acquire();
 
 GlobalMutexThread myThread;
@@ -545,11 +545,11 @@ namespace osl_Mutex
 sal_Bool bRes;
 
 Mutex *pGlobalMutex;
-pGlobalMutex = pGlobalMutex-getGlobalMutex( );
+pGlobalMutex = Mutex::getGlobalMutex( );
 pGlobalMutex-acquire( );
 {
 Mutex *pGlobalMutex1;
-pGlobalMutex1 = pGlobalMutex1-getGlobalMutex( );
+pGlobalMutex1 = Mutex::getGlobalMutex( );
 bRes = pGlobalMutex1-release( );
 }
 
diff --git a/sal/rtl/source/uri.cxx b/sal/rtl/source/uri.cxx
index af5da83..2c42abb 100644
--- a/sal/rtl/source/uri.cxx
+++ b/sal/rtl/source/uri.cxx
@@ -391,7 +391,9 @@ void parseUriRef(rtl_uString const * pUriRef, Components * 
pComponents)
 sal_Unicode const * pPos = pBegin;
 
 if (pPos != pEnd  isAlpha(*pPos))
+{
 for (sal_Unicode const * p = pPos + 1; p != pEnd; ++p)
+{
 if (*p == ':')
 {
 pComponents-aScheme.pBegin = pBegin;
@@ -401,7 +403,11 @@ void parseUriRef(rtl_uString const * pUriRef, Components * 
pComponents)
 }
 else if (!isAlpha(*p)  !isDigit(*p)  *p != '+'  *p != '-'
   *p != '.')
+{
 break;
+}
+}
+}
 
 if (pEnd - pPos = 2  pPos[0] == '/'  pPos[1] == '/')
 {
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sal/qa

2012-01-05 Thread Matus Kukan
 sal/qa/osl/mutex/osl_Mutex.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8f823b7d39154d2044e08174a858f8ef357a151a
Author: Matúš Kukan matus.ku...@gmail.com
Date:   Thu Jan 5 17:32:21 2012 +0100

gcc-trunk: fix: unable to find string literal operator 'operator FOO'

diff --git a/sal/qa/osl/mutex/osl_Mutex.cxx b/sal/qa/osl/mutex/osl_Mutex.cxx
index 10a95c1..f4f34d6 100644
--- a/sal/qa/osl/mutex/osl_Mutex.cxx
+++ b/sal/qa/osl/mutex/osl_Mutex.cxx
@@ -754,7 +754,7 @@ namespace osl_ClearableGuard
 TimeValue aTimeVal_after;
 osl_getSystemTime( aTimeVal_after );
 sal_Int32 nSec = aTimeVal_after.Seconds - aTimeVal_befor.Seconds;
-printf(nSec is %SAL_PRIdINT32\n, nSec);
+printf(nSec is % SAL_PRIdINT32 \n, nSec);
 
 myThread.join();
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sal/qa

2011-12-01 Thread August Sodora
 sal/qa/rtl_strings/rtl_String_Const.h |5 -
 1 file changed, 5 deletions(-)

New commits:
commit c351b1e19f1b1207949b70386640dc06ef0144ad
Author: August Sodora aug...@gmail.com
Date:   Thu Dec 1 16:41:45 2011 -0500

WaE: unused variables

diff --git a/sal/qa/rtl_strings/rtl_String_Const.h 
b/sal/qa/rtl_strings/rtl_String_Const.h
index 2b14b46..2c2e4b7 100644
--- a/sal/qa/rtl_strings/rtl_String_Const.h
+++ b/sal/qa/rtl_strings/rtl_String_Const.h
@@ -59,7 +59,6 @@ static const sal_uInt32 kConvertFlagsOStringToOUString = 
OSTRING_TO_OUSTRING_CVT
 
 static const sal_Char *kTestStr1  = Sun Microsystems;
 static const sal_Char *kTestStr2  = Sun Microsystems Java Technology;
-static const sal_Char *kTestStr3  = Sun microsystems;
 static const sal_Char *kTestStr4  = SUN MICROSYSTEMS;
 static const sal_Char *kTestStr5  = sun microsystems;
 static const sal_Char *kTestStr6  = Java Technology;
@@ -88,10 +87,6 @@ static const sal_Char *kTestStr28 = 
\50\3\5\7\11\13\15\17sun;
 static const sal_Char *kTestStr29 = 
\50\3\5\7\11\13\15\17sun\21\23\25\27\31\33\50;
 static const sal_Char *kTestStr30 = sun\21\23\25\27\31\33\50;
 static const sal_Char *kTestStr31 = sun Microsystems;
-static const sal_Char *kTestStr32 = Sun Microsystem ;
-static const sal_Char *kTestStr33 =  ;
-static const sal_Char *kTestStr34 = \50\5\5\7\11\13\15\17sun;
-static const sal_Char *kTestStr35 = \50\373\5\7\11\13\15\17sun;
 static const sal_Char *kTestStr36 = Microsystems Java Technology;
 static const sal_Char *kTestStr37 = Sun  Java Technology;
 static const sal_Char *kTestStr38 = \21\23\25\27\31\33\50;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sal/qa

2011-12-01 Thread Andras Timar
 sal/qa/OStringBuffer/rtl_String_Const.h |5 -
 1 file changed, 5 deletions(-)

New commits:
commit 36fa8503a101ca6dda5ed9cddf7b99704f96cc6a
Author: Andras Timar ati...@suse.com
Date:   Thu Dec 1 23:15:19 2011 +0100

remove unused string constants

diff --git a/sal/qa/OStringBuffer/rtl_String_Const.h 
b/sal/qa/OStringBuffer/rtl_String_Const.h
index 7841e4f..a700905 100644
--- a/sal/qa/OStringBuffer/rtl_String_Const.h
+++ b/sal/qa/OStringBuffer/rtl_String_Const.h
@@ -59,7 +59,6 @@ static const sal_uInt32 kConvertFlagsOStringToOUString = 
OSTRING_TO_OUSTRING_CVT
 
 static const sal_Char *kTestStr1  = Sun Microsystems;
 static const sal_Char *kTestStr2  = Sun Microsystems Java Technology;
-static const sal_Char *kTestStr3  = Sun microsystems;
 static const sal_Char *kTestStr7  = Sun ;
 static const sal_Char *kTestStr8  = Microsystems;
 static const sal_Char *kTestStr14 =Sun Microsystems;
@@ -70,10 +69,6 @@ static const sal_Char *kTestStr27 = s;
 static const sal_Char *kTestStr28 = \50\3\5\7\11\13\15\17sun;
 static const sal_Char *kTestStr29 = 
\50\3\5\7\11\13\15\17sun\21\23\25\27\31\33\50;
 static const sal_Char *kTestStr31 = sun Microsystems;
-static const sal_Char *kTestStr32 = Sun Microsystem ;
-static const sal_Char *kTestStr33 =  ;
-static const sal_Char *kTestStr34 = \50\5\5\7\11\13\15\17sun;
-static const sal_Char *kTestStr35 = \50\373\5\7\11\13\15\17sun;
 static const sal_Char *kTestStr36 = Microsystems Java Technology;
 static const sal_Char *kTestStr37 = Sun  Java Technology;
 static const sal_Char *kTestStr38 = \21\23\25\27\31\33\50;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sal/qa

2011-09-22 Thread Caolán McNamara
 sal/qa/osl/mutex/osl_Mutex.cxx |   40 ++---
 sal/qa/osl/pipe/osl_Pipe.cxx   |   56 -
 2 files changed, 48 insertions(+), 48 deletions(-)

New commits:
commit 501a0ae032df6d38d6db7d1f0b743c846c4324ed
Author: Caolán McNamara caol...@redhat.com
Date:   Thu Sep 22 17:00:19 2011 +0100

adapt subsequent check only source too

diff --git a/sal/qa/osl/mutex/osl_Mutex.cxx b/sal/qa/osl/mutex/osl_Mutex.cxx
index ff42b64..74bd646 100644
--- a/sal/qa/osl/mutex/osl_Mutex.cxx
+++ b/sal/qa/osl/mutex/osl_Mutex.cxx
@@ -376,10 +376,10 @@ namespace osl_Mutex
 CPPUNIT_ASSERT_MESSAGE( test Mutex ctor function: increase and 
decrease a number 3 times without interrupt., bRes == sal_True );
 }
 
-CPPUNIT_TEST_SUITE( ctor );
+SAL_CPPUNIT_TEST_SUITE( ctor );
 CPPUNIT_TEST( ctor_001 );
 CPPUNIT_TEST( ctor_002 );
-CPPUNIT_TEST_SUITE_END( );
+SAL_CPPUNIT_TEST_SUITE_END( );
 }; // class ctor
 
 
@@ -433,10 +433,10 @@ namespace osl_Mutex
 
 }
 
-CPPUNIT_TEST_SUITE( acquire );
+SAL_CPPUNIT_TEST_SUITE( acquire );
 CPPUNIT_TEST( acquire_001 );
 CPPUNIT_TEST( acquire_002 );
-CPPUNIT_TEST_SUITE_END( );
+SAL_CPPUNIT_TEST_SUITE_END( );
 }; // class acquire
 
 
@@ -473,9 +473,9 @@ namespace osl_Mutex
 bRes1 == sal_False  bRes2 == sal_True);
 }
 
-CPPUNIT_TEST_SUITE(tryToAcquire);
+SAL_CPPUNIT_TEST_SUITE(tryToAcquire);
 CPPUNIT_TEST(tryToAcquire_001);
-CPPUNIT_TEST_SUITE_END();
+SAL_CPPUNIT_TEST_SUITE_END();
 }; // class tryToAcquire
 
 /** Test of the osl::Mutex::release method
@@ -515,10 +515,10 @@ namespace osl_Mutex
 {
 }
 
-CPPUNIT_TEST_SUITE( release );
+SAL_CPPUNIT_TEST_SUITE( release );
 CPPUNIT_TEST( release_001 );
 CPPUNIT_TEST( release_002 );
-CPPUNIT_TEST_SUITE_END( );
+SAL_CPPUNIT_TEST_SUITE_END( );
 }; // class release
 
 
@@ -567,10 +567,10 @@ namespace osl_Mutex
 bRes == sal_True );
 }
 
-CPPUNIT_TEST_SUITE(getGlobalMutex);
+SAL_CPPUNIT_TEST_SUITE(getGlobalMutex);
 CPPUNIT_TEST(getGlobalMutex_001);
 CPPUNIT_TEST(getGlobalMutex_002);
-CPPUNIT_TEST_SUITE_END();
+SAL_CPPUNIT_TEST_SUITE_END();
 }; // class getGlobalMutex
 
 // 
-
@@ -655,10 +655,10 @@ namespace osl_Guard
 bRes == sal_True);
 }
 
-CPPUNIT_TEST_SUITE(ctor);
+SAL_CPPUNIT_TEST_SUITE(ctor);
 CPPUNIT_TEST(ctor_001);
 CPPUNIT_TEST(ctor_002);
-CPPUNIT_TEST_SUITE_END();
+SAL_CPPUNIT_TEST_SUITE_END();
 }; // class ctor
 
 // 
-
@@ -733,10 +733,10 @@ namespace osl_ClearableGuard
 bRes == sal_True );
 }
 
-CPPUNIT_TEST_SUITE(ctor);
+SAL_CPPUNIT_TEST_SUITE(ctor);
 CPPUNIT_TEST(ctor_001);
 CPPUNIT_TEST(ctor_002);
-CPPUNIT_TEST_SUITE_END();
+SAL_CPPUNIT_TEST_SUITE_END();
 }; // class ctor
 
 class clear : public CppUnit::TestFixture
@@ -796,10 +796,10 @@ namespace osl_ClearableGuard
 ( sal_True == bRes )  ( sal_False == bRes1 ) );
 }
 
-CPPUNIT_TEST_SUITE( clear );
+SAL_CPPUNIT_TEST_SUITE( clear );
 CPPUNIT_TEST( clear_001 );
 CPPUNIT_TEST( clear_002 );
-CPPUNIT_TEST_SUITE_END( );
+SAL_CPPUNIT_TEST_SUITE_END( );
 }; // class clear
 
 // 
-
@@ -873,10 +873,10 @@ namespace osl_ResettableGuard
 }
 
 
-CPPUNIT_TEST_SUITE(ctor);
+SAL_CPPUNIT_TEST_SUITE(ctor);
 CPPUNIT_TEST(ctor_001);
 CPPUNIT_TEST(ctor_002);
-CPPUNIT_TEST_SUITE_END();
+SAL_CPPUNIT_TEST_SUITE_END();
 }; // class ctor
 
 class reset : public CppUnit::TestFixture
@@ -920,12 +920,12 @@ namespace osl_ResettableGuard
 ( sal_False == bRes )  ( sal_True == bRes1 ) );
 }
 
-CPPUNIT_TEST_SUITE(reset);
+SAL_CPPUNIT_TEST_SUITE(reset);
 CPPUNIT_TEST(reset_001);
 #ifdef LINUX
 CPPUNIT_TEST(reset_002);
 #endif
-CPPUNIT_TEST_SUITE_END();
+SAL_CPPUNIT_TEST_SUITE_END();
 }; // class reset
 
 // 
-
diff --git a/sal/qa/osl/pipe/osl_Pipe.cxx b/sal/qa/osl/pipe/osl_Pipe.cxx
index 97705dc..8ebfe58 100644
--- a/sal/qa/osl/pipe/osl_Pipe.cxx
+++ b/sal/qa/osl/pipe/osl_Pipe.cxx
@@ -260,14 +260,14 @@ namespace osl_Pipe
 sal_True == bRes  sal_False == bRes1 
);
 }
 
-CPPUNIT_TEST_SUITE( ctors );
+