5 from framework import VppTestCase, VppTestRunner
6 from vpp_ip_route import VppIpTable, VppIpRoute, VppRoutePath
9 class TestString(VppTestCase):
10 """ String Test Cases """
14 super(TestString, cls).setUpClass()
17 super(TestString, self).setUp()
20 super(TestString, self).tearDown()
22 def test_string_unittest(self):
23 """ String unit tests """
25 "clib_memcmp", "clib_memcpy", "clib_memset",
26 "clib_strcat", "clib_strcmp", "clib_strcpy",
27 "clib_strncat", "clib_strncmp", "clib_strncpy",
28 "clib_strnlen", "clib_strstr", "clib_strtok",
29 "memcmp_s", "memcpy_s", "memset_s ",
30 "strcat_s", "strcmp_s", "strcpy_s",
31 "strncat_s", "strncmp_s", "strncpy_s",
32 "strnlen_s", "strstr_s", "strtok_s"]
35 error = self.vapi.cli("test string " + name)
36 if error.find("failed") != -1:
37 self.logger.critical("FAILURE in the " + name + " test")
38 self.assertNotIn("failed", error)
40 if __name__ == '__main__':
41 unittest.main(testRunner=VppTestRunner)