@@ -332,6 +332,11 @@ func TestBuiltinFuncs(t *testing.T) {
332332 {f : "ord" , args : wrapArgs ("foo" ), wantExc : mustCreateException (ValueErrorType , "ord() expected a character, but string of length 3 found" )},
333333 {f : "ord" , args : wrapArgs (NewUnicode ("волн" )), wantExc : mustCreateException (ValueErrorType , "ord() expected a character, but string of length 4 found" )},
334334 {f : "ord" , args : wrapArgs (1 , 2 , 3 ), wantExc : mustCreateException (TypeErrorType , "'ord' requires 1 arguments" )},
335+ {f : "pow" , args : wrapArgs (1 ), wantExc : mustCreateException (TypeErrorType , "'pow' requires 2 arguments" )},
336+ {f : "pow" , args : wrapArgs (2 , 3 ), want : NewInt (8 ).ToObject ()},
337+ {f : "pow" , args : wrapArgs (3.0 , 3.0 ), want : NewFloat (27.0 ).ToObject ()},
338+ {f : "pow" , args : wrapArgs (2 , - 2 ), want : NewFloat (0.25 ).ToObject ()},
339+ {f : "pow" , args : wrapArgs (0i , 0i ), want : NewComplex (complex (1 , 0i )).ToObject ()},
335340 {f : "range" , args : wrapArgs (), wantExc : mustCreateException (TypeErrorType , "'__new__' of 'int' requires 3 arguments" )},
336341 {f : "range" , args : wrapArgs (3 ), want : newTestList (0 , 1 , 2 ).ToObject ()},
337342 {f : "range" , args : wrapArgs (10 , 0 ), want : NewList ().ToObject ()},
0 commit comments