using namespace std;

#include <iostream>

#include "interval.h"

/**
 * A short test for some of the <CODE>Interval</CODE> methods.
 * Currently the test reads a bunch of intervals from a file and
 * determines if zero is in each one.
 *
 * @author Jim Glenn
 * @version 0.1 1/24/2003
 */

int main()
{
  cout << "Enter some intervals in the form [a,b]" << endl;

  Interval i;

  i.readFrom(cin);

  while (!cin.eof())
    {
      i.writeTo(cout);

      if (i.contains(0.0))
	cout << " contains 0.0" << endl;
      else
	cout << " does not contain 0.0" << endl;

      i.readFrom(cin);
    }
}

