Adds an experimental CMake build script; makes the samples compile without warnings on Windows.
This commit is contained in:
@@ -115,6 +115,9 @@ class PreCalculatedPrimeTable : public PrimeTable {
|
||||
|
||||
const int is_prime_size_;
|
||||
bool* const is_prime_;
|
||||
|
||||
// Disables compiler wqarning "assignment operator could ot be generated."
|
||||
void operator=(const PreCalculatedPrimeTable& rhs);
|
||||
};
|
||||
|
||||
#endif // GTEST_SAMPLES_PRIME_TABLES_H_
|
||||
|
||||
@@ -58,7 +58,7 @@ class Water {
|
||||
return malloc(allocation_size);
|
||||
}
|
||||
|
||||
void operator delete(void* block, size_t allocation_size) {
|
||||
void operator delete(void* block, size_t /* allocation_size */) {
|
||||
allocated_--;
|
||||
free(block);
|
||||
}
|
||||
@@ -78,12 +78,12 @@ int Water::allocated_ = 0;
|
||||
class LeakChecker : public EmptyTestEventListener {
|
||||
private:
|
||||
// Called before a test starts.
|
||||
virtual void OnTestStart(const TestInfo& test_info) {
|
||||
virtual void OnTestStart(const TestInfo& /* test_info */) {
|
||||
initially_allocated_ = Water::allocated();
|
||||
}
|
||||
|
||||
// Called after a test ends.
|
||||
virtual void OnTestEnd(const TestInfo& test_info) {
|
||||
virtual void OnTestEnd(const TestInfo& /* test_info */) {
|
||||
int difference = Water::allocated() - initially_allocated_;
|
||||
|
||||
// You can generate a failure in any event handler except
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace {
|
||||
class TersePrinter : public EmptyTestEventListener {
|
||||
private:
|
||||
// Called before any test activity starts.
|
||||
virtual void OnTestProgramStart(const UnitTest& unit_test) {}
|
||||
virtual void OnTestProgramStart(const UnitTest& /* unit_test */) {}
|
||||
|
||||
// Called after all test activities have ended.
|
||||
virtual void OnTestProgramEnd(const UnitTest& unit_test) {
|
||||
|
||||
Reference in New Issue
Block a user