コード例 #1
0
    def test_eq(self):
        """Test __eq__ equality function."""
        self.assertTrue(ProcessorOptions().__eq__(ProcessorOptions()))

        # Also verify that a difference in any argument causes equality to fail.

        # Explicitly create a ProcessorOptions instance with all default
        # values.  We do this to be sure we are assuming the right default
        # values in our self.assertFalse() calls below.
        options = ProcessorOptions(filter_rules=[],
                                   git_commit=None,
                                   is_debug=False,
                                   output_format="emacs",
                                   verbosity=1)
        # Verify that we created options correctly.
        self.assertTrue(options.__eq__(ProcessorOptions()))

        self.assertFalse(options.__eq__(ProcessorOptions(filter_rules=["+"])))
        self.assertFalse(options.__eq__(ProcessorOptions(git_commit="commit")))
        self.assertFalse(options.__eq__(ProcessorOptions(is_debug=True)))
        self.assertFalse(options.__eq__(ProcessorOptions(output_format="vs7")))
        self.assertFalse(options.__eq__(ProcessorOptions(verbosity=2)))
コード例 #2
0
 def test_check_webkit_style_configuration(self):
     # Exercise the code path to make sure the function does not error out.
     option_values = CommandOptionValues()
     configuration = check_webkit_style_configuration(option_values)