import unittest
from app import merge_intervals
class T(unittest.TestCase):
 def test_all(self):
  src=[[5,7],[1,3],[3,4],[10,10],[9,9]]
  self.assertEqual(merge_intervals(src),[[1,7],[9,10]])
  self.assertEqual(src,[[5,7],[1,3],[3,4],[10,10],[9,9]])
  self.assertEqual(merge_intervals([]),[])
if __name__=='__main__': unittest.main()
