test_debug_flag.cpp 619 B

12345678910111213141516171819202122
  1. // This file is part of OpenCV project.
  2. // It is subject to the license terms in the LICENSE file found in the top-level directory
  3. // of this distribution and at http://opencv.org/license.html.
  4. #include "test_precomp.hpp"
  5. namespace opencv_test { namespace {
  6. /**
  7. * Tests whether cvv::debugMode() and cvv::setDebugFlag(bool)`
  8. * (from /include/opencv2/debug_mode.hpp) behave correctly.
  9. */
  10. TEST(DebugFlagTest, SetAndUnsetDebugMode)
  11. {
  12. EXPECT_EQ(cvv::debugMode(), true);
  13. cvv::setDebugFlag(false);
  14. EXPECT_EQ(cvv::debugMode(), false);
  15. cvv::setDebugFlag(true);
  16. EXPECT_EQ(cvv::debugMode(), true);
  17. }
  18. }} // namespace