sample2.h (googletest-release-1.10.0) | : | sample2.h (googletest-release-1.11.0) | ||
---|---|---|---|---|
skipping to change at line 32 | skipping to change at line 32 | |||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | |||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |||
// A sample program demonstrating using Google C++ testing framework. | // A sample program demonstrating using Google C++ testing framework. | |||
#ifndef GTEST_SAMPLES_SAMPLE2_H_ | #ifndef GOOGLETEST_SAMPLES_SAMPLE2_H_ | |||
#define GTEST_SAMPLES_SAMPLE2_H_ | #define GOOGLETEST_SAMPLES_SAMPLE2_H_ | |||
#include <string.h> | #include <string.h> | |||
// A simple string class. | // A simple string class. | |||
class MyString { | class MyString { | |||
private: | private: | |||
const char* c_string_; | const char* c_string_; | |||
const MyString& operator=(const MyString& rhs); | const MyString& operator=(const MyString& rhs); | |||
public: | public: | |||
skipping to change at line 79 | skipping to change at line 79 | |||
// Gets the 0-terminated C string this MyString object represents. | // Gets the 0-terminated C string this MyString object represents. | |||
const char* c_string() const { return c_string_; } | const char* c_string() const { return c_string_; } | |||
size_t Length() const { return c_string_ == nullptr ? 0 : strlen(c_string_); } | size_t Length() const { return c_string_ == nullptr ? 0 : strlen(c_string_); } | |||
// Sets the 0-terminated C string this MyString object represents. | // Sets the 0-terminated C string this MyString object represents. | |||
void Set(const char* c_string); | void Set(const char* c_string); | |||
}; | }; | |||
#endif // GTEST_SAMPLES_SAMPLE2_H_ | #endif // GOOGLETEST_SAMPLES_SAMPLE2_H_ | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added |