@@ -0,0 +1,2169 @@
+import unittest%0A%0Afrom cupy import internal%0Afrom cupy import testing%0A%0A%0A@testing.parameterize(%0A    %7B'slice': (2, 8, 1),    'expect': (2, 8, 1)%7D,%0A    %7B'slice': (2, None, 1), 'expect': (2, 10, 1)%7D,%0A    %7B'slice': (2, 1, 1),    'expect': (2, 2, 1)%7D,%0A    %7B'slice': (2, -1, 1),   'expect': (2, 9, 1)%7D,%0A%0A    %7B'slice': (None, 8, 1),  'expect': (0, 8, 1)%7D,%0A    %7B'slice': (-3, 8, 1),    'expect': (7, 8, 1)%7D,%0A    %7B'slice': (11, 8, 1),    'expect': (10, 10, 1)%7D,%0A    %7B'slice': (11, 11, 1),   'expect': (10, 10, 1)%7D,%0A    %7B'slice': (-11, 8, 1),   'expect': (0, 8, 1)%7D,%0A    %7B'slice': (-11, -11, 1), 'expect': (0, 0, 1)%7D,%0A%0A    %7B'slice': (8, 2, -1),    'expect': (8, 2, -1)%7D,%0A    %7B'slice': (8, None, -1), 'expect': (8, -1, -1)%7D,%0A    %7B'slice': (8, 9, -1),    'expect': (8, 8, -1)%7D,%0A    %7B'slice': (8, -3, -1),   'expect': (8, 7, -1)%7D,%0A%0A    %7B'slice': (None, 8, -1),  'expect': (9, 8, -1)%7D,%0A    %7B'slice': (-3, 6, -1),    'expect': (7, 6, -1)%7D,%0A    %7B'slice': (11, 8, -1),    'expect': (10, 8, -1)%7D,%0A    %7B'slice': (11, 11, -1),   'expect': (10, 10, -1)%7D,%0A    %7B'slice': (-11, 8, -1),   'expect': (0, 0, -1)%7D,%0A    %7B'slice': (-11, -11, -1), 'expect': (0, 0, -1)%7D,%0A)%0Aclass TestCompleteSlice(unittest.TestCase):%0A%0A    def test_complete_slice(self):%0A        self.assertEqual(%0A            internal.complete_slice(slice(*self.slice), 10),%0A            slice(*self.expect))%0A%0A%0Aclass TestCompleteSliceError(unittest.TestCase):%0A%0A    def test_invalid_step_value(self):%0A        with self.assertRaises(ValueError):%0A            internal.complete_slice(slice(1, 1, 0), 1)%0A%0A    def test_invalid_step_type(self):%0A        with self.assertRaises(IndexError):%0A            internal.complete_slice(slice(1, 1, (1, 2)), 1)%0A%0A    def test_invalid_start_type(self):%0A        with self.assertRaises(IndexError):%0A            internal.complete_slice(slice((1, 2), 1, 1), 1)%0A        with self.assertRaises(IndexError):%0A            internal.complete_slice(slice((1, 2), 1, -1), 1)%0A%0A    def test_invalid_stop_type(self):%0A        with self.assertRaises(IndexError):%0A            internal.complete_slice(slice((1, 2), 1, 1), 1)%0A        with self.assertRaises(IndexError):%0A            internal.complete_slice(slice((1, 2), 1, -1), 1)%0A

Add indexing test