Example #1
0
    def apply_find_result(self, find_result):
        from biicode.common.find import find_manager

        if find_result:
            hive_holder = self.hive_holder
            find_manager.update_hive_with_find_result(hive_holder, find_result)
            blocks_process(hive_holder, self._biiout)
            deps_process(self._biiapi, hive_holder, self._biiout)
            self._edition.save_hive_changes(hive_holder)
    def apply_find_result(self, find_result):
        from biicode.common.find import find_manager

        if find_result:
            hive_holder = self.hive_holder
            find_manager.update_hive_with_find_result(hive_holder, find_result)
            blocks_process(hive_holder, self._biiout)
            deps_process(self._biiapi, hive_holder, self._biiout)
            self._edition.save_hive_changes(hive_holder)
    def test_apply_result(self):
        # TODO: this is actually a test of find result, move away
        files = {self.block_name + 'main.cpp': '#include "user2/block/sphere.h"'}
        self.hive_manager.process(None, files)

        find_result = FinderResult()
        version = BRLBlock('user2/user2/block/branch') + 3
        d = ReferencedDependencies()
        decl = CPPDeclaration('user2/block/sphere.h')
        d[version][decl].add(BlockCellName('user2/block/sphere.h'))
        find_result.resolved = d

        hive_holder = self.hive_manager.hive_holder
        update_hive_with_find_result(hive_holder, find_result)

        self.assertEqual(2, len(hive_holder.resources))
        self.assertEqual(BlockVersionTable([version]), hive_holder[self.block_name].requirements)
Example #4
0
    def test_apply_result(self):
        # TODO: this is actually a test of find result, move away
        files = {
            self.block_name + 'main.cpp': '#include "user2/block/sphere.h"'
        }
        self.hive_manager.process(None, files)

        find_result = FinderResult()
        version = BRLBlock('user2/user2/block/branch') + 3
        d = ReferencedDependencies()
        decl = CPPDeclaration('user2/block/sphere.h')
        d[version][decl].add(BlockCellName('user2/block/sphere.h'))
        find_result.resolved = d

        hive_holder = self.hive_manager.hive_holder
        update_hive_with_find_result(hive_holder, find_result)

        self.assertEqual(2, len(hive_holder.resources))
        self.assertEqual(BlockVersionTable([version]),
                         hive_holder[self.block_name].requirements)