16 new revisions:

Revision: 90c42031ca1f
Branch:   default
Author:   Stefan Zimmermann <[email protected]>
Date:     Fri Nov 22 12:39:34 2013 UTC
Log:      README: New fork description
http://code.google.com/p/robotframework/source/detail?r=90c42031ca1f

Revision: a2a21f405fc9
Branch:   default
Author:   Stefan Zimmermann <[email protected]>
Date:     Fri Nov 22 12:54:36 2013 UTC
Log:      README: Updated bytes bookmark description
http://code.google.com/p/robotframework/source/detail?r=a2a21f405fc9

Revision: 509e9a20ad39
Branch:   default
Author:   Stefan Zimmermann <[email protected]>
Date:     Mon Nov 25 17:36:05 2013 UTC
Log:      Merged with https://robotframework.googlecode.com
http://code.google.com/p/robotframework/source/detail?r=509e9a20ad39

Revision: 5da74c5883c0
Branch:   default
Author:   Stefan Zimmermann <[email protected]>
Date:     Mon Nov 25 17:39:23 2013 UTC
Log:      README: Removed bytes bookmark info from fork description
http://code.google.com/p/robotframework/source/detail?r=5da74c5883c0

Revision: f911a66e1066
Branch:   default
Author:   Stefan Zimmermann <[email protected]>
Date:     Mon Nov 25 18:08:06 2013 UTC
Log:      JavaArgumentParser: *varargs with java.util.List
http://code.google.com/p/robotframework/source/detail?r=f911a66e1066

Revision: 82f0d2955ffc
Branch:   default
Author:   Stefan Zimmermann <[email protected]>
Date:     Mon Nov 25 18:10:33 2013 UTC
Log:      README: javavarargs bookmark info
http://code.google.com/p/robotframework/source/detail?r=82f0d2955ffc

Revision: dbff772621a0
Branch:   default
Author:   Stefan Zimmermann <[email protected]>
Date:     Mon Nov 25 18:13:43 2013 UTC
Log:      README: Little update
http://code.google.com/p/robotframework/source/detail?r=dbff772621a0

Revision: bf9869079e26
Branch:   default
Author:   Stefan Zimmermann <[email protected]>
Date:     Mon Nov 25 18:15:27 2013 UTC
Log:      Merged with fork master
http://code.google.com/p/robotframework/source/detail?r=bf9869079e26

Revision: 8c22b33d397a
Branch:   default
Author:   Stefan Zimmermann <[email protected]>
Date:     Tue Nov 26 11:45:22 2013 UTC
Log:      atest: keywords/java_arguments: Tests for List<...> arguments.
http://code.google.com/p/robotframework/source/detail?r=8c22b33d397a

Revision: fbe753bdd1c9
Branch:   default
Author:   Stefan Zimmermann <[email protected]>
Date:     Tue Nov 26 15:15:12 2013 UTC
Log: atest: keywords/java_arguments: More tests for List<...> arguments.
http://code.google.com/p/robotframework/source/detail?r=fbe753bdd1c9

Revision: 6525ba0fa8a7
Branch:   default
Author:   Stefan Zimmermann <[email protected]>
Date:     Tue Nov 26 15:17:37 2013 UTC
Log: userguide: CreatingTestLibraries: Java *varargs with java.util.List
http://code.google.com/p/robotframework/source/detail?r=6525ba0fa8a7

Revision: 41a12d751d07
Branch:   default
Author:   Jussi Malinen <[email protected]>
Date:     Thu Nov 28 13:39:53 2013 UTC
Log:      merge
http://code.google.com/p/robotframework/source/detail?r=41a12d751d07

Revision: 53222ce69744
Branch:   default
Author:   Jussi Malinen <[email protected]>
Date:     Thu Nov 28 14:41:59 2013 UTC
Log:      cleanup whitespace
http://code.google.com/p/robotframework/source/detail?r=53222ce69744

Revision: e98c7dd4ae74
Branch:   default
Author:   Jussi Malinen <[email protected]>
Date:     Thu Nov 28 14:42:23 2013 UTC
Log:      cleanup methods
http://code.google.com/p/robotframework/source/detail?r=e98c7dd4ae74

Revision: 40ad6a43d53f
Branch:   default
Author:   Jussi Malinen <[email protected]>
Date:     Thu Nov 28 14:43:04 2013 UTC
Log:      Cleanup tests
http://code.google.com/p/robotframework/source/detail?r=40ad6a43d53f

Revision: 929f68213799
Branch:   default
Author:   Jussi Malinen <[email protected]>
Date:     Thu Nov 28 14:43:19 2013 UTC
Log:      regen test classes
http://code.google.com/p/robotframework/source/detail?r=929f68213799

==============================================================================
Revision: 90c42031ca1f
Branch:   default
Author:   Stefan Zimmermann <[email protected]>
Date:     Fri Nov 22 12:39:34 2013 UTC
Log:      README: New fork description
http://code.google.com/p/robotframework/source/detail?r=90c42031ca1f

Modified:
 /README.txt

=======================================
--- /README.txt Wed Nov 20 16:40:40 2013 UTC
+++ /README.txt Fri Nov 22 12:39:34 2013 UTC
@@ -1,3 +1,28 @@
+This is a Robot Framework 2.8.x fork from https://robotframework.googlecode.com
+
+It contains the following feature bookmarks:
+
+https://bitbucket.org/userzimmermann/robotframework/commits/branch/bytes
+
+- Adds a ``Bytes`` Library
+  for creating, manipulating and verifying ``bytearray``s.
+
+https://bitbucket.org/userzimmermann/robotframework/commits/branch/javakwargs
+
+- Supports \**kwargs in Static Java Test Library Keywords
+  via ``java.util.Map`` as last argument.
+
+A separate branch adds Python 3.x compatibility:
+
+https://bitbucket.org/userzimmermann/robotframework/commits/branch/python3
+
+And there is a branch with experimental support for \**kwargs in User Keywords:
+
+https://bitbucket.org/userzimmermann/robotframework/commits/branch/userkwargs
+
+-- Stefan Zimmermann
+
+
 Robot Framework
 ===============


==============================================================================
Revision: a2a21f405fc9
Branch:   default
Author:   Stefan Zimmermann <[email protected]>
Date:     Fri Nov 22 12:54:36 2013 UTC
Log:      README: Updated bytes bookmark description
http://code.google.com/p/robotframework/source/detail?r=a2a21f405fc9

Modified:
 /README.txt

=======================================
--- /README.txt Fri Nov 22 12:39:34 2013 UTC
+++ /README.txt Fri Nov 22 12:54:36 2013 UTC
@@ -4,8 +4,8 @@

 https://bitbucket.org/userzimmermann/robotframework/commits/branch/bytes

-- Adds a ``Bytes`` Library
-  for creating, manipulating and verifying ``bytearray``s.
+- Adds a ``Bytes`` Library for creating and verifying byte strings
+  with focus on binary data.

https://bitbucket.org/userzimmermann/robotframework/commits/branch/javakwargs


==============================================================================
Revision: 509e9a20ad39
Branch:   default
Author:   Stefan Zimmermann <[email protected]>
Date:     Mon Nov 25 17:36:05 2013 UTC
Log:      Merged with https://robotframework.googlecode.com
http://code.google.com/p/robotframework/source/detail?r=509e9a20ad39

Deleted:
 /atest/testresources/testlibs/FailUntilSucceeds.py
 /doc/api/_static/javadoc/resources/inherit.gif

=======================================
--- /atest/testresources/testlibs/FailUntilSucceeds.py Tue Nov 19 08:31:47 2013 UTC
+++ /dev/null
@@ -1,14 +0,0 @@
-class FailUntilSucceeds:
-    ROBOT_LIBRARY_SCOPE = 'TESTCASE'
-
-    def __init__(self, times_to_fail=0):
-        self.times_to_fail = int(times_to_fail)
-
-    def set_times_to_fail(self, times_to_fail):
-        self.__init__(times_to_fail)
-
-    def fail_until_retried_often_enough(self, message="Hello"):
-        self.times_to_fail -= 1
-        if self.times_to_fail >= 0:
-            raise Exception('Still %d times to fail!' % self.times_to_fail)
-        return message
=======================================
--- /doc/api/_static/javadoc/resources/inherit.gif Tue Jun 4 09:40:03 2013 UTC
+++ /dev/null
@@ -1,2 +0,0 @@
-GIF89a    €  ÿÿÿ   ,           „       ¡½® DršjñÔ ;߀Q@–¦
-N  ;

==============================================================================
Revision: 5da74c5883c0
Branch:   default
Author:   Stefan Zimmermann <[email protected]>
Date:     Mon Nov 25 17:39:23 2013 UTC
Log:      README: Removed bytes bookmark info from fork description
http://code.google.com/p/robotframework/source/detail?r=5da74c5883c0

Modified:
 /README.txt

=======================================
--- /README.txt Fri Nov 22 12:54:36 2013 UTC
+++ /README.txt Mon Nov 25 17:39:23 2013 UTC
@@ -1,11 +1,6 @@
This is a Robot Framework 2.8.x fork from https://robotframework.googlecode.com

-It contains the following feature bookmarks:
-
-https://bitbucket.org/userzimmermann/robotframework/commits/branch/bytes
-
-- Adds a ``Bytes`` Library for creating and verifying byte strings
-  with focus on binary data.
+It currently contains the following feature bookmarks:

https://bitbucket.org/userzimmermann/robotframework/commits/branch/javakwargs


