Example #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})
Example #2
0
 def test_string_type(self) -> None:
     c = customized(string_type="hello")
     self.assertEquals(c.string_type, "hello")
Example #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])
Example #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})
Example #5
0
 def test_cpp_name(self) -> None:
     c = customized(foo=3)
     self.assertEqual(c.foo, 3)
Example #6
0
 def test_cpp_name(self) -> None:
     c = customized(foo=3)
     self.assertEqual(c.foo, 3)
Example #7
0
 def test_string_type(self) -> None:
     c = customized(string_type="hello")
     self.assertEquals(c.string_type, "hello")
Example #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})
Example #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})
Example #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])
Example #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])