llvm/llvm/unittests/ProfileData/CoverageMappingTest.cpp

//===- unittest/ProfileData/CoverageMappingTest.cpp -------------------------=//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "llvm/ProfileData/Coverage/CoverageMapping.h"
#include "llvm/ProfileData/Coverage/CoverageMappingReader.h"
#include "llvm/ProfileData/Coverage/CoverageMappingWriter.h"
#include "llvm/ProfileData/InstrProfReader.h"
#include "llvm/ProfileData/InstrProfWriter.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Testing/Support/Error.h"
#include "llvm/Testing/Support/SupportHelpers.h"
#include "gtest/gtest.h"

#include <map>
#include <ostream>
#include <utility>

usingnamespacellvm;
usingnamespacecoverage;

[[nodiscard]] static ::testing::AssertionResult
ErrorEquals(Error E, coveragemap_error Expected_Err,
            const std::string &Expected_Msg = std::string()) {}

namespace llvm {
namespace coverage {
void PrintTo(const Counter &C, ::std::ostream *os) {}

void PrintTo(const CoverageSegment &S, ::std::ostream *os) {}
}
}

namespace {

struct OutputFunctionCoverageData {};

struct CoverageMappingReaderMock : CoverageMappingReader {};

struct InputFunctionCoverageData {};

struct CoverageMappingTest : ::testing::TestWithParam<std::tuple<bool, bool>> {};

TEST_P(CoverageMappingTest, basic_write_read) {}

TEST_P(CoverageMappingTest, correct_deserialize_for_more_than_two_files) {}

static const auto Err =;

TEST_P(CoverageMappingTest, load_coverage_for_more_than_two_files) {}

TEST_P(CoverageMappingTest, load_coverage_with_bogus_function_name) {}

TEST_P(CoverageMappingTest, load_coverage_for_several_functions) {}

TEST_P(CoverageMappingTest, create_combined_regions) {}

TEST_P(CoverageMappingTest, skipped_segments_have_no_count) {}

TEST_P(CoverageMappingTest, multiple_regions_end_after_parent_ends) {}

TEST_P(CoverageMappingTest, multiple_completed_segments_at_same_loc) {}

TEST_P(CoverageMappingTest, dont_emit_redundant_segments) {}

TEST_P(CoverageMappingTest, dont_emit_closing_segment_at_new_region_start) {}

TEST_P(CoverageMappingTest, handle_consecutive_regions_with_zero_length) {}

TEST_P(CoverageMappingTest, handle_sandwiched_zero_length_region) {}

TEST_P(CoverageMappingTest, handle_last_completed_region) {}

TEST_P(CoverageMappingTest, expansion_gets_first_counter) {}

TEST_P(CoverageMappingTest, basic_coverage_iteration) {}

TEST_P(CoverageMappingTest, test_line_coverage_iterator) {}

TEST_P(CoverageMappingTest, uncovered_function) {}

TEST_P(CoverageMappingTest, uncovered_function_with_mapping) {}

TEST_P(CoverageMappingTest, combine_regions) {}

TEST_P(CoverageMappingTest, restore_combined_counter_after_nested_region) {}

// If CodeRegions and ExpansionRegions cover the same area,
// only counts of CodeRegions should be used.
TEST_P(CoverageMappingTest, dont_combine_expansions) {}

// If an area is covered only by ExpansionRegions, they should be combinated.
TEST_P(CoverageMappingTest, combine_expansions) {}

// Test that counters not associated with any code regions are allowed.
TEST_P(CoverageMappingTest, non_code_region_counters) {}

// Test that MCDC bitmasks not associated with any code regions are allowed.
TEST_P(CoverageMappingTest, non_code_region_bitmask) {}

// Test the order of MCDCDecision before Expansion
TEST_P(CoverageMappingTest, decision_before_expansion) {}

TEST_P(CoverageMappingTest, strip_filename_prefix) {}

TEST_P(CoverageMappingTest, strip_unknown_filename_prefix) {}

TEST_P(CoverageMappingTest, dont_detect_false_instantiations) {}

TEST_P(CoverageMappingTest, load_coverage_for_expanded_file) {}

TEST_P(CoverageMappingTest, skip_duplicate_function_record) {}

INSTANTIATE_TEST_SUITE_P();

TEST(CoverageMappingTest, filename_roundtrip) {}

TEST(CoverageMappingTest, filename_compilation_dir) {}

TEST(CoverageMappingTest, TVIdxBuilder) {}

} // end anonymous namespace