1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
6 from telemetry
.timeline
import bounds
9 class BoundsTests(unittest
.TestCase
):
11 def testGetOverlap(self
):
13 self
.assertEquals(0, bounds
.Bounds
.GetOverlap(10, 20, 30, 40))
14 self
.assertEquals(0, bounds
.Bounds
.GetOverlap(30, 40, 10, 20))
16 self
.assertEquals(10, bounds
.Bounds
.GetOverlap(10, 30, 20, 40))
17 self
.assertEquals(10, bounds
.Bounds
.GetOverlap(20, 40, 10, 30))
19 self
.assertEquals(10, bounds
.Bounds
.GetOverlap(10, 40, 20, 30))
20 self
.assertEquals(10, bounds
.Bounds
.GetOverlap(20, 30, 10, 40))