// // main.cpp // leistungstestatSurrogat // // Created by clink on 11/12/14. // Copyright (c) 2014 HSEL. All rights reserved. // #include #include "OneByOneMatrix.h" #include "LargeCowMatrix.h" int failCounter=0; //typedef int NumberType; //typedef OneByOneMatrix NumberType; typedef LargeCowMatrix NumberType; void simpleTests(){ NumberType i1(1); NumberType i2(2); NumberType i3=i1+i2; if (i3!=NumberType(3)){ failCounter++; std::cout << "fail!" << std::endl; } i3++; if (i3!=NumberType(4)){ failCounter++; std::cout << "fail!" << std::endl; } i3=i1; if (i3!=NumberType(1)){ failCounter++; std::cout << "fail!" << std::endl; } if (OneByOneMatrix::instanceCountExceeds(3)){ failCounter++; } } void arrayTests(){ { const int BUFSIZE=1000; NumberType singletonValue(4711); NumberType numbers[BUFSIZE]; bool didFail=false; for(int i=0; i