blob: 88e86ef961e8910009da9fe6a857aae888398a70 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
# 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")
|