diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-06-25 23:13:41 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-06-25 23:31:02 +0300 |
commit | ac0ae65802fddf79ce94bf9229bae094de0d688e (patch) | |
tree | b06e2111834e165cda1400a3fd1f405f272cc059 /src | |
parent | af86a79f6ac5c11d1986be8a3d549fef03482789 (diff) | |
download | manaverse-ac0ae65802fddf79ce94bf9229bae094de0d688e.tar.gz manaverse-ac0ae65802fddf79ce94bf9229bae094de0d688e.tar.bz2 manaverse-ac0ae65802fddf79ce94bf9229bae094de0d688e.tar.xz manaverse-ac0ae65802fddf79ce94bf9229bae094de0d688e.zip |
Add missing checks into test directory.
Diffstat (limited to 'src')
-rw-r--r-- | src/test/testlauncher.cpp | 15 | ||||
-rw-r--r-- | src/test/testlauncher.h | 3 |
2 files changed, 10 insertions, 8 deletions
diff --git a/src/test/testlauncher.cpp b/src/test/testlauncher.cpp index a2738c8ba..84890fe85 100644 --- a/src/test/testlauncher.cpp +++ b/src/test/testlauncher.cpp @@ -188,7 +188,7 @@ int TestLauncher::testFps() } gettimeofday(&end, nullptr); - const int tFps = calcFps(&start, &end, cnt); + const int tFps = calcFps(start, end, cnt); file << mTest << std::endl; file << tFps << std::endl; @@ -220,7 +220,7 @@ int TestLauncher::testFps2() } gettimeofday(&end, nullptr); - const int tFps = calcFps(&start, &end, cnt); + const int tFps = calcFps(start, end, cnt); file << mTest << std::endl; file << tFps << std::endl; @@ -267,7 +267,7 @@ int TestLauncher::testFps3() } gettimeofday(&end, nullptr); - const int tFps = calcFps(&start, &end, cnt); + const int tFps = calcFps(start, end, cnt); file << mTest << std::endl; file << tFps << std::endl; @@ -406,7 +406,7 @@ int TestLauncher::testInternal() } gettimeofday(&end, nullptr); - const int tFps = calcFps(&start, &end, cnt); + const int tFps = calcFps(start, end, cnt); file << mTest << std::endl; file << tFps << std::endl; file << mem << std::endl; @@ -657,15 +657,16 @@ int TestLauncher::testVideoDetection() return 0; } -int TestLauncher::calcFps(const timeval *const start, const timeval *const end, +int TestLauncher::calcFps(const timeval &start, + const timeval &end, const int calls) const { long mtime; long seconds; long useconds; - seconds = end->tv_sec - start->tv_sec; - useconds = end->tv_usec - start->tv_usec; + seconds = end.tv_sec - start.tv_sec; + useconds = end.tv_usec - start.tv_usec; mtime = (seconds * 1000 + useconds / 1000.0) + 0.5; if (mtime == 0) diff --git a/src/test/testlauncher.h b/src/test/testlauncher.h index d82e48f3f..76fb801c3 100644 --- a/src/test/testlauncher.h +++ b/src/test/testlauncher.h @@ -43,7 +43,8 @@ class TestLauncher final int exec(); - int calcFps(const timeval *const start, const timeval *const end, + int calcFps(const timeval &start, + const timeval &end, const int calls) const; int testBackend() const; |