Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8159365

assert is not defined for unit tests

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • 9
    • hotspot
    • None
    • b127

      gtest/gtest.h include assert.h which will define the assert macro, but hotspot has its own standards incompatible assert macro that takes two parameter. The workaround is to undef assert and then re-define it. The re-definition must unfortunately be copied since debug.hpp might already have been included and a second include wouldn't work due to the header guards in debug.hpp.

            ehelin Erik Helin
            ehelin Erik Helin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: