'2d to 2d slice assignment'

@tag('important')
def test_2d_slicing_set(self, flags=enable_pyobj_flags):

    pyfunc = slicing_2d_usecase_set
    arraytype = types.Array(types.int32, 2, 'A')
    argtys = (arraytype, arraytype, types.int32, types.int32, types.int32, types.int32, types.int32, types.int32)
    cr = compile_isolated(pyfunc, argtys, flags=flags)
    cfunc = cr.entry_point
    arg = np.arange((10 * 10), dtype='i4').reshape(10, 10)
    tests = [(0, 10, 1, 0, 10, 1), (2, 3, 1, 2, 3, 1), (10, 0, 1, 10, 0, 1), (0, 10, (-1), 0, 10, (-1)), (0, 10, 2, 0, 10, 2)]
    for test in tests:
        pyleft = pyfunc(np.zeros_like(arg), arg[(slice(*test[0:3]), slice(*test[3:6]))], *test)
        cleft = cfunc(np.zeros_like(arg), arg[(slice(*test[0:3]), slice(*test[3:6]))], *test)
        self.assertPreciseEqual(cleft, pyleft)
