aboutsummaryrefslogtreecommitdiffstats
path: root/util/generic/array_ref_ut.pyx
diff options
context:
space:
mode:
authorStanislav Kirillov <staskirillov@gmail.com>2022-02-10 16:46:07 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:07 +0300
commit92fe2b1e7bc79f7b95adef61714fc003f6ea4a1c (patch)
tree817034f4ca57c9f841bb047ec94630c2e78a2b1d /util/generic/array_ref_ut.pyx
parent53c76da6d9f6cc5a17f6029df396f0e3bc1ff47d (diff)
downloadydb-92fe2b1e7bc79f7b95adef61714fc003f6ea4a1c.tar.gz
Restoring authorship annotation for Stanislav Kirillov <staskirillov@gmail.com>. Commit 1 of 2.
Diffstat (limited to 'util/generic/array_ref_ut.pyx')
-rw-r--r--util/generic/array_ref_ut.pyx56
1 files changed, 28 insertions, 28 deletions
diff --git a/util/generic/array_ref_ut.pyx b/util/generic/array_ref_ut.pyx
index 67b69a365c..22222fb386 100644
--- a/util/generic/array_ref_ut.pyx
+++ b/util/generic/array_ref_ut.pyx
@@ -1,28 +1,28 @@
-import pytest
-import unittest
-from util.generic.array_ref cimport TArrayRef
-from util.generic.vector cimport TVector
-
-
-class TestArrayRef(unittest.TestCase):
- def test_array_data_reference(self):
- array_size = 30
- cdef TVector[int] vec
- for i in xrange(array_size):
- vec.push_back(i)
- cdef TArrayRef[int] array_ref = TArrayRef[int](vec.data(), vec.size())
- for i in xrange(array_size / 2):
- array_ref[array_size - 1 - i] = array_ref[i]
- for i in xrange(array_size):
- self.assertEqual(array_ref[i], array_size - 1 - i)
-
- def test_array_vec_reference(self):
- array_size = 30
- cdef TVector[int] vec
- for i in xrange(array_size):
- vec.push_back(i)
- cdef TArrayRef[int] array_ref = TArrayRef[int](vec)
- for i in xrange(array_size / 2):
- array_ref[array_size - 1 - i] = array_ref[i]
- for i in xrange(array_size):
- self.assertEqual(array_ref[i], array_size - 1 - i) \ No newline at end of file
+import pytest
+import unittest
+from util.generic.array_ref cimport TArrayRef
+from util.generic.vector cimport TVector
+
+
+class TestArrayRef(unittest.TestCase):
+ def test_array_data_reference(self):
+ array_size = 30
+ cdef TVector[int] vec
+ for i in xrange(array_size):
+ vec.push_back(i)
+ cdef TArrayRef[int] array_ref = TArrayRef[int](vec.data(), vec.size())
+ for i in xrange(array_size / 2):
+ array_ref[array_size - 1 - i] = array_ref[i]
+ for i in xrange(array_size):
+ self.assertEqual(array_ref[i], array_size - 1 - i)
+
+ def test_array_vec_reference(self):
+ array_size = 30
+ cdef TVector[int] vec
+ for i in xrange(array_size):
+ vec.push_back(i)
+ cdef TArrayRef[int] array_ref = TArrayRef[int](vec)
+ for i in xrange(array_size / 2):
+ array_ref[array_size - 1 - i] = array_ref[i]
+ for i in xrange(array_size):
+ self.assertEqual(array_ref[i], array_size - 1 - i) \ No newline at end of file