# Path: nisaba/scripts/utils/unicode_strings_util.py
# def name_to_char(prefixes: Sequence[str], suffix: str) -> Tuple[str, str]:
# def _names_to_string(uname_prefixes: Sequence[str], names: Sequence[str]
#                      ) -> Tuple[str, List[str]]:
# def proto_entries_to_string(uname_prefixes: Sequence[str],
#                             uname: Sequence[str], raw: str) -> str:
# def convert_item(
#     uname_prefixes: Sequence[str],
#     to_uname_prefixes: Sequence[str],
#     data_item: unicode_strings_pb2.UnicodeStrings.Item) -> Tuple[
# def _fill_missing_raw(pb: unicode_strings_pb2.UnicodeStrings):
# def read_textproto(proto_path):


from nisaba.scripts.utils import unicode_strings_pb2
from nisaba.scripts.utils import unicode_strings_util as lib
from absl.testing import absltest
# 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
#
#     http://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.

"""Tests for Unicode strings proto parser."""



class UnicodeStringsUtilTest(absltest.TestCase):

  def _proto_entries_to_string(self, uname_prefixes=(), uname=(), raw=""):
    return lib.proto_entries_to_string(uname_prefixes, uname, raw)

  def _convert_item(self, uname_prefixes=(), to_uname_prefixes=(),
                    uname=None, raw="", to_uname=None, to_raw=""):
    item = unicode_strings_pb2.UnicodeStrings.Item()
    item.raw = raw
    item.to_raw = to_raw
    if uname:
      item.uname.extend(uname)
    if to_uname:
      item.to_uname.extend(to_uname)

# Path: nisaba/scripts/utils/unicode_strings_util.py
# def name_to_char(prefixes: Sequence[str], suffix: str) -> Tuple[str, str]:
# def _names_to_string(uname_prefixes: Sequence[str], names: Sequence[str]
#                      ) -> Tuple[str, List[str]]:
# def proto_entries_to_string(uname_prefixes: Sequence[str],
#                             uname: Sequence[str], raw: str) -> str:
# def convert_item(
#     uname_prefixes: Sequence[str],
#     to_uname_prefixes: Sequence[str],
#     data_item: unicode_strings_pb2.UnicodeStrings.Item) -> Tuple[
# def _fill_missing_raw(pb: unicode_strings_pb2.UnicodeStrings):
# def read_textproto(proto_path):


# Path: nisaba/scripts/utils/unicode_strings_util_test.py
from nisaba.scripts.utils import unicode_strings_pb2
from nisaba.scripts.utils import unicode_strings_util as lib
from absl.testing import absltest

# 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
#
#     http://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.

"""Tests for Unicode strings proto parser."""



class UnicodeStringsUtilTest(absltest.TestCase):

  def _proto_entries_to_string(self, uname_prefixes=(), uname=(), raw=""):
    return lib.proto_entries_to_string(uname_prefixes, uname, raw)

  def _convert_item(self, uname_prefixes=(), to_uname_prefixes=(),
                    uname=None, raw="", to_uname=None, to_raw=""):
    item = unicode_strings_pb2.UnicodeStrings.Item()
    item.raw = raw
    item.to_raw = to_raw
    if uname:
      item.uname.extend(uname)
    if to_uname:
      item.to_uname.extend(to_uname)

    return lib.convert_item(uname_prefixes, to_uname_prefixes, item)