Giter Club home page Giter Club logo

Comments (1)

Kumataro avatar Kumataro commented on June 11, 2024

Reason

It looks like there are no problem at source code. So I saw after pre-processing code.

Using macro is defined here. In logically(not actually), there are path which statement are not executed.
Maybe it makes this compile warning.

#define GTEST_TEST_NO_THROW_(statement, fail) \
GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
if (::testing::internal::AlwaysTrue()) { \
try { \
GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
} \
catch (const std::exception& e) { \
std::cerr << "Exception message: " << e.what() << std::endl; \
goto GTEST_CONCAT_TOKEN_(gtest_label_testnothrow_, __LINE__); \
} \
catch (...) { \
goto GTEST_CONCAT_TOKEN_(gtest_label_testnothrow_, __LINE__); \
} \
} else \
GTEST_CONCAT_TOKEN_(gtest_label_testnothrow_, __LINE__): \
fail("Expected: " #statement " doesn't throw an exception.\n" \
" Actual: it throws.")

  bool result;
  switch (0)
    case 0:
    default:
    if (::testing::internal::AlwaysTrue ())
      {
        try
        {
          if (::testing::internal::AlwaysTrue ())
            {
              result =
                cv::imencode (".avif", img_original, buf, encoding_params_);;
            };
        }
        catch (const std::exception & e)
        {
          std::cerr << "Exception message: " << e.what () << std::endl;
          goto gtest_label_testnothrow_170;
        }
        catch ( ...)
        {
          goto gtest_label_testnothrow_170;
        }
      }
    else
    gtest_label_testnothrow_170:::testing::internal::AssertHelper (::testing::
                                       TestPartResult::kNonFatalFailure,
                                       "/home/kmtr/work/opencv/modules/imgcodecs/test/test_avif.cpp",
                                       170,
                                       "Expected: "
                                       "result = cv::imencode(\".avif\", img_original, buf, encoding_params_);"
                                       " doesn't throw an exception.\n"
                                       "  Actual: it throws.") =::testing::
        Message ();
  switch (0)
    case 0:
    default:
    if (const::testing::AssertionResult gtest_ar_ =::
        testing::AssertionResult (result));
    else
      ::testing::internal::AssertHelper (::testing::
                                         TestPartResult::kNonFatalFailure,
                                         "/home/kmtr/work/opencv/modules/imgcodecs/test/test_avif.cpp",
                                         172,::testing::
                                         internal::GetBoolAssertionFailureMessage
                                         (gtest_ar_, "result", "false",
                                          "true").c_str ()) =::
        testing::Message ();


  const cv::Mat img = cv::imdecode (buf, imread_mode_);

  ValidateRead (img_original, img);
}```

from opencv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.