Ejemplo n.º 1
0
 def test_map_type(self) -> None:
     c = customized(map_type={1: 2, 3: 6, 5: 10})
     res = {}
     for k, v in c.map_type.items():
         res[k] = v
     self.assertEquals(res, {1: 2, 3: 6, 5: 10})
Ejemplo n.º 2
0
 def test_string_type(self) -> None:
     c = customized(string_type="hello")
     self.assertEquals(c.string_type, "hello")
Ejemplo n.º 3
0
 def test_list_type(self) -> None:
     c = customized(list_type=[1, 2, 3])
     res = []
     for v in c.list_type:
         res.append(v)
     self.assertEquals(res, [1, 2, 3])
Ejemplo n.º 4
0
 def test_set_type(self) -> None:
     c = customized(set_type={1, 2, 3})
     res = set()
     for v in c.set_type:
         res.add(v)
     self.assertEquals(res, {1, 2, 3})
Ejemplo n.º 5
0
 def test_cpp_name(self) -> None:
     c = customized(foo=3)
     self.assertEqual(c.foo, 3)
Ejemplo n.º 6
0
 def test_cpp_name(self) -> None:
     c = customized(foo=3)
     self.assertEqual(c.foo, 3)
Ejemplo n.º 7
0
 def test_string_type(self) -> None:
     c = customized(string_type="hello")
     self.assertEquals(c.string_type, "hello")
Ejemplo n.º 8
0
 def test_map_type(self) -> None:
     c = customized(map_type={1: 2, 3: 6, 5: 10})
     res = {}
     for k, v in c.map_type.items():
         res[k] = v
     self.assertEquals(res, {1: 2, 3: 6, 5: 10})
Ejemplo n.º 9
0
 def test_set_type(self) -> None:
     c = customized(set_type={1, 2, 3})
     res = set()
     for v in c.set_type:
         res.add(v)
     self.assertEquals(res, {1, 2, 3})
Ejemplo n.º 10
0
 def test_list_type(self) -> None:
     c = customized(list_type=[1, 2, 3])
     res = []
     for v in c.list_type:
         res.append(v)
     self.assertEquals(res, [1, 2, 3])
Ejemplo n.º 11
0
 def test_list_of_uint32(self) -> None:
     c = customized(list_of_uint32=[1, 2, 3])
     self.assertEqual(c.list_of_uint32, [1, 2, 3])