Skip to content

Commit

Permalink
TestPlatform: fixed functionConst selfcheck warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
firewave committed Oct 11, 2023
1 parent cc005f6 commit 9d2ef05
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/testplatform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ class TestPlatform : public TestFixture {
ASSERT_EQUALS(cppcheck::Platform::Type::Native, platform.type);
}

void limitsDefines() {
void limitsDefines() const {
cppcheck::Platform platform;
platform.set(cppcheck::Platform::Unix64);
const std::string defs = "CHAR_BIT=8;SCHAR_MIN=-128;SCHAR_MAX=127;UCHAR_MAX=255;CHAR_MIN=0;CHAR_MAX=127;SHRT_MIN=-32768;SHRT_MAX=32767;USHRT_MAX=65535;INT_MIN=-2147483648;INT_MAX=2147483647;UINT_MAX=4294967295;LONG_MIN=-9223372036854775808;LONG_MAX=9223372036854775807;ULONG_MAX=9223372036854775807";
Expand All @@ -408,7 +408,7 @@ class TestPlatform : public TestFixture {
ASSERT_EQUALS(defs_c99, platform.getLimitsDefines(Standards::cppstd_t::CPPLatest));
}

void charMinMax() {
void charMinMax() const {
cppcheck::Platform platform;
ASSERT_EQUALS(255, platform.unsignedCharMax());
ASSERT_EQUALS(127, platform.signedCharMax());
Expand Down

0 comments on commit 9d2ef05

Please sign in to comment.