==============================================================================
Revision: f911a66e1066
Branch:   default
Author:   Stefan Zimmermann <[email protected]>
Date:     Mon Nov 25 18:08:06 2013 UTC
Log:      JavaArgumentParser: *varargs with java.util.List
http://code.google.com/p/robotframework/source/detail?r=f911a66e1066

Modified:
 /src/robot/running/arguments/argumentparser.py

=======================================
--- /src/robot/running/arguments/argumentparser.py Thu Nov 21 12:51:47 2013 UTC +++ /src/robot/running/arguments/argumentparser.py Mon Nov 25 18:08:06 2013 UTC
@@ -13,6 +13,7 @@
 import inspect
 if sys.platform.startswith('java'):
     from java.lang import Class
+    from java.util import List

 from robot.errors import DataError
 from robot.variables import is_list_var, is_scalar_var
@@ -56,9 +57,13 @@
         # Happens when a class has no public constructors
         return self._format_arg_spec()

+    def _is_varargs_type(self, arg):
+        return isinstance(arg, Class) and (
+          arg.isArray() or issubclass(arg, List))
+
     def _single_signature_arg_spec(self, signature):
         args = signature.args
-        if args and isinstance(args[-1], Class) and args[-1].isArray():
+        if args and self._is_varargs_type(args[-1]):
             return self._format_arg_spec(len(args)-1, varargs=True)
         return self._format_arg_spec(len(args))


==============================================================================
Revision: 82f0d2955ffc
Branch:   default
Author:   Stefan Zimmermann <[email protected]>
Date:     Mon Nov 25 18:10:33 2013 UTC
Log:      README: javavarargs bookmark info
http://code.google.com/p/robotframework/source/detail?r=82f0d2955ffc

Modified:
 /README.txt

=======================================
--- /README.txt Mon Nov 25 17:39:23 2013 UTC
+++ /README.txt Mon Nov 25 18:10:33 2013 UTC
@@ -2,6 +2,11 @@

 It currently contains the following feature bookmarks:

+https://bitbucket.org/userzimmermann/robotframework/commits/branch/javavarargs
+
+- Supports ``java.util.List`` for \*varargs argument
+  in Static Java Test Library Keywords
+
https://bitbucket.org/userzimmermann/robotframework/commits/branch/javakwargs

 - Supports \**kwargs in Static Java Test Library Keywords

==============================================================================
Revision: dbff772621a0
Branch:   default
Author:   Stefan Zimmermann <[email protected]>
Date:     Mon Nov 25 18:13:43 2013 UTC
Log:      README: Little update
http://code.google.com/p/robotframework/source/detail?r=dbff772621a0

Modified:
 /README.txt

=======================================
--- /README.txt Mon Nov 25 18:10:33 2013 UTC
+++ /README.txt Mon Nov 25 18:13:43 2013 UTC
@@ -4,13 +4,14 @@

https://bitbucket.org/userzimmermann/robotframework/commits/branch/javavarargs

-- Supports ``java.util.List`` for \*varargs argument
+- Supports ``java.util.List`` for ``*varargs`` argument
   in Static Java Test Library Keywords

https://bitbucket.org/userzimmermann/robotframework/commits/branch/javakwargs

-- Supports \**kwargs in Static Java Test Library Keywords
+- Supports ``**kwargs`` in Static Java Test Library Keywords
   via ``java.util.Map`` as last argument.
+- Includes ``javavarargs`` features above.

 A separate branch adds Python 3.x compatibility:


==============================================================================
Revision: bf9869079e26
Branch:   default
Author:   Stefan Zimmermann <[email protected]>
Date:     Mon Nov 25 18:15:27 2013 UTC
Log:      Merged with fork master
http://code.google.com/p/robotframework/source/detail?r=bf9869079e26



==============================================================================
Revision: 8c22b33d397a
Branch:   default
Author:   Stefan Zimmermann <[email protected]>
Date:     Tue Nov 26 11:45:22 2013 UTC
Log:      atest: keywords/java_arguments: Tests for List<...> arguments.
http://code.google.com/p/robotframework/source/detail?r=8c22b33d397a

Modified:
 /atest/robot/keywords/java_arguments.txt
 /atest/testdata/keywords/java_arguments.txt
 /atest/testresources/testlibs/ArgumentTypes.java

=======================================
--- /atest/robot/keywords/java_arguments.txt    Tue Apr 16 20:36:05 2013 UTC
+++ /atest/robot/keywords/java_arguments.txt    Tue Nov 26 11:45:22 2013 UTC
@@ -46,6 +46,9 @@

 Valid Arguments For Keyword Expecting Non String Array Arguments
     Check Test Case    ${TESTNAME}
+
+Valid Arguments For Keyword Expecting Non String List Arguments
+    Check Test Case    ${TESTNAME}

 Invalid Argument Types
     Check Test Case    ${TESTNAME} 1
