From 1027c9f0b91761f6dbf16b16b31829db129f59c2 Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Mon, 24 Apr 2023 12:14:38 +0200 Subject: [PATCH] [MISC] Review --- test/unit/io/sam_file/sam_file_output_test.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/test/unit/io/sam_file/sam_file_output_test.cpp b/test/unit/io/sam_file/sam_file_output_test.cpp index b8be9cbe7c..e018c9c880 100644 --- a/test/unit/io/sam_file/sam_file_output_test.cpp +++ b/test/unit/io/sam_file/sam_file_output_test.cpp @@ -212,24 +212,23 @@ TEST(header, copy_program_info_t) read1 41 ref 1 61 1S1M1D1M1I ref 10 300 ACGT !##$ AS:i:2 NM:i:7 )"; seqan3::sam_file_input fin{std::istringstream{comp}, seqan3::format_sam{}}; - auto & input_header(fin.header()); - // We would like to test that (some of) the headers can be copied even if - // ref_ids_types do not match. - typedef std::remove_cvref_t - input_ref_ids_type; // std::deque by default. - typedef std::array output_ref_ids_type; + // We would like to test that (some of) the headers can be copied even if ref_ids_types do not match. + // input_ref_ids_type is std::deque by default. + using input_ref_ids_type = std::remove_cvref_t; + using output_ref_ids_type = std::array; static_assert(!std::is_same_v); seqan3::sam_file_output fout{std::ostringstream{}, output_ref_ids_type{}, std::ranges::empty_view{}, seqan3::format_sam{}}; - fout.header().program_infos = fin.header().program_infos; + auto & output_header(fout.header()); + output_header.program_infos = input_header.program_infos; // Verify that the above was sufficient to copy the headers. - auto const & pg_infos(fout.header().program_infos); + auto const & pg_infos(output_header.program_infos); EXPECT_FALSE(pg_infos.empty()); EXPECT_EQ("cool_program", pg_infos.front().name); }