Beispiel #1
0
 def test_checker_available(self):
     """Test for available checker."""
     ordered_checkers = [("unix.Malloc", True),
                         ("core.DivideZero", False)]
     missing_checkers = available(ordered_checkers,
                                  self.__available_checkers)
     self.assertSetEqual(missing_checkers, set())
 def test_profile_not_available(self):
     """Test for missing profile."""
     profile_names = {"extreme", "sensitive"}
     checkers_with_profiles = self.__available_checkers
     checkers_with_profiles.update(profile_names)
     ordered_checkers = [("unix.Malloc", True), ("core", True),
                         ("readability", False), ("sensstive", True),
                         ("extremee", False)]
     missing_checkers = available(ordered_checkers, checkers_with_profiles)
     self.assertSetEqual(missing_checkers, {"extremee", "sensstive"})
Beispiel #3
0
    def test_checker_not_available(self):
        """Test for missing checker."""
        ordered_checkers = [("unix.Malloc", True), ("core.VLASize", True),
                            ("core.DivideZero", True),
                            ("cppcoreguidelines-avoid-goto", False)]

        missing_checkers = available(ordered_checkers,
                                     self.__available_checkers)

        self.assertSetEqual(missing_checkers,
                            {"core.VLASize", "cppcoreguidelines-avoid-goto"})