=======================================
--- /atest/testdata/keywords/java_arguments.txt Thu Apr 25 13:25:33 2013 UTC
+++ /atest/testdata/keywords/java_arguments.txt Tue Nov 26 11:45:22 2013 UTC
@@ -92,6 +92,9 @@
     ${array3} =    Get String Array    Hello    string    array    world
     Should Be Equal    ${array1}    ${array2}
     Should Be Equal    ${array2}    ${array3}
+    String List    ${list}
+    String List    ${array1.tolist()}
+    String List    Hello    string    list    world

 Valid Arguments For Keyword Expecting Non String Scalar Arguments
     Byte 1    ${1}
@@ -159,6 +162,18 @@
     ${ht} =    Get Hashtable
     Object Array
     Object Array    ${obj}    ${ht}    hello world    ${42}    ${null}
+
+Valid Arguments For Keyword Expecting Non String List Arguments
+    Integer List
+    Integer List    ${0}    ${1}    ${2}    ${10000}    ${-10000}
+    Double List
+    Double List    ${0.}    ${1.}    ${2.}    ${-3.14}    ${10*3.}
+    Boolean List
+    Boolean List    ${True}    ${False}    ${True}    ${False}
+    ${obj} =    Get Java Object    my name
+    ${ht} =    Get Hashtable
+    Object List
+    Object List    ${obj}    ${ht}    hello world    ${42}    ${null}

 Invalid Argument Types 1
[Documentation] FAIL ValueError: Argument at position 1 cannot be coerced to integer.
=======================================
--- /atest/testresources/testlibs/ArgumentTypes.java Sat May 31 16:57:24 2008 UTC +++ /atest/testresources/testlibs/ArgumentTypes.java Tue Nov 26 11:45:22 2013 UTC
@@ -1,3 +1,4 @@
+import java.util.*;


 public class ArgumentTypes {
@@ -171,4 +172,31 @@
         }
     }

+    /* Lists (5) - No element type cast on coercion! */
+
+    public void integer_list(List<Integer> il) {
+        for (int i : il) {
+            this.integer1(i);
+        }
+    }
+    public void double_list(List<Double> dl) {
+        for (double d : dl) {
+            this.double1(d);
+        }
+    }
+    public void boolean_list(List<Boolean> bl) {
+        for (boolean b : bl) {
+            this.boolean1(b);
+        }
+    }
+    public void string_list(List<String> sl) {
+        for (String s : sl) {
+            this.string(s);
+        }
+    }
+    public void object_list(List<Object> ol) {
+        for (Object o : ol) {
+            this.object(o);
+        }
+    }
 }

==============================================================================
Revision: fbe753bdd1c9
Branch:   default
Author:   Stefan Zimmermann <[email protected]>
Date:     Tue Nov 26 15:15:12 2013 UTC
Log: atest: keywords/java_arguments: More tests for List<...> arguments.
http://code.google.com/p/robotframework/source/detail?r=fbe753bdd1c9

Added:
 /atest/testresources/testlibs/ListArgumentsJava.java
Modified:
 /atest/robot/keywords/java_arguments.txt
 /atest/testdata/keywords/java_arguments.txt

=======================================
--- /dev/null
+++ /atest/testresources/testlibs/ListArgumentsJava.java Tue Nov 26 15:15:12 2013 UTC
@@ -0,0 +1,24 @@
+import java.util.*;
+
+
+public class ListArgumentsJava {
+
+    public ListArgumentsJava(String arg, List<String> varargs) {
+    }
+
+    public String a_0_list(List<String> args) {
+        String ret = "a_0_list:";
+        for (String s : args) {
+            ret += " " + s;
+        }
+        return ret;
+    }
+
+    public String a_1_list(String arg, List<String> args) {
+        String ret = "a_1_list: " + arg;
+        for (String s : args) {
+            ret += " " + s;
+        }
+        return ret;
+    }
+}
=======================================
--- /atest/robot/keywords/java_arguments.txt    Tue Nov 26 11:45:22 2013 UTC
+++ /atest/robot/keywords/java_arguments.txt    Tue Nov 26 15:15:12 2013 UTC
@@ -36,6 +36,9 @@

 Too Few Arguments With Varargs
     Check Test Case    ${TESTNAME}
+
+Too Few Arguments With Varargs List
+    Check Test Case    ${TESTNAME}

 Varargs Work Also With Arrays And Lists
[Documentation] Make sure varargs support doesn't make it impossible to used Java arrays and Python lists with Java keyword expecting arrays.
=======================================
--- /atest/testdata/keywords/java_arguments.txt Tue Nov 26 11:45:22 2013 UTC
+++ /atest/testdata/keywords/java_arguments.txt Tue Nov 26 15:15:12 2013 UTC
@@ -1,5 +1,6 @@
 *** Settings ***
 Library           ArgumentsJava    Arg    and    varargs    accepted
+Library           ListArgumentsJava    Arg    and    varargs    accepted
 Library           ArgumentTypes
 Library           ExampleJavaLibrary

@@ -69,22 +70,39 @@
 Correct Number Of Arguments With Varargs
     ${ret} =    A 0 N
     Should Be Equal    ${ret}    a_0_n:
+    ${ret} =    A 0 List
+    Should Be Equal    ${ret}    a_0_list:
     ${ret} =    A 0 N    My arg
     Should Be Equal    ${ret}    a_0_n: My arg
+    ${ret} =    A 0 List    My arg
+    Should Be Equal    ${ret}    a_0_list: My arg
     ${ret} =    A 0 N    1    2    3    4
     Should Be Equal    ${ret}    a_0_n: 1 2 3 4
+    ${ret} =    A 0 List    1    2    3    4
+    Should Be Equal    ${ret}    a_0_list: 1 2 3 4
     ${ret} =    A 1 N    Required arg
     Should Be Equal    ${ret}    a_1_n: Required arg
+    ${ret} =    A 1 List    Required arg
+    Should Be Equal    ${ret}    a_1_list: Required arg
     ${ret} =    A 1 N    Required arg    plus one
     Should Be Equal    ${ret}    a_1_n: Required arg plus one
+    ${ret} =    A 1 List    Required arg    plus one
+    Should Be Equal    ${ret}    a_1_list: Required arg plus one
     ${ret} =    A 1 N    1 (req)    2    3    4    5
     ...    6    7    8    9
     Should Be Equal    ${ret}    a_1_n: 1 (req) 2 3 4 5 6 7 8 9
+    ${ret} =    A 1 List    1 (req)    2    3    4    5
+    ...    6    7    8    9
+    Should Be Equal    ${ret}    a_1_list: 1 (req) 2 3 4 5 6 7 8 9

 Too Few Arguments With Varargs
[Documentation] FAIL Keyword 'ArgumentsJava.A 1 N' expected at least 1 argument, got 0.
     A 1 N

+Too Few Arguments With Varargs List
+ [Documentation] FAIL Keyword 'ListArgumentsJava.A 1 List' expected at least 1 argument, got 0.
+    A 1 List
+
 Varargs Work Also With Arrays And Lists
     ${list} =    List    Hello    string    array    world
     ${array1} =    Get String Array    ${list}
@@ -92,7 +110,12 @@
     ${array3} =    Get String Array    Hello    string    array    world
     Should Be Equal    ${array1}    ${array2}
     Should Be Equal    ${array2}    ${array3}
+    @{list1} =    Get String Array    ${list}
+    ${list2} =    Get String List    ${list}
     String List    ${list}
+    String List    ${list1}
+    String List    ${list2}
+    String List    @{array1}
     String List    ${array1.tolist()}
     String List    Hello    string    list    world


==============================================================================
Revision: 6525ba0fa8a7
Branch:   default
Author:   Stefan Zimmermann <[email protected]>
Date:     Tue Nov 26 15:17:37 2013 UTC
Log: userguide: CreatingTestLibraries: Java *varargs with java.util.List
http://code.google.com/p/robotframework/source/detail?r=6525ba0fa8a7

Modified:
 /doc/userguide/src/ExtendingRobotFramework/CreatingTestLibraries.rst

=======================================
--- /doc/userguide/src/ExtendingRobotFramework/CreatingTestLibraries.rst Mon Nov 25 10:27:20 2013 UTC +++ /doc/userguide/src/ExtendingRobotFramework/CreatingTestLibraries.rst Tue Nov 26 15:17:37 2013 UTC
@@ -685,8 +685,9 @@
   }

For legacy reasons it is possible to use variable number of arguments also by
-having an array as the last argument. This is illustrated by the following
-examples that are identical to the previous ones:
+having an array or a :code:`java.util.List` as the last argument.
+This is illustrated by the following examples that are identical
+to the previous ones:

 .. sourcecode:: java

@@ -696,6 +697,13 @@
           System.out.println(arg);
       }
   }
+
+  public void anyArguments(List<String> varargs) {
+      System.out.println("Got arguments:");
+      for (String arg: varargs) {
+          System.out.println(arg);
+      }
+  }

   public void oneRequired(String required, String[] others) {
       System.out.println("Required: " + required + "\nOthers:");
@@ -703,6 +711,13 @@
           System.out.println(arg);
       }
   }
+
+  public void oneRequired(String required, List<String> others) {
+      System.out.println("Required: " + required + "\nOthers:");
+      for (String arg: others) {
+          System.out.println(arg);
+      }
+  }

 The support for variable number of arguments with Java keywords has one
 limitation: it works only when methods have one signature. Thus it is not

