示例#1
0
    def testFile(self):
        symbols = list(
            upload_symbols.FindSymbolFiles(self.working, [self.symfile]))

        self.assertEqual(len(symbols), 1)
        sf = symbols[0]

        self.assertEqual(sf.display_name, 'root.sym')
        self.assertEqual(sf.display_path, self.symfile)
        self.assertEqual(sf.file_name, self.symfile)
        self.assertEqual(sf.status, upload_symbols.SymbolFile.INITIAL)
        self.assertEqual(sf.FileSize(), len(self.FAT_CONTENT))
示例#2
0
    def testDir(self):
        symbols = list(
            upload_symbols.FindSymbolFiles(self.working, [self.data]))

        self.assertEqual(len(symbols), 2)
        root = symbols[0]
        nested = symbols[1]

        self.assertEqual(root.display_name, 'root.sym')
        self.assertEqual(root.display_path, 'root.sym')
        self.assertEqual(root.file_name, self.symfile)
        self.assertEqual(root.status, upload_symbols.SymbolFile.INITIAL)
        self.assertEqual(root.FileSize(), len(self.FAT_CONTENT))

        self.assertEqual(nested.display_name, 'inner.sym')
        self.assertEqual(nested.display_path, 'nested/inner.sym')
        self.assertEqual(nested.file_name, self.innerfile)
        self.assertEqual(nested.status, upload_symbols.SymbolFile.INITIAL)
        self.assertEqual(nested.FileSize(), len(self.FAT_CONTENT))
示例#3
0
 def testEmpty(self):
     symbols = list(upload_symbols.FindSymbolFiles(self.working, []))
     self.assertEqual(symbols, [])