From 7af1cf6ffc252e2044516cf8eec817bc5dbd788f Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Mon, 19 Aug 2024 14:54:54 +0200 Subject: [PATCH] [FIX] API tests --- .../3.3.0/0001-FIX-take_until_view_test.patch | 2 +- .../0002-FIX-Change-constexpr-test.patch | 2 +- .../0003-API-hamming-scoring-scheme.patch | 2 +- ...n3-sam_file_program_info_t-user_tags.patch | 55 +++++++++++++++++++ ...le_program_info_t-user_tags.patch.license} | 0 .../0004-FIX-Unsupported-SAM-header.patch | 43 --------------- 6 files changed, 58 insertions(+), 46 deletions(-) create mode 100644 test/api_stability/3.3.0/0004-API-seqan3-sam_file_program_info_t-user_tags.patch rename test/api_stability/3.3.0/{0004-FIX-Unsupported-SAM-header.patch.license => 0004-API-seqan3-sam_file_program_info_t-user_tags.patch.license} (100%) delete mode 100644 test/api_stability/3.3.0/0004-FIX-Unsupported-SAM-header.patch diff --git a/test/api_stability/3.3.0/0001-FIX-take_until_view_test.patch b/test/api_stability/3.3.0/0001-FIX-take_until_view_test.patch index 4fb63dddc9..f49b82f066 100644 --- a/test/api_stability/3.3.0/0001-FIX-take_until_view_test.patch +++ b/test/api_stability/3.3.0/0001-FIX-take_until_view_test.patch @@ -1,4 +1,4 @@ -From e3f24c7888ab68746b9beb7619a1dd6661a73d71 Mon Sep 17 00:00:00 2001 +From 4f91fab27ed20ba020a1a2d84f4c6a42b5b0c3bc Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Thu, 28 Sep 2023 21:28:37 +0200 Subject: [PATCH 1/4] [FIX] take_until_view_test diff --git a/test/api_stability/3.3.0/0002-FIX-Change-constexpr-test.patch b/test/api_stability/3.3.0/0002-FIX-Change-constexpr-test.patch index 7acb15b848..79ff193389 100644 --- a/test/api_stability/3.3.0/0002-FIX-Change-constexpr-test.patch +++ b/test/api_stability/3.3.0/0002-FIX-Change-constexpr-test.patch @@ -1,4 +1,4 @@ -From cb9c300606e3a4c1860f3195b98f5245f09474e5 Mon Sep 17 00:00:00 2001 +From 21ad129184c9a5833770b1bbfe51b344a0a8f5be Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Thu, 28 Sep 2023 19:35:57 +0200 Subject: [PATCH 2/4] [FIX] Change constexpr test diff --git a/test/api_stability/3.3.0/0003-API-hamming-scoring-scheme.patch b/test/api_stability/3.3.0/0003-API-hamming-scoring-scheme.patch index ba100574f2..9b5e72fe8f 100644 --- a/test/api_stability/3.3.0/0003-API-hamming-scoring-scheme.patch +++ b/test/api_stability/3.3.0/0003-API-hamming-scoring-scheme.patch @@ -1,4 +1,4 @@ -From 9f061adb903403ee7e039f6480c87d7d1c577c14 Mon Sep 17 00:00:00 2001 +From 95d6bf488f14178e26cf6be88ddeaf14c9332eaf Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Sun, 28 Jul 2024 15:17:28 +0200 Subject: [PATCH 3/4] [API] hamming scoring scheme diff --git a/test/api_stability/3.3.0/0004-API-seqan3-sam_file_program_info_t-user_tags.patch b/test/api_stability/3.3.0/0004-API-seqan3-sam_file_program_info_t-user_tags.patch new file mode 100644 index 0000000000..68710ca5f2 --- /dev/null +++ b/test/api_stability/3.3.0/0004-API-seqan3-sam_file_program_info_t-user_tags.patch @@ -0,0 +1,55 @@ +From 1570f0829cda28be380ba315d8e9c003b21bf1cc Mon Sep 17 00:00:00 2001 +From: Enrico Seiler +Date: Mon, 19 Aug 2024 14:13:08 +0200 +Subject: [PATCH 4/4] [API] seqan3::sam_file_program_info_t::user_tags + +--- + test/unit/io/sam_file/format_sam_test.cpp | 13 ++----------- + .../io/sam_file/sam_file_format_test_template.hpp | 2 +- + 2 files changed, 3 insertions(+), 12 deletions(-) + +diff --git a/test/unit/io/sam_file/format_sam_test.cpp b/test/unit/io/sam_file/format_sam_test.cpp +index 66683ce3b..81f6d075e 100644 +--- a/test/unit/io/sam_file/format_sam_test.cpp ++++ b/test/unit/io/sam_file/format_sam_test.cpp +@@ -174,22 +174,13 @@ TEST_F(sam_format, header_errors) + "@SQ\tSN:ref2\tLN:243199373\tSB:user_tag\tLB:user_tag\tpb:user_tag\n" + "@RG\tID:U0a_A2_L1\tIB:user_tag\tpb:user_tag\n" + "@PG\tID:qc\tIB:user_tag\tPB:user_tag\tCB:user_tag\tDB:user_tag\tVB:user_tag\tpb:user_tag\n"}; +- std::string expected_cerr{"Unsupported SAM header tag in @HD: VB\n" +- "Unsupported SAM header tag in @HD: SB\n" +- "Unsupported SAM header tag in @HD: GB\n" +- "Unsupported SAM header tag in @HD: pb\n" +- "Unsupported SAM header tag in @PG: IB\n" +- "Unsupported SAM header tag in @PG: PB\n" +- "Unsupported SAM header tag in @PG: CB\n" +- "Unsupported SAM header tag in @PG: DB\n" +- "Unsupported SAM header tag in @PG: VB\n" +- "Unsupported SAM header tag in @PG: pb\n"}; ++ + std::istringstream istream(header_str); + seqan3::sam_file_input fin{istream, seqan3::format_sam{}}; + + testing::internal::CaptureStderr(); + EXPECT_NO_THROW(fin.begin()); +- EXPECT_EQ(testing::internal::GetCapturedStderr(), expected_cerr); ++ EXPECT_EQ(testing::internal::GetCapturedStderr(), ""); + } + { // missing VN tag in @HD + std::string header_str{"@HD\n"}; +diff --git a/test/unit/io/sam_file/sam_file_format_test_template.hpp b/test/unit/io/sam_file/sam_file_format_test_template.hpp +index 8cd712ddb..599a04bbc 100644 +--- a/test/unit/io/sam_file/sam_file_format_test_template.hpp ++++ b/test/unit/io/sam_file/sam_file_format_test_template.hpp +@@ -503,7 +503,7 @@ TYPED_TEST_P(sam_file_write, with_header) + header.grouping = "none"; + header.ref_id_info.push_back({this->ref_seq.size(), "AN:other_name"}); + header.ref_dict[this->ref_id] = 0; +- header.program_infos.push_back({"prog1", "cool_program", "./prog1", "a", "b", "c"}); ++ header.program_infos.push_back({"prog1", "cool_program", "./prog1", "a", "b", "c", ""}); + header.read_groups.emplace_back("group1", "DS:more info"); + header.comments.push_back("This is a comment."); + +-- +2.43.0 + diff --git a/test/api_stability/3.3.0/0004-FIX-Unsupported-SAM-header.patch.license b/test/api_stability/3.3.0/0004-API-seqan3-sam_file_program_info_t-user_tags.patch.license similarity index 100% rename from test/api_stability/3.3.0/0004-FIX-Unsupported-SAM-header.patch.license rename to test/api_stability/3.3.0/0004-API-seqan3-sam_file_program_info_t-user_tags.patch.license diff --git a/test/api_stability/3.3.0/0004-FIX-Unsupported-SAM-header.patch b/test/api_stability/3.3.0/0004-FIX-Unsupported-SAM-header.patch deleted file mode 100644 index 642a137981..0000000000 --- a/test/api_stability/3.3.0/0004-FIX-Unsupported-SAM-header.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 72f044049983ad3f2e72ea4342f9573102088479 Mon Sep 17 00:00:00 2001 -From: Enrico Seiler -Date: Sun, 28 Jul 2024 16:06:27 +0200 -Subject: [PATCH 4/4] [FIX] Unsupported SAM header - ---- - test/unit/io/sam_file/format_sam_test.cpp | 20 ++++++++++---------- - 1 file changed, 10 insertions(+), 10 deletions(-) - -diff --git a/test/unit/io/sam_file/format_sam_test.cpp b/test/unit/io/sam_file/format_sam_test.cpp -index 66683ce3b..3cdba0078 100644 ---- a/test/unit/io/sam_file/format_sam_test.cpp -+++ b/test/unit/io/sam_file/format_sam_test.cpp -@@ -174,16 +174,16 @@ TEST_F(sam_format, header_errors) - "@SQ\tSN:ref2\tLN:243199373\tSB:user_tag\tLB:user_tag\tpb:user_tag\n" - "@RG\tID:U0a_A2_L1\tIB:user_tag\tpb:user_tag\n" - "@PG\tID:qc\tIB:user_tag\tPB:user_tag\tCB:user_tag\tDB:user_tag\tVB:user_tag\tpb:user_tag\n"}; -- std::string expected_cerr{"Unsupported SAM header tag in @HD: VB\n" -- "Unsupported SAM header tag in @HD: SB\n" -- "Unsupported SAM header tag in @HD: GB\n" -- "Unsupported SAM header tag in @HD: pb\n" -- "Unsupported SAM header tag in @PG: IB\n" -- "Unsupported SAM header tag in @PG: PB\n" -- "Unsupported SAM header tag in @PG: CB\n" -- "Unsupported SAM header tag in @PG: DB\n" -- "Unsupported SAM header tag in @PG: VB\n" -- "Unsupported SAM header tag in @PG: pb\n"}; -+ std::string expected_cerr{"Unsupported tag found in SAM header @HD: \"VB:user_tag\"\n" -+ "Unsupported tag found in SAM header @HD: \"SB:user_tag\"\n" -+ "Unsupported tag found in SAM header @HD: \"GB:user_tag\"\n" -+ "Unsupported tag found in SAM header @HD: \"pb:user_tag\"\n" -+ "Unsupported tag found in SAM header @PG: \"IB:user_tag\"\n" -+ "Unsupported tag found in SAM header @PG: \"PB:user_tag\"\n" -+ "Unsupported tag found in SAM header @PG: \"CB:user_tag\"\n" -+ "Unsupported tag found in SAM header @PG: \"DB:user_tag\"\n" -+ "Unsupported tag found in SAM header @PG: \"VB:user_tag\"\n" -+ "Unsupported tag found in SAM header @PG: \"pb:user_tag\"\n"}; - std::istringstream istream(header_str); - seqan3::sam_file_input fin{istream, seqan3::format_sam{}}; - --- -2.43.0 -