Search code examples
c++assertgoogletest

How to assert execution time in Google Test?


I am using Google's C++ testing framework Gtest. I would like to test a function against its execution time, e.g. function foo() fails if its execution is longer than 3ms. I could not find an ASSERT statement to achieve this. Does gtest not include such a feature ?


Solution

  • Probably doesn't exist as the bug is still open: http://code.google.com/p/googletest/issues/detail?id=348