12345678910111213 |
- # cython: c_string_type=str, c_string_encoding=utf8
- 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 TestToString(unittest.TestCase):
- def test_from_int(self):
- self.assertEquals(ToString(42), "42")
|