[Libreoffice-commits] core.git: jurt/test

2016-03-23 Thread Stephan Bergmann
 jurt/test/com/sun/star/lib/uno/environments/remote/TestWorkAt.java |9 
-
 1 file changed, 9 deletions(-)

New commits:
commit 8383055a258676726b589c8c912c19b30addbedc
Author: Stephan Bergmann 
Date:   Wed Mar 23 08:34:05 2016 +0100

Unused private fields

Change-Id: I69fd266df5cfb5392d1f2b5501bfb0b9e5f2cd83

diff --git a/jurt/test/com/sun/star/lib/uno/environments/remote/TestWorkAt.java 
b/jurt/test/com/sun/star/lib/uno/environments/remote/TestWorkAt.java
index e63be6f..94e233e 100644
--- a/jurt/test/com/sun/star/lib/uno/environments/remote/TestWorkAt.java
+++ b/jurt/test/com/sun/star/lib/uno/environments/remote/TestWorkAt.java
@@ -34,9 +34,6 @@ class TestWorkAt implements TestIWorkAt {
 int _sync_counter;
 int _async_counter;
 
-private Thread _sync_thread;
-private Thread _async_thread;
-
 private boolean _passedAsync = true;
 boolean _notified = false;
 
@@ -49,18 +46,12 @@ class TestWorkAt implements TestIWorkAt {
 if(_async_counter != MESSAGES)
 _passedAsync = false;
 
-if(_sync_thread == null)
-_sync_thread = Thread.currentThread();
-
 if(DEBUG) System.err.println("syncCall:" + _sync_counter + " " + 
_passedAsync + " " + Thread.currentThread());
 }
 
 public synchronized void asyncCall() throws Throwable {
 ++ _async_counter;
 
-if(_async_thread == null)
-_async_thread = Thread.currentThread();
-
 if(DEBUG) System.err.println("asyncCall:" + _async_counter + " " + 
Thread.currentThread());
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: jurt/test

2016-03-11 Thread Stephan Bergmann
 jurt/test/com/sun/star/lib/uno/environments/remote/TestWorkAt.java |   10 
+-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit b2d53cc003d070181d80af92d1568de1bdcfe73b
Author: Stephan Bergmann 
Date:   Fri Mar 11 11:50:50 2016 +0100

typo

Change-Id: I8ae443a69aab715a59f347a2de5a36b458a934f5

diff --git a/jurt/test/com/sun/star/lib/uno/environments/remote/TestWorkAt.java 
b/jurt/test/com/sun/star/lib/uno/environments/remote/TestWorkAt.java
index e753c65..e63be6f 100644
--- a/jurt/test/com/sun/star/lib/uno/environments/remote/TestWorkAt.java
+++ b/jurt/test/com/sun/star/lib/uno/environments/remote/TestWorkAt.java
@@ -37,7 +37,7 @@ class TestWorkAt implements TestIWorkAt {
 private Thread _sync_thread;
 private Thread _async_thread;
 
-private boolean _passedAync = true;
+private boolean _passedAsync = true;
 boolean _notified = false;
 
 public synchronized void syncCall() throws Throwable {
@@ -47,12 +47,12 @@ class TestWorkAt implements TestIWorkAt {
 // defer the check until passedAsyncTest and assert here
 assertEquals(MESSAGES, _async_counter);
 if(_async_counter != MESSAGES)
-_passedAync = false;
+_passedAsync = false;
 
 if(_sync_thread == null)
 _sync_thread = Thread.currentThread();
 
-if(DEBUG) System.err.println("syncCall:" + _sync_counter + " " + 
_passedAync + " " + Thread.currentThread());
+if(DEBUG) System.err.println("syncCall:" + _sync_counter + " " + 
_passedAsync + " " + Thread.currentThread());
 }
 
 public synchronized void asyncCall() throws Throwable {
@@ -81,7 +81,7 @@ class TestWorkAt implements TestIWorkAt {
 
 public synchronized boolean passedAsyncTest() {
 assertEquals(MESSAGES, _sync_counter);
-assertTrue(_passedAync);
-return  _passedAync && (_sync_counter == MESSAGES);
+assertTrue(_passedAsync);
+return  _passedAsync && (_sync_counter == MESSAGES);
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: jurt/test

2016-03-11 Thread Stephan Bergmann
 jurt/test/com/sun/star/lib/uno/environments/remote/TestWorkAt.java |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit feb480d78021541a264701ea811a5002accc
Author: Stephan Bergmann 
Date:   Fri Mar 11 11:49:35 2016 +0100

Synchronize all access to _sync_counter, _passedAync

Change-Id: I34e9b3fb9481af30ddda8cde45ccbb27819fc452

diff --git a/jurt/test/com/sun/star/lib/uno/environments/remote/TestWorkAt.java 
b/jurt/test/com/sun/star/lib/uno/environments/remote/TestWorkAt.java
index 6c4a472..e753c65 100644
--- a/jurt/test/com/sun/star/lib/uno/environments/remote/TestWorkAt.java
+++ b/jurt/test/com/sun/star/lib/uno/environments/remote/TestWorkAt.java
@@ -79,7 +79,7 @@ class TestWorkAt implements TestIWorkAt {
 _notified = true;
 }
 
-public boolean passedAsyncTest() {
+public synchronized boolean passedAsyncTest() {
 assertEquals(MESSAGES, _sync_counter);
 assertTrue(_passedAync);
 return  _passedAync && (_sync_counter == MESSAGES);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: jurt/test

2014-09-28 Thread Robert Antoni Buj i Gelonch
 jurt/test/com/sun/star/uno/AnyConverter_Test.java |   46 ++
 1 file changed, 31 insertions(+), 15 deletions(-)

New commits:
commit ab7ccd81340d693008411e088e85d9f3d61645a4
Author: Robert Antoni Buj i Gelonch robert@gmail.com
Date:   Sun Sep 28 17:17:17 2014 +0200

jurt: remove constructor in AnyConverter_Test (JUnit)

Change-Id: I4393b59d7d3a285160d6090847d9a16676f41f4d
Reviewed-on: https://gerrit.libreoffice.org/11677
Reviewed-by: David Ostrovsky da...@ostrovsky.org
Tested-by: David Ostrovsky da...@ostrovsky.org

diff --git a/jurt/test/com/sun/star/uno/AnyConverter_Test.java 
b/jurt/test/com/sun/star/uno/AnyConverter_Test.java
index eb55ae1..eba78ace 100644
--- a/jurt/test/com/sun/star/uno/AnyConverter_Test.java
+++ b/jurt/test/com/sun/star/uno/AnyConverter_Test.java
@@ -19,8 +19,9 @@
 package com.sun.star.uno;
 
 import com.sun.star.lang.XTypeProvider;
-import org.junit.Test;
 import static org.junit.Assert.*;
+import org.junit.Before;
+import org.junit.Test;
 
 public final class AnyConverter_Test {
 Any anyBool;
@@ -37,20 +38,35 @@ public final class AnyConverter_Test {
 Any anyVoid;
 Any anyXTypeProvider;
 
-Boolean aBool= Boolean.TRUE;
-Character aChar= new Character('A');
-Byte aByte= Byte.valueOf((byte) 111);
-Short aShort= Short.valueOf((short) 1);
-Integer aInt= Integer.valueOf( 111);
-Long aLong= Long.valueOf( 0x);
-Float aFloat= new Float( 3.14);
-Double aDouble= new Double( 3.145);
-Object aObj= new ATypeProvider();
-String aStr= I am a string;
-Type aType= new Type(String.class);
-byte[] arByte= new byte[] {1,2,3};
-
-public AnyConverter_Test() {
+Boolean aBool;
+Character aChar;
+Byte aByte;
+Short aShort;
+Integer aInt;
+Long aLong;
+Float aFloat;
+Double aDouble;
+Object aObj;
+String aStr;
+Type aType;
+byte[] arByte;
+
+/** Class variables are initialized before each Test method */
+@Before public void setUp() throws Exception
+{
+aBool= Boolean.TRUE;
+aChar= new Character('A');
+aByte= Byte.valueOf((byte) 111);
+aShort= Short.valueOf((short) 1);
+aInt= Integer.valueOf( 111);
+aLong= Long.valueOf( 0x);
+aFloat= new Float( 3.14);
+aDouble= new Double( 3.145);
+aObj= new ATypeProvider();
+aStr= I am a string;
+aType= new Type(String.class);
+arByte= new byte[] {1,2,3};
+
 anyVoid= new Any(new Type(void.class), null);
 anyBool= new Any(new Type(Boolean.TYPE), aBool);
 anyChar= new Any(new Type(Character.TYPE), aChar);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits