// File:            testset.cpp
// ----------------------------------------------------------------------
// Author:          Computer Science S-111 staff
// Modified by:     Russell Lowke, lowke@fas.harvard.edu
// TF:              Francis Crick
// Date modified:   7/24/2002
// Version:			1
//
// Description: modify bitset.hpp and bitset.cpp to include:		
// 		void include(int i, int j);
// 		int cardinality();
// 		void invert();
// 		friend bool operator < (const bitset& seta, const bitset& setb);
// 		bitset(int s, int i, int j);
//

		
#include <iostream>
#include <iomanip>
#include "bitset.hpp"


// Write your test program here.  
// It should fully test your new bitset functions.

int
main()
{
	cout << "TESTS\n" << endl;
	cout << "include (int i, int j)" << endl;
	
	bitset test0(21);
	cout << "bitset test0(21);  =" << test0;
	
	bitset test1(21);
	cout << "bitset test1(21);  =" << test1;
	
	test1.include(2, 6);
	cout << "test1.include(2, 6); = " << test1;
	
	test1.include(14, 18);
	cout << "test1.include(14, 18); = " << test1;
	
	bitset test2(12, 0, 11);
	cout << "test setting all items in bitset" << endl;
	cout << "bitset test2(12, 0, 11);  =" << test2;
	
	bitset test3(12, 3, 6);
	cout << "bitset test3(12, 3, 6);  =" << test3;
	
	bitset test4(21, 15, 17);
	cout << "bitset test4(21, 15, 17);  =" << test4;
	
	cout << "test0.cardinality()  = " << test0.cardinality() << endl;
	cout << "test1.cardinality()  = " << test1.cardinality() << endl;
	cout << "test2.cardinality()  = " << test2.cardinality() << endl;
	cout << "test3.cardinality()  = " << test3.cardinality() << endl;
	
	cout << "test2 < test3 = " << (test2 < test3) << endl;
	cout << "test3 < test2 = " << (test3 < test2) << endl;
	cout << "test0 < test3 = " << (test0 < test3) << endl;
	cout << "test1 < test4 = " << (test1 < test4) << endl;
	cout << "test4 < test1 = " << (test4 < test1) << endl;
	
	test0.invert();
	test1.invert();
	test2.invert();
	test3.invert();
	test4.invert();
	cout << "test0.invert() = " << test0;
	cout << "test1.invert() = " << test1;
	cout << "test2.invert() = " << test2;
	cout << "test3.invert() = " << test3;
	cout << "test4.invert() = " << test4;
}