==============================================================================
Revision: 41a12d751d07
Branch:   default
Author:   Jussi Malinen <[email protected]>
Date:     Thu Nov 28 13:39:53 2013 UTC
Log:      merge
http://code.google.com/p/robotframework/source/detail?r=41a12d751d07

Modified:
 /README.txt
 /doc/userguide/src/ExtendingRobotFramework/CreatingTestLibraries.rst

=======================================
--- /doc/userguide/src/ExtendingRobotFramework/CreatingTestLibraries.rst Tue Nov 26 13:13:37 2013 UTC +++ /doc/userguide/src/ExtendingRobotFramework/CreatingTestLibraries.rst Thu Nov 28 13:39:53 2013 UTC
@@ -685,8 +685,9 @@
   }

For legacy reasons it is possible to use variable number of arguments also by
-having an array as the last argument. This is illustrated by the following
-examples that are identical to the previous ones:
+having an array or a :code:`java.util.List` as the last argument.
+This is illustrated by the following examples that are identical
+to the previous ones:

 .. sourcecode:: java

@@ -696,6 +697,13 @@
           System.out.println(arg);
       }
   }
+
+  public void anyArguments(List<String> varargs) {
+      System.out.println("Got arguments:");
+      for (String arg: varargs) {
+          System.out.println(arg);
+      }
+  }

   public void oneRequired(String required, String[] others) {
       System.out.println("Required: " + required + "\nOthers:");
@@ -703,6 +711,13 @@
           System.out.println(arg);
       }
   }
+
+  public void oneRequired(String required, List<String> others) {
+      System.out.println("Required: " + required + "\nOthers:");
+      for (String arg: others) {
+          System.out.println(arg);
+      }
+  }

 The support for variable number of arguments with Java keywords has one
 limitation: it works only when methods have one signature. Thus it is not

==============================================================================
Revision: 53222ce69744
Branch:   default
Author:   Jussi Malinen <[email protected]>
Date:     Thu Nov 28 14:41:59 2013 UTC
Log:      cleanup whitespace
http://code.google.com/p/robotframework/source/detail?r=53222ce69744

Modified:
 /atest/testresources/testlibs/ArgumentTypes.java

=======================================
--- /atest/testresources/testlibs/ArgumentTypes.java Tue Nov 26 11:45:22 2013 UTC +++ /atest/testresources/testlibs/ArgumentTypes.java Thu Nov 28 14:41:59 2013 UTC
@@ -68,112 +68,112 @@
         System.out.println(s);
     }
     public void object(Object o) {
-       try {
-               System.out.println(o.toString());
-       }
-       catch (NullPointerException n) {
-               System.out.println("null");
-       }
+        try {
+            System.out.println(o.toString());
+        }
+        catch (NullPointerException n) {
+            System.out.println("null");
+        }
     }
-
+
     /* Primitive arrays (8) */
