Advertisement
Guest User

main.cpp

a guest
Sep 18th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.47 KB | None | 0 0
  1. #include <exception>
  2. #include <functional>
  3.  
  4. #include "test_runner.h"
  5.  
  6. using namespace std;
  7.  
  8. void TestDefault() {}
  9.  
  10. void TestOne(int x, int y) {
  11.   ASSERT_EQUAL(x, y);
  12. }
  13.  
  14. void SomeFunc() {
  15.   throw exception();
  16. }
  17.  
  18. void TestTwo(function<void()> func) {
  19.   func();
  20. }
  21.  
  22. int main(int argc, char* argv[]) {
  23.  
  24.   TestRunner tr;
  25.  
  26.   int x = 1;
  27.   int y = 2;
  28.  
  29.   RUN_TEST(tr, TestDefault);
  30.   RUN_TEST(tr, TestOne, x, y);
  31.   RUN_TEST(tr, TestTwo, SomeFunc);
  32.  
  33.   return 0;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement