From a89ff77f5efeb33c2006eac06036b80c3999e401 Mon Sep 17 00:00:00 2001 From: Ajax Date: Mon, 13 Feb 2017 17:27:12 +0100 Subject: Interval: add .length computation --- test/core/interval.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/core/interval.py') diff --git a/test/core/interval.py b/test/core/interval.py index ab18e567..97d45a39 100755 --- a/test/core/interval.py +++ b/test/core/interval.py @@ -90,6 +90,10 @@ assert(i14 & i15 == i14) assert(i15 & i14 == i14) assert(i14 & i16 == interval([(3, 5), (7, 8)])) +assert(i5.length == 5) +assert(i6.length == 7) +assert((i1 - i1).length == 0) + x1 = [(7, 87), (76, 143), (94, 129), (79, 89), (46, 100)] assert(interval(x1) == interval([(7, 143)])) x2 = [(11, 16), (35, 74), (18, 114), (91, 188), (3, 75)] -- cgit 1.4.1