pike.git / src / testsuite.in

version» Context lines:

pike.git/src/testsuite.in:8540:   test_eq(({'f','o','o'})[-2],'o')   test_eq(({'f','o','o'})[-3],'f')   test_eq(([0:'f',1:'o',2:'o'])[0],'f')   test_eq(([0:'f',1:'o',2:'o'])[1],'o')   test_eq(([0:'f',1:'o',2:'o'])[2],'o')   test_eq(([0:'f',1:'o',2:'o'])[random(0)+3],0)   test_eq(([0:'f',1:'o',2:'o'])[random(0)-1],0)   test_eq((<'f','o','o'>)['o'],1)   test_eq((<'f','o','o'>)['f'],1)   test_eq((<'f','o','o'>)[random(0)+'b'],0) - test_eq((<'f','o','o'>)[-1],0) + test_eq((<'f','o','o'>)[ [int](mixed)-1],0)      test_eq([[class Z { mixed `->(mixed x) { return this_object()[x]; } int foo() { return 1; }}()->foo()]],1)      // Test some indexing opcodes.   test_eval_error([[return ({1})[1];]])   test_eval_error([[int i = 1; return ({1})[i];]])   test_eval_error([[array a = ({ 1 }); return a[1];]])   test_eval_error([[array a = ({ 1 }); int i = 1; return a[i];]])      // index assigning