MCPcopy Create free account
hub / github.com/awslabs/aws-lambda-cpp / PrintHeader

Method PrintHeader

tests/gtest/gtest-all.cc:2668–2680  ·  view source on GitHub ↗

Print a unified diff header for one hunk. The format is "@@ - , + , @@" where the left/right parts are omitted if unnecessary.

Source from the content-addressed store, hash-verified

2666 // "@@ -<left_start>,<left_length> +<right_start>,<right_length> @@"
2667 // where the left/right parts are omitted if unnecessary.
2668 void PrintHeader(std::ostream* ss) const {
2669 *ss << "@@ ";
2670 if (removes_) {
2671 *ss << "-" << left_start_ << "," << (removes_ + common_);
2672 }
2673 if (removes_ && adds_) {
2674 *ss << " ";
2675 }
2676 if (adds_) {
2677 *ss << "+" << right_start_ << "," << (adds_ + common_);
2678 }
2679 *ss << " @@\n";
2680 }
2681
2682 size_t left_start_, right_start_;
2683 size_t adds_, removes_, common_;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected