Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tests to the latest oatpp 1.4.0 API #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hugoaboud
Copy link

I've followed the README instructions and had the following errors:

[ 87%] Building CXX object CMakeFiles/hls-example-test.dir/test/tests.cpp.o
/home/aboud/sandbox/example-hls-media-stream/test/tests.cpp: In member function ‘virtual void {anonymous}::Test::onRun()’:
/home/aboud/sandbox/example-hls-media-stream/test/tests.cpp:13:5: error: ‘OATPP_LOGD’ was not declared in this scope; did you mean ‘OATPP_LOGd’?
   13 |     OATPP_LOGD(TAG, "Hello Test");
      |     ^~~~~~~~~~
      |     OATPP_LOGd
/home/aboud/sandbox/example-hls-media-stream/test/tests.cpp: In function ‘int main()’:
/home/aboud/sandbox/example-hls-media-stream/test/tests.cpp:26:16: error: ‘oatpp::base::Environment’ has not been declared
   26 |   oatpp::base::Environment::init();
      |                ^~~~~~~~~~~
/home/aboud/sandbox/example-hls-media-stream/test/tests.cpp:33:50: error: ‘oatpp::base::Environment’ has not been declared
   33 |   std::cout << "objectsCount = " << oatpp::base::Environment::getObjectsCount() << "\n";
      |                                                  ^~~~~~~~~~~
/home/aboud/sandbox/example-hls-media-stream/test/tests.cpp:34:52: error: ‘oatpp::base::Environment’ has not been declared
   34 |   std::cout << "objectsCreated = " << oatpp::base::Environment::getObjectsCreated() << "\n\n";
      |                                                    ^~~~~~~~~~~
In file included from /usr/local/include/oatpp-1.4.0/oatpp/oatpp-test/UnitTest.hpp:29,
                 from /home/aboud/sandbox/example-hls-media-stream/test/tests.cpp:2:
/home/aboud/sandbox/example-hls-media-stream/test/tests.cpp:36:29: error: ‘oatpp::base::Environment’ has not been declared
   36 |   OATPP_ASSERT(oatpp::base::Environment::getObjectsCount() == 0);
      |                             ^~~~~~~~~~~
/home/aboud/sandbox/example-hls-media-stream/test/tests.cpp:38:16: error: ‘oatpp::base::Environment’ has not been declared
   38 |   oatpp::base::Environment::destroy();
      |                ^~~~~~~~~~~
make[2]: *** [CMakeFiles/hls-example-test.dir/build.make:76: CMakeFiles/hls-example-test.dir/test/tests.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:139: CMakeFiles/hls-example-test.dir/all] Error 2
make: *** [Makefile:101: all] Error 2

Apparently, the tests.cpp file was not updated to the 1.4.0 version on the commit: afcb50f

With these changes, the build ran successfully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant