diff options
author | bur3 <[email protected]> | 2022-02-10 16:52:03 +0300 |
---|---|---|
committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:52:03 +0300 |
commit | 21d4894ec358934fd085d6ed0a177bf19aee27cc (patch) | |
tree | 03abeeefb9dd8239de553d07de972d660105e9ae /util | |
parent | fa2bf14034a6e0ee20178ad95dd1e6a80c0a61ac (diff) |
Restoring authorship annotation for <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'util')
-rw-r--r-- | util/string/cast.pxd | 4 | ||||
-rw-r--r-- | util/string/cast_ut.pyx | 10 | ||||
-rw-r--r-- | util/tests/cython/test_generic.py | 4 |
3 files changed, 9 insertions, 9 deletions
diff --git a/util/string/cast.pxd b/util/string/cast.pxd index dc23619e1e6..8d84fb16ae4 100644 --- a/util/string/cast.pxd +++ b/util/string/cast.pxd @@ -3,8 +3,8 @@ from util.generic.string cimport TString from libcpp cimport bool as bool_t cdef extern from "<util/string/cast.h>" nogil: - T FromString[T](const TString&) except + + T FromString[T](const TString&) except + bool_t TryFromString[T](const TString&, T&) except + TString ToString[T](const T&) except + - + cdef double StrToD(const char* b, char** se) except + diff --git a/util/string/cast_ut.pyx b/util/string/cast_ut.pyx index 88e86ef961e..0f805a8e190 100644 --- a/util/string/cast_ut.pyx +++ b/util/string/cast_ut.pyx @@ -1,13 +1,13 @@ # cython: c_string_type=str, c_string_encoding=utf8 -from util.string.cast cimport FromString, ToString +from util.string.cast cimport FromString, ToString import unittest -class TestFromString(unittest.TestCase): - def test_from_int(self): - self.assertEquals(FromString[int]("42"), 42) - +class TestFromString(unittest.TestCase): + def test_from_int(self): + self.assertEquals(FromString[int]("42"), 42) + class TestToString(unittest.TestCase): def test_from_int(self): self.assertEquals(ToString(42), "42") diff --git a/util/tests/cython/test_generic.py b/util/tests/cython/test_generic.py index a0d61339cc7..79ab6daf824 100644 --- a/util/tests/cython/test_generic.py +++ b/util/tests/cython/test_generic.py @@ -10,7 +10,7 @@ from util.generic.maybe_ut import TestMaybe from util.generic.ptr_ut import TestHolder from util.generic.string_ut import TestStroka from util.generic.vector_ut import TestVector -from util.string.cast_ut import TestFromString, TestToString +from util.string.cast_ut import TestFromString, TestToString # Test discovery does not work in cython modules. # Reexporting test classes here to satisfy pylint and pytest. @@ -24,6 +24,6 @@ __all__ = [ 'TestMaybe', 'TestStroka', 'TestVector', - 'TestFromString', + 'TestFromString', 'TestToString', ] |