pikabuka

cerr

Feb 16th, 2022
1,182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.39 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6. template <typename TestFunc>
  7. void RunTestImpl(TestFunc t_func, const string& func) {
  8.     cerr << func;
  9.     t_func();
  10.     cerr << endl;
  11. }
  12.  
  13. // напишите недостающий код
  14. #define RUN_TEST(func) RunTestImpl((func), #func)  
  15.  
  16. void Test1() {
  17.     cerr << " OK"s;
  18. }
  19.  
  20. int main() {
  21.     RUN_TEST(Test1);
  22. }
Advertisement
Add Comment
Please, Sign In to add comment