Exemplo n.º 1
0
 def test_multifile_diff(self):
     dp = DiffParser()
     diffinfo = dp.parse(multiplefilechange.split('\n'))
     correct_info = {
         'diffs': ['e2e2e6397253'],
         'e2e2e6397253': {
             'files': [
                 'dom/bluetooth/bluedroid/BluetoothA2dpHALInterface.cpp',
                 'dom/bluetooth/bluedroid/BluetoothA2dpHALInterface.h',
                 'dom/bluetooth/bluedroid/BluetoothAvrcpHALInterface.cpp',
                 'dom/bluetooth/bluedroid/BluetoothAvrcpHALInterface.h',
                 'dom/bluetooth/bluedroid/BluetoothHALHelpers.cpp',
                 'dom/bluetooth/bluedroid/BluetoothHALHelpers.h',
                 'dom/bluetooth/bluedroid/BluetoothHALInterface.cpp',
                 'dom/bluetooth/bluedroid/BluetoothHALInterface.h',
                 'dom/bluetooth/bluedroid/BluetoothHandsfreeHALInterface.cpp',
                 'dom/bluetooth/bluedroid/BluetoothHandsfreeHALInterface.h',
                 'dom/bluetooth/bluedroid/BluetoothSocketHALInterface.cpp',
                 'dom/bluetooth/bluedroid/BluetoothSocketHALInterface.h'
             ]
         }
     }
     self.assert_diff_correct(diffinfo, correct_info)
     self.assertEqual(
         diffinfo['e2e2e6397253']
         ['dom/bluetooth/bluedroid/BluetoothHALInterface.cpp'], 3684)
Exemplo n.º 2
0
 def test_multichange_diff(self):
     dp = DiffParser()
     diffinfo = dp.parse(multiplechangediff.split('\n'))
     self.assertEqual(diffinfo['e2e2e6397253']['dom/bluetooth/moz.build'],
                      5)
     self.assertEqual(diffinfo['8644a9c4b993']['dom/bluetooth/moz.build'],
                      3)
Exemplo n.º 3
0
 def test_simple_diff(self):
     dp = DiffParser()
     diffinfo = dp.parse(onefilechange.split('\n'))
     correct_info = {'diffs':['d1cfe5bf9a56'], 
                     'd1cfe5bf9a56': {'files': ['b2g/config/gaia.json']}}
     self.assert_diff_correct(diffinfo, correct_info)
     self.assertEqual(diffinfo['d1cfe5bf9a56']['b2g/config/gaia.json'], 2)
Exemplo n.º 4
0
 def test_simple_diff(self):
     dp = DiffParser()
     diffinfo = dp.parse(onefilechange.split('\n'))
     correct_info = {
         'diffs': ['d1cfe5bf9a56'],
         'd1cfe5bf9a56': {
             'files': ['b2g/config/gaia.json']
         }
     }
     self.assert_diff_correct(diffinfo, correct_info)
     self.assertEqual(diffinfo['d1cfe5bf9a56']['b2g/config/gaia.json'], 2)
Exemplo n.º 5
0
 def test_multifile_diff(self):
     dp = DiffParser()
     diffinfo = dp.parse(multiplefilechange.split('\n'))
     correct_info = {'diffs': ['e2e2e6397253'],
                     'e2e2e6397253': {'files': [
                     'dom/bluetooth/bluedroid/BluetoothA2dpHALInterface.cpp',   
                     'dom/bluetooth/bluedroid/BluetoothA2dpHALInterface.h',
                     'dom/bluetooth/bluedroid/BluetoothAvrcpHALInterface.cpp',    
                     'dom/bluetooth/bluedroid/BluetoothAvrcpHALInterface.h',      
                     'dom/bluetooth/bluedroid/BluetoothHALHelpers.cpp',           
                     'dom/bluetooth/bluedroid/BluetoothHALHelpers.h',             
                     'dom/bluetooth/bluedroid/BluetoothHALInterface.cpp',         
                     'dom/bluetooth/bluedroid/BluetoothHALInterface.h',
                     'dom/bluetooth/bluedroid/BluetoothHandsfreeHALInterface.cpp',
                     'dom/bluetooth/bluedroid/BluetoothHandsfreeHALInterface.h',
                     'dom/bluetooth/bluedroid/BluetoothSocketHALInterface.cpp',
                     'dom/bluetooth/bluedroid/BluetoothSocketHALInterface.h']}}
     self.assert_diff_correct(diffinfo, correct_info)
     self.assertEqual(diffinfo['e2e2e6397253']['dom/bluetooth/bluedroid/BluetoothHALInterface.cpp'], 3684)
Exemplo n.º 6
0
 def test_multichange_diff(self):
     dp = DiffParser()
     diffinfo = dp.parse(multiplechangediff.split('\n'))
     self.assertEqual(diffinfo['e2e2e6397253']['dom/bluetooth/moz.build'], 5)
     self.assertEqual(diffinfo['8644a9c4b993']['dom/bluetooth/moz.build'], 3)