-
+
     public void byte1_array(byte[] ia) {
-        for (int i=0; i<ia.length; i++) {
+        for (int i=0; i<ia.length; i++) {
             this.byte1(ia[i]);
         }
     }
     public void short1_array(short[] ia) {
-        for (int i=0; i<ia.length; i++) {
+        for (int i=0; i<ia.length; i++) {
             this.short1(ia[i]);
         }
     }
     public void integer1_array(int[] ia) {
-        for (int i=0; i<ia.length; i++) {
+        for (int i=0; i<ia.length; i++) {
             this.integer1(ia[i]);
         }
     }
     public void long1_array(long[] ia) {
-        for (int i=0; i<ia.length; i++) {
+        for (int i=0; i<ia.length; i++) {
             this.long1(ia[i]);
         }
     }
     public void float1_array(float[] fa) {
-        for (int i=0; i<fa.length; i++) {
+        for (int i=0; i<fa.length; i++) {
             this.float1(fa[i]);
         }
     }
     public void double1_array(double[] da) {
-        for (int i=0; i<da.length; i++) {
+        for (int i=0; i<da.length; i++) {
             this.double1(da[i]);
         }
     }
     public void boolean1_array(boolean[] ba) {
-        for (int i=0; i<ba.length; i++) {
+        for (int i=0; i<ba.length; i++) {
             this.boolean1(ba[i]);
         }
     }
     public void char1_array(char[] ca) {
-        for (int i=0; i<ca.length; i++) {
+        for (int i=0; i<ca.length; i++) {
             this.char1(ca[i]);
         }
     }

     /* java.lang arrays (9) */
-
+
     public void byte2_array(Byte[] ia) {
-        for (int i=0; i<ia.length; i++) {
+        for (int i=0; i<ia.length; i++) {
             this.byte2(ia[i]);
         }
     }
     public void short2_array(Short[] ia) {
-        for (int i=0; i<ia.length; i++) {
+        for (int i=0; i<ia.length; i++) {
             this.short2(ia[i]);
         }
     }
     public void integer2_array(Integer[] ia) {
-        for (int i=0; i<ia.length; i++) {
+        for (int i=0; i<ia.length; i++) {
             this.integer2(ia[i]);
         }
     }
     public void long2_array(Long[] ia) {
-        for (int i=0; i<ia.length; i++) {
+        for (int i=0; i<ia.length; i++) {
             this.long2(ia[i]);
         }
     }
     public void float2_array(Float[] fa) {
-        for (int i=0; i<fa.length; i++) {
+        for (int i=0; i<fa.length; i++) {
             this.float2(fa[i]);
         }
     }
     public void double2_array(Double[] da) {
-        for (int i=0; i<da.length; i++) {
+        for (int i=0; i<da.length; i++) {
             this.double2(da[i]);
         }
     }
     public void boolean2_array(Boolean[] ba) {
-        for (int i=0; i<ba.length; i++) {
+        for (int i=0; i<ba.length; i++) {
             this.boolean2(ba[i]);
         }
     }
     public void char2_array(Character[] ca) {
-        for (int i=0; i<ca.length; i++) {
+        for (int i=0; i<ca.length; i++) {
             this.char2(ca[i]);
         }
     }
     public void string_array(String[] sa) {
-        for (int i=0; i<sa.length; i++) {
+        for (int i=0; i<sa.length; i++) {
             this.string(sa[i]);
         }
     }
     public void object_array(Object[] oa) {
-        for (int i=0; i<oa.length; i++) {
+        for (int i=0; i<oa.length; i++) {
             this.object(oa[i]);
         }
     }
-
+
     /* Lists (5) - No element type cast on coercion! */
-
+
     public void integer_list(List<Integer> il) {
         for (int i : il) {
             this.integer1(i);

==============================================================================
Revision: e98c7dd4ae74
Branch:   default
Author:   Jussi Malinen <[email protected]>
Date:     Thu Nov 28 14:42:23 2013 UTC
Log:      cleanup methods
http://code.google.com/p/robotframework/source/detail?r=e98c7dd4ae74

Modified:
 /src/robot/running/arguments/argumentparser.py

=======================================
--- /src/robot/running/arguments/argumentparser.py Mon Nov 25 18:08:06 2013 UTC +++ /src/robot/running/arguments/argumentparser.py Thu Nov 28 14:42:23 2013 UTC
@@ -57,16 +57,16 @@
         # Happens when a class has no public constructors
         return self._format_arg_spec()

-    def _is_varargs_type(self, arg):
-        return isinstance(arg, Class) and (
-          arg.isArray() or issubclass(arg, List))
-
     def _single_signature_arg_spec(self, signature):
         args = signature.args
         if args and self._is_varargs_type(args[-1]):
             return self._format_arg_spec(len(args)-1, varargs=True)
         return self._format_arg_spec(len(args))

+    def _is_varargs_type(self, arg):
+        return isinstance(arg, Class) and (
+          arg.isArray() or issubclass(arg, List))
+
     def _multi_signature_arg_spec(self, signatures):
         mina = maxa = len(signatures[0].args)
         for sig in signatures[1:]:

==============================================================================
Revision: 40ad6a43d53f
Branch:   default
Author:   Jussi Malinen <[email protected]>
Date:     Thu Nov 28 14:43:04 2013 UTC
Log:      Cleanup tests
http://code.google.com/p/robotframework/source/detail?r=40ad6a43d53f

Modified:
 /atest/robot/keywords/java_arguments.txt
 /atest/testdata/keywords/java_arguments.txt

=======================================
--- /atest/robot/keywords/java_arguments.txt    Tue Nov 26 15:15:12 2013 UTC
+++ /atest/robot/keywords/java_arguments.txt    Thu Nov 28 14:43:04 2013 UTC
@@ -40,7 +40,11 @@
 Too Few Arguments With Varargs List
     Check Test Case    ${TESTNAME}

-Varargs Work Also With Arrays And Lists
+Varargs Work Also With Arrays
+ [Documentation] Make sure varargs support doesn't make it impossible to used Java arrays and Python lists with Java keyword expecting arrays.
+    Check Test Case    ${TESTNAME}
+
+Varargs Work Also With Lists
[Documentation] Make sure varargs support doesn't make it impossible to used Java arrays and Python lists with Java keyword expecting arrays.
     Check Test Case    ${TESTNAME}

=======================================
--- /atest/testdata/keywords/java_arguments.txt Tue Nov 26 15:15:12 2013 UTC
+++ /atest/testdata/keywords/java_arguments.txt Thu Nov 28 14:43:04 2013 UTC
@@ -68,32 +68,13 @@
     A 1 3    This    is    too    much

 Correct Number Of Arguments With Varargs
-    ${ret} =    A 0 N
-    Should Be Equal    ${ret}    a_0_n:
-    ${ret} =    A 0 List
-    Should Be Equal    ${ret}    a_0_list:
-    ${ret} =    A 0 N    My arg
-    Should Be Equal    ${ret}    a_0_n: My arg
-    ${ret} =    A 0 List    My arg
-    Should Be Equal    ${ret}    a_0_list: My arg
-    ${ret} =    A 0 N    1    2    3    4
-    Should Be Equal    ${ret}    a_0_n: 1 2 3 4
-    ${ret} =    A 0 List    1    2    3    4
-    Should Be Equal    ${ret}    a_0_list: 1 2 3 4
-    ${ret} =    A 1 N    Required arg
-    Should Be Equal    ${ret}    a_1_n: Required arg
-    ${ret} =    A 1 List    Required arg
-    Should Be Equal    ${ret}    a_1_list: Required arg
-    ${ret} =    A 1 N    Required arg    plus one
-    Should Be Equal    ${ret}    a_1_n: Required arg plus one
-    ${ret} =    A 1 List    Required arg    plus one
-    Should Be Equal    ${ret}    a_1_list: Required arg plus one
-    ${ret} =    A 1 N    1 (req)    2    3    4    5
-    ...    6    7    8    9
-    Should Be Equal    ${ret}    a_1_n: 1 (req) 2 3 4 5 6 7 8 9
-    ${ret} =    A 1 List    1 (req)    2    3    4    5
-    ...    6    7    8    9
-    Should Be Equal    ${ret}    a_1_list: 1 (req) 2 3 4 5 6 7 8 9
+    [Template]    Verify varargs for array and list
+    a_0
+    a_0       My arg
+    a_0       1    2    3    4
+    a_1       Required arg
+    a_1       Required arg    plus one
+    a_1       1 (req)    2    3    4    5    6    7    8    9

 Too Few Arguments With Varargs
[Documentation] FAIL Keyword 'ArgumentsJava.A 1 N' expected at least 1 argument, got 0.
@@ -103,15 +84,19 @@
[Documentation] FAIL Keyword 'ListArgumentsJava.A 1 List' expected at least 1 argument, got 0.
     A 1 List

-Varargs Work Also With Arrays And Lists
+Varargs Work Also With Arrays
     ${list} =    List    Hello    string    array    world
     ${array1} =    Get String Array    ${list}
     ${array2} =    Get String Array    ${array1}
     ${array3} =    Get String Array    Hello    string    array    world
     Should Be Equal    ${array1}    ${array2}
     Should Be Equal    ${array2}    ${array3}
-    @{list1} =    Get String Array    ${list}
-    ${list2} =    Get String List    ${list}
+
+Varargs Work Also With Lists
+    ${list} =      List    Hello    string    array    world
+    ${array1} =    Get String Array    ${list}
+    @{list1} =     Get String Array    ${list}
+    ${list2} =     Get String List    ${list}
     String List    ${list}
     String List    ${list1}
     String List    ${list2}
@@ -231,3 +216,15 @@
     A 1    @{EMPTY}    arg
     A 3    @{LIST}
     A 3    @{LIST}    @{EMPTY}
+
+*** Keywords ***
+Verify varargs for array and list
+    [Arguments]    ${keyword}   @{args}
+    Verify varargs   ${keyword}_n      @{args}
+    Verify varargs   ${keyword}_list   @{args}
+
+Verify varargs
+    [Arguments]    ${keyword}   @{args}
+    ${expected} =    Catenate    ${keyword}:    @{args}
+    ${res}=    Run keyword    ${keyword}     @{args}
+    Should be equal    ${res}    ${expected}

==============================================================================
Revision: 929f68213799
Branch:   default
Author:   Jussi Malinen <[email protected]>
Date:     Thu Nov 28 14:43:19 2013 UTC
Log:      regen test classes
http://code.google.com/p/robotframework/source/detail?r=929f68213799

Modified:
 /atest/testresources/testlibs/ArgumentTypes.class
 /atest/testresources/testlibs/ExampleJavaLibrary.class

=======================================
--- /atest/testresources/testlibs/ArgumentTypes.class Wed Aug 25 12:10:48 2010 UTC +++ /atest/testresources/testlibs/ArgumentTypes.class Thu Nov 28 14:43:19 2013 UTC
Binary file, no diff available.
=======================================
--- /atest/testresources/testlibs/ExampleJavaLibrary.class Tue Sep 17 13:10:49 2013 UTC +++ /atest/testresources/testlibs/ExampleJavaLibrary.class Thu Nov 28 14:43:19 2013 UTC
Binary file, no diff available.

--

--- You received this message because you are subscribed to the Google Groups "robotframework-commit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to