Revision: 8de6db269a65
Branch:   default
Author:   Pekka Klärck
Date:     Tue Dec  3 09:35:09 2013 UTC
Log: java kwargs atests: 1) added test for too many positional when using kwargs, 2) removed unnecessary 'on java' post-fix from tests
http://code.google.com/p/robotframework/source/detail?r=8de6db269a65

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

=======================================
--- /atest/robot/keywords/java_arguments.txt    Mon Dec  2 20:38:01 2013 UTC
+++ /atest/robot/keywords/java_arguments.txt    Tue Dec  3 09:35:09 2013 UTC
@@ -48,17 +48,21 @@
[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}

-Kwargs on java
+Kwargs
     Check Test Case    ${TESTNAME}

-Normal and Kwargs on java
+Normal and Kwargs
     Check Test Case    ${TESTNAME}

-Varargs and Kwargs on java
+Varargs and Kwargs
     Check Test Case    ${TESTNAME}

-All args on java
+All args
     Check Test Case    ${TESTNAME}
+
+Too many positional with kwargs
+    Check Test Case    ${TESTNAME} 1
+    Check Test Case    ${TESTNAME} 2

 Java kwargs wont be interpreted as values for positional arguments
     Check Test Case    ${TESTNAME}
=======================================
--- /atest/testdata/keywords/java_arguments.txt Tue Dec  3 00:48:41 2013 UTC
+++ /atest/testdata/keywords/java_arguments.txt Tue Dec  3 09:35:09 2013 UTC
@@ -105,22 +105,30 @@
     String List    ${array1.tolist()}
     String List    Hello    string    list    world

-Kwargs on java
+Kwargs
    ${res} =       javaKWArgs    foo=one   bar=two
    Should be equal    ${res}    javaKWArgs: foo:one bar:two

-Normal and Kwargs on java
+Normal and Kwargs
    ${res} =       javaNormalAndKWArgs    hello   foo=one   bar=two
    Should be equal    ${res}    javaNormalAndKWArgs: hello foo:one bar:two

-Varargs and Kwargs on java
+Varargs and Kwargs
    ${res} =       javaVarArgsAndKWArgs    hello   kitty  foo=one   bar=two
Should be equal ${res} javaVarArgsAndKWArgs: hello kitty foo:one bar:two

-All args on java
+All args
    ${res} =       javaAllArgs    arg   hello   kitty  foo=one   bar=two
Should be equal ${res} javaAllArgs: arg hello kitty foo:one bar:two

+Too many positional with kwargs 1
+ [Documentation] FAIL Keyword 'ArgumentsJava.Java KW Args' expected 0 non-keyword arguments, got 3.
+    Java kwargs    too    many    positional    foo=bar
+
+Too many positional with kwargs 2
+ [Documentation] FAIL Keyword 'ArgumentsJava.Java Normal And KW Args' expected 1 non-keyword argument, got 3.
+    Java normal and kwargs    too    many    positional    foo=bar
+
 Java kwargs wont be interpreted as values for positional arguments
    ${res} =       javaManyNormalArgs    foo   huu   arg1=one
    Should be equal    ${res}    javaManyNormalArgs: foo huu arg1:one

--

--- 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