1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/test/TestUtils.h Sun Sep 20 15:14:12 2009 -0700
1.3 @@ -0,0 +1,37 @@
1.4 +/*
1.5 + * TestUtils.h
1.6 + * Ottoman
1.7 + *
1.8 + * Created by Jens Alfke on 9/2/09.
1.9 + * Copyright 2009 Jens Alfke. All rights reserved.
1.10 + * BSD-Licensed: See the file "LICENSE.txt" for details.
1.11 + */
1.12 +
1.13 +#include <gtest/gtest.h> // Get gtest from <http://code.google.com/p/googletest/>
1.14 +#include <iosfwd>
1.15 +#include "Base.h"
1.16 +
1.17 +namespace Mooseyard {
1.18 +
1.19 + std::ostream& operator<< (std::ostream &out, const Blob&);
1.20 +
1.21 + void shuffle(int a[], int n, unsigned seed =0);
1.22 +
1.23 + extern char **sWords;
1.24 + extern int sNWords;
1.25 +
1.26 + void readWords();
1.27 +
1.28 + class Timer {
1.29 + public:
1.30 + Timer (const char *operation, int divisor =1);
1.31 + ~Timer();
1.32 + double elapsed() {return now() - _time;}
1.33 + static double now();
1.34 + private:
1.35 + const char *_operation;
1.36 + int _divisor;
1.37 + double _cpuTime, _time;
1.38 + };
1.39 +
1.40 +}