#include "color.h"
#include "RGB.h"
#include <iostream>
#include <cassert>

using namespace std;

int main()
{
  RGB col1;     
  RGB col2(1.0);
  float ptr[3] = {1,1,1};
  RGB col3(ptr);
  RGB col4(col3);

  assert(col1 == Black);
  assert(col2 == Red);
  assert(col3 == White);
  assert(col4 == White);

  try
  {
	cout << "col1 is " << col1 << endl;
	cout << "col2 is " << col2 << endl;
	cout << "col3 is " << col3 << endl;
	cout << "col4 is " << col4 << endl;


	RGB col5 = col2 * 1.0;// + 1.0 * col3;
	col5 /= 2.0;
	cout << "col 5 is " << col5 << endl;

	col5 = col2 * col3;
        assert( col5 == Red );
	cout << "col 5 is " << col5 << endl;

	assert( col5 != col1 );

	assert( White - Blue == Yellow);
        
        for(int i=0; i<3; i++)
	  col1[i] = col4[i];
  }
  catch (const char* msg)
  {
     cerr << msg << endl;
     exit(0);
  }
}

