Skip to content

[Bug] Testws fail to compile: error: expected expression (ASSERT_GE(PULSAR_VERSION, 2000000);) #472

@yurivict

Description

@yurivict

Search before asking

  • I searched in the issues and found nothing similar.

Version

3.7.0

Minimal reproduce step

compile tests

What did you expect to see?

n/a

What did you see instead?

FAILED: tests/CMakeFiles/pulsar-tests.dir/VersionTest.cc.o 
ccache /usr/local/libexec/ccache/c++ -DBOOST_ALLOW_DEPRECATED_HEADERS -DBOOST_ALL_NO_LIB -DBUILDING_PULSAR -DHAS_SNAPPY=1 -DHAS_ZSTD=1 -I/usr/ports/net-p2p/pulsar-client-cpp/work/pulsar-client-cpp-3.7.0 -I/usr/ports/net-p2p/pulsar-client-cpp/work/pulsar-client-cpp-3.7.0/include -I/usr/ports/net-p2p/pulsar-client-cpp/work/.build/include -I/usr/ports/net-p2p/pulsar-client-cpp/work/.build/generated -I/usr/local/include -I/usr/ports/net-p2p/pulsar-client-cpp/work/.build/generated/tests -I/usr/ports/net-p2p/pulsar-client-cpp/work/.build/generated/lib -O2 -pipe -fstack-protector-strong -fno-strict-aliasing  -mcrc32 -mpclmul -O2 -pipe -fstack-protector-strong -fno-strict-aliasing  -mcrc32 -mpclmul  -DNDEBUG -std=gnu++17 -fPIE -Wall -Wformat-security -Wvla -Werror -Wno-sign-compare -Wno-deprecated-declarations -Wno-error=cpp -Qunused-arguments -fvisibility=hidden -DTOKEN_PATH=\"/usr/ports/net-p2p/pulsar-client-cpp/work/pulsar-client-cpp-3.7.0/.test-token.txt\" -DTEST_CONF_DIR=\"/usr/ports/net-p2p/pulsar-client-cpp/work/pulsar-client-cpp-3.7.0/test-conf\" -MD -MT tests/CMakeFiles/pulsar-tests.dir/VersionTest.cc.o -MF tests/CMakeFiles/pulsar-tests.dir/VersionTest.cc.o.d -o tests/CMakeFiles/pulsar-tests.dir/VersionTest.cc.o -c /usr/ports/net-p2p/pulsar-client-cpp/work/pulsar-client-cpp-3.7.0/tests/VersionTest.cc
/usr/ports/net-p2p/pulsar-client-cpp/work/pulsar-client-cpp-3.7.0/tests/VersionTest.cc:24:5: error: expected expression
   24 |     ASSERT_GE(PULSAR_VERSION, 2000000);
      |     ^
/usr/local/include/gtest/gtest.h:1930:31: note: expanded from macro 'ASSERT_GE'
 1930 | #define ASSERT_GE(val1, val2) GTEST_ASSERT_GE(val1, val2)
      |                               ^
/usr/local/include/gtest/gtest.h:1906:3: note: expanded from macro 'GTEST_ASSERT_GE'
 1906 |   ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperGE, val1, val2)
      |   ^
/usr/local/include/gtest/gtest_pred_impl.h:148:3: note: expanded from macro 'ASSERT_PRED_FORMAT2'
  148 |   GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_FATAL_FAILURE_)
      |   ^
/usr/local/include/gtest/gtest_pred_impl.h:134:41: note: expanded from macro 'GTEST_PRED_FORMAT2_'
  134 |   GTEST_ASSERT_(pred_format(#v1, #v2, v1, v2), on_failure)
      |                                         ^
/usr/ports/net-p2p/pulsar-client-cpp/work/pulsar-client-cpp-3.7.0/tests/VersionTest.cc:25:5: error: expected expression
   25 |     ASSERT_LE(PULSAR_VERSION, 999999999);
      |     ^
/usr/local/include/gtest/gtest.h:1922:31: note: expanded from macro 'ASSERT_LE'
 1922 | #define ASSERT_LE(val1, val2) GTEST_ASSERT_LE(val1, val2)
      |                               ^
/usr/local/include/gtest/gtest.h:1902:3: note: expanded from macro 'GTEST_ASSERT_LE'
 1902 |   ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperLE, val1, val2)
      |   ^
/usr/local/include/gtest/gtest_pred_impl.h:148:3: note: expanded from macro 'ASSERT_PRED_FORMAT2'
  148 |   GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_FATAL_FAILURE_)
      |   ^
/usr/local/include/gtest/gtest_pred_impl.h:134:41: note: expanded from macro 'GTEST_PRED_FORMAT2_'
  134 |   GTEST_ASSERT_(pred_format(#v1, #v2, v1, v2), on_failure)
      |                                         ^
2 errors generated.

Anything else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions