Skip to content

Commit

Permalink
Fix for issue # 165, string_view::max_size (#166)
Browse files Browse the repository at this point in the history
- Fixed issue #165 
- Fixed CI build due to deprecation of the `upload-artifact` v3
  • Loading branch information
serges147 authored Mar 4, 2025
1 parent 096f890 commit 72923fe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/cetlvast.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
if: ${{ runner.debug == '1' }}
run: ls -lAhR build/
- name: upload-artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.build_flavor }}-${{ matrix.exceptions }}-${{ matrix.std }}-${{ matrix.toolchain }}
path: |
Expand Down Expand Up @@ -105,12 +105,12 @@ jobs:
uses: actions/configure-pages@v3
- name: Upload docs
if: ${{ github.event_name != 'pull_request' }}
uses: actions/upload-pages-artifact@v1
uses: actions/upload-pages-artifact@v3
with:
path: "build/suites/docs/html/"
- name: upload-pr-docs
if: ${{ github.event_name == 'pull_request' }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: pr-docs
path: "build/suites/docs/html/"
Expand Down Expand Up @@ -142,7 +142,7 @@ jobs:
with:
path: cetlvast/build_external
key: gtest_b796f7d44681514f58a683a3a71ff17c94edb0c1
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: Coverage-exceptions-14-gcc
path: build
Expand Down
4 changes: 0 additions & 4 deletions cetlvast/suites/unittest/test_pf17_string_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,17 +139,13 @@ TYPED_TEST(TestStringView, ConstructFromStdString)

TYPED_TEST(TestStringView, SizeAndLength)
{
using char_type = typename TypeParam::char_type;
using basic_string_view = typename TypeParam::sv_type;

const auto test_str = TestFixture::toStr("Test string");

const basic_string_view sv{test_str};
EXPECT_THAT(sv.size(), 11u);
EXPECT_THAT(sv.length(), 11u);
EXPECT_THAT(sv.max_size(),
(basic_string_view::npos - sizeof(typename basic_string_view::size_type) - sizeof(void*)) /
sizeof(char_type) / 4);
}

TYPED_TEST(TestStringView, Empty)
Expand Down

0 comments on commit 72923fe

Please sign in to comment.