(t *testing.T)
| 93 | } |
| 94 | |
| 95 | func TestSimplePredicates(t *testing.T) { |
| 96 | if !zero.IsValid() || zero.IsEmpty() || zero.IsFull() { |
| 97 | t.Errorf("Zero interval is invalid or empty or full") |
| 98 | } |
| 99 | if !empty.IsValid() || !empty.IsEmpty() || empty.IsFull() { |
| 100 | t.Errorf("Empty interval is invalid or not empty or full") |
| 101 | } |
| 102 | if !empty.IsInverted() { |
| 103 | t.Errorf("Empty interval is not inverted") |
| 104 | } |
| 105 | if !full.IsValid() || full.IsEmpty() || !full.IsFull() { |
| 106 | t.Errorf("Full interval is invalid or empty or not full") |
| 107 | } |
| 108 | if !pi.IsValid() || pi.IsEmpty() || pi.IsInverted() { |
| 109 | t.Errorf("pi is invalid or empty or inverted") |
| 110 | } |
| 111 | if !mipi.IsValid() || mipi.IsEmpty() || mipi.IsInverted() { |
| 112 | t.Errorf("mipi is invalid or empty or inverted") |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | func TestAlmostFullOrEmpty(t *testing.T) { |
| 117 | // Test that rounding errors don't cause intervals that are almost empty or |
nothing calls this directly
no test coverage detected
searching dependent graphs…