Skip to content

Commit c25ec63

Browse files
authored
Merge pull request #3161 from eseiler/test/api
[FIX] API
2 parents 5e51678 + 4849fa1 commit c25ec63

6 files changed

+84
-8
lines changed

test/api_stability/3.2.0/0001-NOAPI-DETAIL-Remove-seqan3-detail-persist.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From a891b3f97e31ae3692260b0f6bdbdd7d5623e014 Mon Sep 17 00:00:00 2001
1+
From 10f7fffd7ebd542f88b35eef42e70f4e6cdfa8c7 Mon Sep 17 00:00:00 2001
22
From: Enrico Seiler <[email protected]>
33
Date: Thu, 20 Oct 2022 14:58:05 +0200
4-
Subject: [PATCH 1/4] [NOAPI] [DETAIL] Remove seqan3::detail::persist
4+
Subject: [PATCH 1/6] [NOAPI] [DETAIL] Remove seqan3::detail::persist
55

66
---
77
test/snippet/core/detail/persist_view.cpp | 37 ------

test/api_stability/3.2.0/0002-NOAPI-Fix-wrong-alignment-score.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From b465f21eb58a9f56e98f8d25f008809bb997cedd Mon Sep 17 00:00:00 2001
1+
From 3e37b45a4aa12391268dcfe5da5f318a17e80b86 Mon Sep 17 00:00:00 2001
22
From: Enrico Seiler <[email protected]>
33
Date: Mon, 9 Jan 2023 15:16:43 +0100
4-
Subject: [PATCH 2/4] [NOAPI] Fix wrong alignment score
4+
Subject: [PATCH 2/6] [NOAPI] Fix wrong alignment score
55

66
---
77
.../matrix/detail/debug_stream_trace_directions_test.cpp | 4 ++--

test/api_stability/3.2.0/0003-API-BREAKAGE-Remove-field-alignment-offset-and-impro.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From e186b58707e8c25ae8d6d1301674f45a48ead9fa Mon Sep 17 00:00:00 2001
1+
From 30a1f9e6b676452fd77ecc0b0dd655968cdeea2b Mon Sep 17 00:00:00 2001
22
From: Enrico Seiler <[email protected]>
33
Date: Mon, 9 Jan 2023 15:16:55 +0100
4-
Subject: [PATCH 3/4] [API][BREAKAGE] Remove field::{alignment,offset} and
4+
Subject: [PATCH 3/6] [API][BREAKAGE] Remove field::{alignment,offset} and
55
improve performance
66

77
---

test/api_stability/3.2.0/0004-API-FIX-Use-namespace-seqan2.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From 03becc43be5398bb3d4572a8adbb0389a07b0f0e Mon Sep 17 00:00:00 2001
1+
From ea874af70b8e12d88b5c64f4c538c159df0c822b Mon Sep 17 00:00:00 2001
22
From: Enrico Seiler <[email protected]>
33
Date: Sun, 14 May 2023 15:21:47 +0200
4-
Subject: [PATCH 4/4] [API][FIX] Use namespace seqan2
4+
Subject: [PATCH 4/6] [API][FIX] Use namespace seqan2
55

