blob: 16bc90e5f5fd4abfee81d287109a453262b1eef5 (
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")
|