Exemplo n.º 1
0
    def test_empty_missing_from_modular(self):
        monolithic = self.read_signature_csv_from_string_as_dict("""
Ljava/lang/Object;->hashCode()I
""")
        modular = {}
        mismatches = vo.compare_signature_flags(monolithic, modular, [])
        expected = []
        self.assertEqual(expected, mismatches)
Exemplo n.º 2
0
    def test_match(self):
        monolithic = self.read_signature_csv_from_string_as_dict("""
Ljava/lang/Object;->hashCode()I,public-api,system-api,test-api
""")
        modular = self.read_signature_csv_from_string_as_dict("""
Ljava/lang/Object;->hashCode()I,public-api,system-api,test-api
""")
        mismatches = vo.compare_signature_flags(monolithic, modular,
                                                ["blocked"])
        expected = []
        self.assertEqual(expected, mismatches)
Exemplo n.º 3
0
    def test_mismatch_treat_missing_from_modular_as_empty(self):
        monolithic = self.read_signature_csv_from_string_as_dict("""
Ljava/lang/Object;->hashCode()I,public-api,system-api,test-api
""")
        modular = {}
        mismatches = vo.compare_signature_flags(monolithic, modular, [])
        expected = [
            (
                "Ljava/lang/Object;->hashCode()I",
                [],
                ["public-api", "system-api", "test-api"],
            ),
        ]
        self.assertEqual(expected, mismatches)
Exemplo n.º 4
0
    def test_match_treat_missing_from_modular_as_blocked(self):
        monolithic = self.read_signature_csv_from_string_as_dict("")
        modular = self.read_signature_csv_from_string_as_dict("""
Ljava/lang/Object;->toString()Ljava/lang/String;,public-api,system-api,test-api
""")
        mismatches = vo.compare_signature_flags(monolithic, modular,
                                                ["blocked"])
        expected = [
            (
                "Ljava/lang/Object;->toString()Ljava/lang/String;",
                ["public-api", "system-api", "test-api"],
                [],
            ),
        ]
        self.assertEqual(expected, mismatches)