mirror of https://github.com/google/benchmark.git
Fixed tests so they build on android.
- Added missing header to test/benchmark_test.cc - Changed std::stoul to std::atol in test/filter_test.cc because of a limitation in the android-ndk (http://stackoverflow.com/questions/17950814/how-to-use-stdstoul-and-stdstoull-in-android)
This commit is contained in:
parent
0d35f5f68a
commit
df0df4aba9
|
@ -13,6 +13,7 @@
|
|||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <cstdlib>
|
||||
|
||||
#if defined(__GNUC__)
|
||||
# define BENCHMARK_NOINLINE __attribute__((noinline))
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#include <cassert>
|
||||
#include <cmath>
|
||||
#include <cstdint>
|
||||
#include <cstdlib>
|
||||
|
||||
#include <iostream>
|
||||
#include <limits>
|
||||
|
@ -75,7 +76,7 @@ int main(int argc, char* argv[]) {
|
|||
|
||||
// Make sure we ran all of the tests
|
||||
const size_t count = test_reporter.GetCount();
|
||||
const size_t expected = (argc == 2) ? std::stoul(argv[1]) : count;
|
||||
const size_t expected = (argc == 2) ? std::atol(argv[1]) : count;
|
||||
if (count != expected) {
|
||||
std::cerr << "ERROR: Expected " << expected << " tests to be ran but only "
|
||||
<< count << " completed" << std::endl;
|
||||
|
|
Loading…
Reference in New Issue