jens@0: /* jens@0: * TestUtils.h jens@0: * Ottoman jens@0: * jens@0: * Created by Jens Alfke on 9/2/09. jens@0: * Copyright 2009 Jens Alfke. All rights reserved. jens@0: * BSD-Licensed: See the file "LICENSE.txt" for details. jens@0: */ jens@0: jens@0: #include // Get gtest from jens@0: #include jens@0: #include "Base.h" jens@0: jens@0: namespace Mooseyard { jens@0: jens@0: std::ostream& operator<< (std::ostream &out, const Blob&); jens@0: jens@0: void shuffle(int a[], int n, unsigned seed =0); jens@0: jens@0: extern char **sWords; jens@0: extern int sNWords; jens@0: jens@0: void readWords(); jens@0: jens@0: class Timer { jens@0: public: jens@0: Timer (const char *operation, int divisor =1); jens@0: ~Timer(); jens@0: double elapsed() {return now() - _time;} jens@0: static double now(); jens@0: private: jens@0: const char *_operation; jens@0: int _divisor; jens@0: double _cpuTime, _time; jens@0: }; jens@0: jens@0: }