#include <iostream>
using namespace std;

#include "victor.hpp"

int main()
{

    victor<int> v;
    v.resize(5);
    cout << endl << v << endl;

    //test operator[]
    v[2] = 2;
    cout << endl << v << endl;

    //retest resize
    v.resize(3);
    cout << endl << v << endl;

    //retest operator[]
    v.resize(40);
    for (int i=0;i<40;i++)
        v[i]=i;
    cout << endl << v << endl;

    //test insert
    v.insert(20,1000);
    cout << endl << v << endl;

    //reretest resize
    v.resize(30);
    cout << endl << v << endl;

    //test erase
    v.erase(5,11);
    cout << endl << v << endl;
    v.erase(3);
    cout << endl << v << endl;

    //clear before some more test
    for (int i=0;i<v.size();i++)
        v[i] = i;
    cout << endl << v << endl;
    
    //test =
    victor<int> v2 = v;
    cout << endl << v2 << endl;
    
    //test test
    if (v2==v)
        cout << "equality operator\n";
        
    //test +
    v = v2+v+v;
    cout << endl << v2 << endl;
    
    //test +=
    v2+=v2;
    cout << endl << v2 << endl;
    cout << endl << v << endl;
    
    //test swap
    v.swap(v2);
    cout << endl << v2 << endl;
    cout << endl << v << endl;

    //test shift
    victor<int> v3 = v2;
    cout << endl << v3 << endl;
    v3.shift(4);
    v3.shift(-4);
    cout << endl << v3 << endl;
    
    //test inv
    cout << endl << v2 << endl;
    v3 = v2;
    v2.inv();
    cout << endl << v2 << endl;
    if (v2.isSymetric(v3))
        cout << "symetry test\n";

    return 0;
}
