diff options
author | stupidhobbit <stupidhobbit@yandex-team.ru> | 2022-02-10 16:48:36 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:48:36 +0300 |
commit | 92b547f8e5dcf69e9f157ec3ea5e41537a941307 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 | |
parent | 59a705ed594098f9c3614b1e78d1b9bd1ced6667 (diff) | |
download | ydb-92b547f8e5dcf69e9f157ec3ea5e41537a941307.tar.gz |
Restoring authorship annotation for <stupidhobbit@yandex-team.ru>. Commit 2 of 2.
-rw-r--r-- | contrib/python/ya.make | 8 | ||||
-rw-r--r-- | library/python/ya.make | 2 | ||||
-rw-r--r-- | util/generic/list.pxd | 130 | ||||
-rw-r--r-- | util/generic/list_ut.pyx | 62 | ||||
-rw-r--r-- | util/tests/cython/ya.make | 2 |
5 files changed, 102 insertions, 102 deletions
diff --git a/contrib/python/ya.make b/contrib/python/ya.make index 91e631f7fe..d01ced9f3a 100644 --- a/contrib/python/ya.make +++ b/contrib/python/ya.make @@ -243,7 +243,7 @@ RECURSE( django-debug-panel django-debug-toolbar django-dirtyfields - django-dynamic-raw-id + django-dynamic-raw-id django-enumfields django-environ django-etc @@ -289,13 +289,13 @@ RECURSE( django-rest-framework-docs django-rest-multiple-models django-reversion - django-select2-forms + django-select2-forms django-sentinel django-simple-history django-siteforms django-sitemessage django-sitetree - django-sortedm2m + django-sortedm2m django-storages django-tastypie django-test-migrations @@ -907,7 +907,7 @@ RECURSE( python-magic python-memcached python-mimeparse - python-multipart + python-multipart python-pptx python-prctl python-rapidjson diff --git a/library/python/ya.make b/library/python/ya.make index 4869f98ee9..2e1eb6e0e1 100644 --- a/library/python/ya.make +++ b/library/python/ya.make @@ -150,7 +150,7 @@ RECURSE( python-django-yauth/tests python-django-yauth reactor - redis_utils + redis_utils reservoir_sampling refsclient resource diff --git a/util/generic/list.pxd b/util/generic/list.pxd index 3a610b13b8..5f3d92eac1 100644 --- a/util/generic/list.pxd +++ b/util/generic/list.pxd @@ -1,65 +1,65 @@ -cdef extern from "util/generic/list.h": - cdef cppclass TList[T]: - TList() except + - TList(TList&) except + - TList(size_t, T&) except + - - cppclass iterator: - iterator() - iterator(iterator &) - T& operator*() - iterator operator++() - iterator operator--() - bint operator==(iterator) - bint operator!=(iterator) - cppclass reverse_iterator: - reverse_iterator() - reverse_iterator(iterator &) - T& operator*() - reverse_iterator operator++() - reverse_iterator operator--() - bint operator==(reverse_iterator) - bint operator!=(reverse_iterator) - cppclass const_iterator(iterator): - pass - cppclass const_reverse_iterator(reverse_iterator): - pass - bint operator==(TList&, TList&) - bint operator!=(TList&, TList&) - bint operator<(TList&, TList&) - bint operator>(TList&, TList&) - bint operator<=(TList&, TList&) - bint operator>=(TList&, TList&) - void assign(size_t, T&) - T& back() - iterator begin() - const_iterator const_begin "begin"() - void clear() - bint empty() - iterator end() - const_iterator const_end "end"() - iterator erase(iterator) - iterator erase(iterator, iterator) - T& front() - iterator insert(iterator, T&) - void insert(iterator, size_t, T&) - size_t max_size() - void merge(TList&) - void pop_back() - void pop_front() - void push_back(T&) - void push_front(T&) - reverse_iterator rbegin() - const_reverse_iterator const_rbegin "rbegin"() - void remove(T&) - reverse_iterator rend() - const_reverse_iterator const_rend "rend"() - void resize(size_t, T&) - void reverse() - size_t size() - void sort() - void swap(TList&) - void splice(iterator, TList&) - void splice(iterator, TList&, iterator) - void splice(iterator, TList&, iterator, iterator) - void unique() +cdef extern from "util/generic/list.h": + cdef cppclass TList[T]: + TList() except + + TList(TList&) except + + TList(size_t, T&) except + + + cppclass iterator: + iterator() + iterator(iterator &) + T& operator*() + iterator operator++() + iterator operator--() + bint operator==(iterator) + bint operator!=(iterator) + cppclass reverse_iterator: + reverse_iterator() + reverse_iterator(iterator &) + T& operator*() + reverse_iterator operator++() + reverse_iterator operator--() + bint operator==(reverse_iterator) + bint operator!=(reverse_iterator) + cppclass const_iterator(iterator): + pass + cppclass const_reverse_iterator(reverse_iterator): + pass + bint operator==(TList&, TList&) + bint operator!=(TList&, TList&) + bint operator<(TList&, TList&) + bint operator>(TList&, TList&) + bint operator<=(TList&, TList&) + bint operator>=(TList&, TList&) + void assign(size_t, T&) + T& back() + iterator begin() + const_iterator const_begin "begin"() + void clear() + bint empty() + iterator end() + const_iterator const_end "end"() + iterator erase(iterator) + iterator erase(iterator, iterator) + T& front() + iterator insert(iterator, T&) + void insert(iterator, size_t, T&) + size_t max_size() + void merge(TList&) + void pop_back() + void pop_front() + void push_back(T&) + void push_front(T&) + reverse_iterator rbegin() + const_reverse_iterator const_rbegin "rbegin"() + void remove(T&) + reverse_iterator rend() + const_reverse_iterator const_rend "rend"() + void resize(size_t, T&) + void reverse() + size_t size() + void sort() + void swap(TList&) + void splice(iterator, TList&) + void splice(iterator, TList&, iterator) + void splice(iterator, TList&, iterator, iterator) + void unique() diff --git a/util/generic/list_ut.pyx b/util/generic/list_ut.pyx index 6e8fba2530..129e5bc9b6 100644 --- a/util/generic/list_ut.pyx +++ b/util/generic/list_ut.pyx @@ -1,47 +1,47 @@ -from util.generic.list cimport TList +from util.generic.list cimport TList import unittest -from cython.operator cimport preincrement +from cython.operator cimport preincrement -class TestList(unittest.TestCase): +class TestList(unittest.TestCase): def test_ctor1(self): - cdef TList[int] tmp = TList[int]() + cdef TList[int] tmp = TList[int]() self.assertEqual(tmp.size(), 0) def test_ctor2(self): - cdef TList[int] tmp = TList[int](10, 42) + cdef TList[int] tmp = TList[int](10, 42) self.assertEqual(tmp.size(), 10) - self.assertEqual(tmp.front(), 42) + self.assertEqual(tmp.front(), 42) def test_ctor3(self): - cdef TList[int] tmp = TList[int](10, 42) - cdef TList[int] tmp2 = TList[int](tmp) + cdef TList[int] tmp = TList[int](10, 42) + cdef TList[int] tmp2 = TList[int](tmp) self.assertEqual(tmp2.size(), 10) - self.assertEqual(tmp2.front(), 42) + self.assertEqual(tmp2.front(), 42) def test_operator_assign(self): - cdef TList[int] tmp2 + cdef TList[int] tmp2 tmp2.push_back(1) tmp2.push_back(2) - cdef TList[int] tmp3 + cdef TList[int] tmp3 tmp3.push_back(1) tmp3.push_back(3) tmp3 = tmp2 def test_compare(self): - cdef TList[int] tmp1 + cdef TList[int] tmp1 tmp1.push_back(1) tmp1.push_back(2) - cdef TList[int] tmp2 + cdef TList[int] tmp2 tmp2.push_back(1) tmp2.push_back(2) - cdef TList[int] tmp3 + cdef TList[int] tmp3 tmp3.push_back(1) tmp3.push_back(3) @@ -55,7 +55,7 @@ class TestList(unittest.TestCase): self.assertTrue(tmp3 >= tmp1) def test_push_pop_back(self): - cdef TList[int] tmp + cdef TList[int] tmp self.assertEqual(tmp.size(), 0) tmp.push_back(42) @@ -74,22 +74,22 @@ class TestList(unittest.TestCase): self.assertEqual(tmp.size(), 0) def test_front(self): - cdef TList[int] tmp + cdef TList[int] tmp tmp.push_back(42) self.assertEqual(tmp.front(), 42) def test_empty(self): - cdef TList[int] tmp + cdef TList[int] tmp self.assertTrue(tmp.empty()) tmp.push_back(42) self.assertFalse(tmp.empty()) def test_max_size(self): - cdef TList[int] tmp + cdef TList[int] tmp self.assertTrue(tmp.max_size() > 0) - def test_resize(self): - cdef TList[int] tmp + def test_resize(self): + cdef TList[int] tmp tmp.resize(100, 42) self.assertEqual(tmp.size(), 100) @@ -97,7 +97,7 @@ class TestList(unittest.TestCase): self.assertEqual(tmp.back(), 42) def test_iter(self): - cdef TList[int] tmp + cdef TList[int] tmp tmp.push_back(1) tmp.push_back(20) tmp.push_back(300) @@ -105,7 +105,7 @@ class TestList(unittest.TestCase): self.assertEqual([i for i in tmp], [1, 20, 300]) def test_iterator(self): - cdef TList[int] tmp + cdef TList[int] tmp self.assertTrue(tmp.begin() == tmp.end()) self.assertTrue(tmp.rbegin() == tmp.rend()) @@ -119,13 +119,13 @@ class TestList(unittest.TestCase): self.assertTrue(tmp.const_begin() != tmp.const_end()) self.assertTrue(tmp.const_rbegin() != tmp.const_rend()) - self.assertTrue(preincrement(tmp.begin()) == tmp.end()) - self.assertTrue(preincrement(tmp.rbegin()) == tmp.rend()) - self.assertTrue(preincrement(tmp.const_begin()) == tmp.const_end()) - self.assertTrue(preincrement(tmp.const_rbegin()) == tmp.const_rend()) + self.assertTrue(preincrement(tmp.begin()) == tmp.end()) + self.assertTrue(preincrement(tmp.rbegin()) == tmp.rend()) + self.assertTrue(preincrement(tmp.const_begin()) == tmp.const_end()) + self.assertTrue(preincrement(tmp.const_rbegin()) == tmp.const_rend()) def test_assign(self): - cdef TList[int] tmp + cdef TList[int] tmp tmp.assign(10, 42) self.assertEqual(tmp.size(), 10) @@ -133,7 +133,7 @@ class TestList(unittest.TestCase): self.assertEqual(tmp.back(), 42) def test_insert(self): - cdef TList[int] tmp + cdef TList[int] tmp tmp.push_back(1) tmp.push_back(2) tmp.push_back(3) @@ -145,14 +145,14 @@ class TestList(unittest.TestCase): self.assertEqual([i for i in tmp], [6, 6, 8, 1, 2, 3]) def test_erase(self): - cdef TList[int] tmp + cdef TList[int] tmp tmp.push_back(1) tmp.push_back(2) tmp.push_back(3) tmp.push_back(4) - tmp.erase(preincrement(tmp.begin())) + tmp.erase(preincrement(tmp.begin())) self.assertEqual([i for i in tmp], [1, 3, 4]) - tmp.erase(tmp.begin(), preincrement(preincrement(tmp.begin()))) + tmp.erase(tmp.begin(), preincrement(preincrement(tmp.begin()))) self.assertEqual([i for i in tmp], [4]) diff --git a/util/tests/cython/ya.make b/util/tests/cython/ya.make index 540623577a..b928c19026 100644 --- a/util/tests/cython/ya.make +++ b/util/tests/cython/ya.make @@ -17,7 +17,7 @@ PY_SRCS( generic/ptr_ut.pyx generic/string_ut.pyx generic/vector_ut.pyx - generic/list_ut.pyx + generic/list_ut.pyx generic/hash_set_ut.pyx generic/hash_ut.pyx memory/blob_ut.pyx |