# Path: test/tools/mock_descriptors.py
# def make_enum_value(
#     name: str,
#     number: int,
#     proto_file_name: str = "foo",
#     locations: Sequence[desc.SourceCodeInfo.Location] = [],
#     path: Tuple[int] = (),
#     nested_path: Sequence[str] = [],
# ) -> wrappers.EnumValue:
#     """Mock an EnumValue object."""
#     source_code_locations = {tuple(location.path): location for location in locations}
#     enum_value_pb = make_enum_value_pb2(name, number)
#     enum_value = wrappers.EnumValue(
#         enum_value_pb, proto_file_name, source_code_locations, path, nested_path
#     )
#     return enum_value


import unittest
from test.tools.mock_descriptors import make_enum_value
from google.protobuf import descriptor_pb2
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.



class EnumValueTest(unittest.TestCase):
    def test_basic_properties(self):
        enum_value = make_enum_value("FOO", 1)
        self.assertEqual(enum_value.name, "FOO")
        self.assertEqual(enum_value.number, 1)
        self.assertEqual(enum_value.proto_file_name, "foo")
        self.assertEqual(
            enum_value.source_code_line,
            -1,
        )
        self.assertEqual(enum_value.path, ())

    def test_source_code_properties(self):
        L = descriptor_pb2.SourceCodeInfo.Location
        locations = [L(path=(4, 0, 2, 0), span=(1, 2, 3, 4))]

# Path: test/tools/mock_descriptors.py
# def make_enum_value(
#     name: str,
#     number: int,
#     proto_file_name: str = "foo",
#     locations: Sequence[desc.SourceCodeInfo.Location] = [],
#     path: Tuple[int] = (),
#     nested_path: Sequence[str] = [],
# ) -> wrappers.EnumValue:
#     """Mock an EnumValue object."""
#     source_code_locations = {tuple(location.path): location for location in locations}
#     enum_value_pb = make_enum_value_pb2(name, number)
#     enum_value = wrappers.EnumValue(
#         enum_value_pb, proto_file_name, source_code_locations, path, nested_path
#     )
#     return enum_value


# Path: test/comparator/wrappers/test_enum_value.py
import unittest
from test.tools.mock_descriptors import make_enum_value
from google.protobuf import descriptor_pb2

#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.



class EnumValueTest(unittest.TestCase):
    def test_basic_properties(self):
        enum_value = make_enum_value("FOO", 1)
        self.assertEqual(enum_value.name, "FOO")
        self.assertEqual(enum_value.number, 1)
        self.assertEqual(enum_value.proto_file_name, "foo")
        self.assertEqual(
            enum_value.source_code_line,
            -1,
        )
        self.assertEqual(enum_value.path, ())

    def test_source_code_properties(self):
        L = descriptor_pb2.SourceCodeInfo.Location
        locations = [L(path=(4, 0, 2, 0), span=(1, 2, 3, 4))]

        enum_value = make_enum_value(