Beispiel #1
0
 def parse_address_map(self, json):
     with temporary_file() as fp:
         fp.write(json)
         fp.close()
         address_map = AddressMap.parse(fp.name, parser=self._parser)
         self.assertEqual(fp.name, address_map.path)
         yield address_map
Beispiel #2
0
 def parse_address_map(self, json):
   with temporary_file() as fp:
     fp.write(json)
     fp.close()
     address_map = AddressMap.parse(fp.name, parser=self._parser)
     self.assertEqual(fp.name, address_map.path)
     yield address_map
Beispiel #3
0
 def parse_address_map(self, json):
   with temporary_file() as fp:
     fp.write(json)
     fp.close()
     address_map = AddressMap.parse(fp.name, self._symbol_table_cls, self._parser_cls)
     self.assertEqual(fp.name, address_map.path)
     yield address_map
Beispiel #4
0
 def parse_address_map(self, json):
     with temporary_file() as fp:
         fp.write(json)
         fp.close()
         address_map = AddressMap.parse(fp.name, self._symbol_table_cls,
                                        self._parser_cls)
         self.assertEqual(fp.name, address_map.path)
         yield address_map
Beispiel #5
0
def parse_address_family(address_mapper, path, build_files_content):
  """Given the contents of the build files in one directory, return an AddressFamily.

  The AddressFamily may be empty, but it will not be None.
  """
  address_maps = []
  for filepath, filecontent in build_files_content.dependencies:
    address_maps.append(AddressMap.parse(filepath,
                                         filecontent,
                                         address_mapper.symbol_table_cls,
                                         address_mapper.parser_cls))
  return AddressFamily.create(path.path, address_maps)
Beispiel #6
0
def parse_address_family(address_mapper, path, build_files_content):
    """Given the contents of the build files in one directory, return an AddressFamily.

  The AddressFamily may be empty, but it will not be None.
  """
    address_maps = []
    for filepath, filecontent in build_files_content.dependencies:
        address_maps.append(
            AddressMap.parse(filepath, filecontent,
                             address_mapper.symbol_table_cls,
                             address_mapper.parser_cls))
    return AddressFamily.create(path.path, address_maps)
Beispiel #7
0
 def parse_address_map(self, json):
     path = '/dev/null'
     address_map = AddressMap.parse(path, json, self._symbol_table_cls,
                                    self._parser_cls)
     self.assertEqual(path, address_map.path)
     yield address_map
Beispiel #8
0
 def parse_address_map(self, json):
   path = '/dev/null'
   address_map = AddressMap.parse(path, json, self._symbol_table_cls, self._parser_cls)
   self.assertEqual(path, address_map.path)
   yield address_map