66
---
77
.../align_pairwise_edit_distance.hpp | 8 +--
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
From 418f3853e4a62b5cd5997011cfcb429e7bceaef6 Mon Sep 17 00:00:00 2001
2+
From: Enrico Seiler <[email protected]>
3+
Date: Sat, 10 Jun 2023 10:28:52 +0200
4+
Subject: [PATCH 5/6] [API][FIX] views::zip is no range adaptor
5+
6+
---
7+
test/unit/utility/views/zip_test.cpp | 2 +-
8+
1 file changed, 1 insertion(+), 1 deletion(-)
9+
10+
diff --git a/test/unit/utility/views/zip_test.cpp b/test/unit/utility/views/zip_test.cpp
11+
index a92e78651..3dd4d65f3 100644
12+
--- a/test/unit/utility/views/zip_test.cpp
13+
+++ b/test/unit/utility/views/zip_test.cpp
14+
@@ -144,7 +144,7 @@ TEST_F(zip_test, basic)
15+
EXPECT_EQ(zip_view.size(), 4u);
16+
}
17+
{
18+
- auto zip_view = range | seqan3::views::zip(other_range);
19+
+ auto zip_view = seqan3::views::zip(range, other_range);
20+
size_t i{};
21+
for (auto && [elem_1, elem_2] : zip_view)
22+
{
23+
--
24+
2.40.1
25+
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
From bb4305d06083259b6efb5383331189781362bf82 Mon Sep 17 00:00:00 2001
2+
From: Enrico Seiler <[email protected]>
3+
Date: Sat, 10 Jun 2023 11:23:53 +0200
4+
Subject: [PATCH 6/6] [API][FIX] views::chunk preserves common_range
5+
6+
---
7+
test/unit/utility/views/chunk_test.cpp | 14 +++-----------
8+
1 file changed, 3 insertions(+), 11 deletions(-)
9+
10+
diff --git a/test/unit/utility/views/chunk_test.cpp b/test/unit/utility/views/chunk_test.cpp
11+
index 9b8c12baa..3bb2d8b89 100644
12+
--- a/test/unit/utility/views/chunk_test.cpp
13+
+++ b/test/unit/utility/views/chunk_test.cpp
14+
@@ -61,19 +61,19 @@ TYPED_TEST_SUITE(chunk_view_test, underlying_range_types, );
15+
16+
TYPED_TEST(chunk_view_test, concepts)
17+
{
18+
- // chunk view preserves input / forward / bidirectional / random_access / sized.
19+
+ // chunk view preserves input / forward / bidirectional / random_access / sized / common.
20+
EXPECT_EQ((std::ranges::range<TypeParam>), (std::ranges::range<decltype(this->v)>));
21+
EXPECT_EQ((std::ranges::input_range<TypeParam>), (std::ranges::input_range<decltype(this->v)>));
22+
EXPECT_EQ((std::ranges::forward_range<TypeParam>), (std::ranges::forward_range<decltype(this->v)>));
23+
EXPECT_EQ((std::ranges::bidirectional_range<TypeParam>), (std::ranges::bidirectional_range<decltype(this->v)>));
24+
EXPECT_EQ((std::ranges::random_access_range<TypeParam>), (std::ranges::random_access_range<decltype(this->v)>));
25+
EXPECT_EQ((std::ranges::sized_range<TypeParam>), (std::ranges::sized_range<decltype(this->v)>));
26+
+ EXPECT_EQ((std::ranges::common_range<TypeParam>), (std::ranges::common_range<decltype(this->v)>));
27+
28+
// it always ensures view
29+
EXPECT_TRUE((std::ranges::view<decltype(this->v)>));
30+
31+
- // it loses contiguous range, common_range and output range
32+
- EXPECT_FALSE((std::ranges::common_range<decltype(this->v)>));
33+
+ // it loses contiguous range and output range
34+
EXPECT_FALSE((std::ranges::contiguous_range<decltype(this->v)>));
35+
EXPECT_FALSE((std::ranges::output_range<decltype(this->v), std::ranges::range_value_t<TypeParam> &>));
36+
}
37+
@@ -184,11 +184,3 @@ TYPED_TEST(chunk_view_test, use_on_temporaries)
38+
EXPECT_EQ(i, 4u);
39+
}
40+
}
41+
-
42+
-TYPED_TEST(chunk_view_test, big_chunk)
43+
-{
44+
- // Check that a very big number (1ULL<<42) can be stored as chunk_size inside the chunk_view.
45+
- // error: conversion from ‘long long unsigned int’ to ‘uint16_t’ {aka ‘short unsigned int’} changes value
46+
- // from ‘4398046511104’ to ‘0’ [-Werror=overflow]
47+
- [[maybe_unused]] auto v = this->text | seqan3::views::chunk(1ULL << 42);
48+
-}
49+
--
50+
2.40.1
51+

0 commit comments

Comments
 (0)