Lines Matching defs:CoverageMappingTest

131 struct CoverageMappingTest : ::testing::TestWithParam<std::tuple<bool, bool>> {  struct
132 bool UseMultipleReaders;
133 StringMap<unsigned> Files;
134 std::vector<std::string> Filenames;
135 std::vector<InputFunctionCoverageData> InputFunctions;
136 std::vector<OutputFunctionCoverageData> OutputFunctions;
138 InstrProfWriter ProfileWriter;
139 std::unique_ptr<IndexedInstrProfReader> ProfileReader;
141 std::unique_ptr<CoverageMapping> LoadedCoverage;
143 void SetUp() override { in SetUp()
148 unsigned getGlobalFileIndex(StringRef Name) { in getGlobalFileIndex()
161 unsigned getFileIndexForFunction(StringRef Name) { in getFileIndexForFunction()
174 void startFunction(StringRef FuncName, uint64_t Hash) { in startFunction()
178 void addCMR(Counter C, StringRef File, unsigned LS, unsigned CS, unsigned LE, in addCMR()
187 void addExpansionCMR(StringRef File, StringRef ExpandedFile, unsigned LS, in addExpansionCMR()
194 void addExpression(CounterExpression CE) { in addExpression()
198 std::string writeCoverageRegions(InputFunctionCoverageData &Data) { in writeCoverageRegions()
208 void readCoverageRegions(const std::string &Coverage, in readCoverageRegions()
222 void writeAndReadCoverageRegions(bool EmitFilenames = true) { in writeAndReadCoverageRegions()
234 void readProfCounts() { in readProfCounts()
241 Expected<std::unique_ptr<CoverageMapping>> readOutputFunctions() { in readOutputFunctions()
257 Error loadCoverageMapping(bool EmitFilenames = true) { in loadCoverageMapping()
268 TEST_P(CoverageMappingTest, basic_write_read) { in TEST_P() argument
293 TEST_P(CoverageMappingTest, correct_deserialize_for_more_than_two_files) { in TEST_P() argument
320 TEST_P(CoverageMappingTest, load_coverage_for_more_than_two_files) { in TEST_P() argument
341 TEST_P(CoverageMappingTest, load_coverage_with_bogus_function_name) { in TEST_P() argument
348 TEST_P(CoverageMappingTest, load_coverage_for_several_functions) { in TEST_P() argument
377 TEST_P(CoverageMappingTest, create_combined_regions) { in TEST_P() argument
398 TEST_P(CoverageMappingTest, skipped_segments_have_no_count) { in TEST_P() argument
417 TEST_P(CoverageMappingTest, multiple_regions_end_after_parent_ends) { in TEST_P() argument
478 TEST_P(CoverageMappingTest, multiple_completed_segments_at_same_loc) { in TEST_P() argument
506 TEST_P(CoverageMappingTest, dont_emit_redundant_segments) { in TEST_P() argument
530 TEST_P(CoverageMappingTest, dont_emit_closing_segment_at_new_region_start) { in TEST_P() argument
556 TEST_P(CoverageMappingTest, handle_consecutive_regions_with_zero_length) { in TEST_P() argument
578 TEST_P(CoverageMappingTest, handle_sandwiched_zero_length_region) { in TEST_P() argument
611 TEST_P(CoverageMappingTest, handle_last_completed_region) { in TEST_P() argument
637 TEST_P(CoverageMappingTest, expansion_gets_first_counter) { in TEST_P() argument
653 TEST_P(CoverageMappingTest, basic_coverage_iteration) { in TEST_P() argument
675 TEST_P(CoverageMappingTest, test_line_coverage_iterator) { in TEST_P() argument
701 TEST_P(CoverageMappingTest, uncovered_function) { in TEST_P() argument
713 TEST_P(CoverageMappingTest, uncovered_function_with_mapping) { in TEST_P() argument
727 TEST_P(CoverageMappingTest, combine_regions) { in TEST_P() argument
745 TEST_P(CoverageMappingTest, restore_combined_counter_after_nested_region) { in TEST_P() argument
765 TEST_P(CoverageMappingTest, dont_combine_expansions) { in TEST_P() argument
786 TEST_P(CoverageMappingTest, combine_expansions) { in TEST_P() argument
808 TEST_P(CoverageMappingTest, non_code_region_counters) { in TEST_P() argument
827 TEST_P(CoverageMappingTest, strip_filename_prefix) { in TEST_P() argument
841 TEST_P(CoverageMappingTest, strip_unknown_filename_prefix) { in TEST_P() argument
855 TEST_P(CoverageMappingTest, dont_detect_false_instantiations) { in TEST_P() argument
874 TEST_P(CoverageMappingTest, load_coverage_for_expanded_file) { in TEST_P() argument
890 TEST_P(CoverageMappingTest, skip_duplicate_function_record) { in TEST_P() argument
927 TEST(CoverageMappingTest, filename_roundtrip) { in TEST() argument
951 TEST(CoverageMappingTest, filename_compilation_dir) { in TEST() argument