mirror of
https://github.com/yuzu-emu/breakpad.git
synced 2025-01-10 23:05:35 +00:00
Avoid gmock warning "Uninteresting mock function call"
Patch by Michael Krebs <mkrebs@chromium.org>, R=me at https://breakpad.appspot.com/397002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1183 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
3a59d0586b
commit
54e75078d6
|
@ -139,6 +139,7 @@ using google_breakpad::scoped_ptr;
|
||||||
using google_breakpad::SymbolSupplier;
|
using google_breakpad::SymbolSupplier;
|
||||||
using google_breakpad::SystemInfo;
|
using google_breakpad::SystemInfo;
|
||||||
using ::testing::_;
|
using ::testing::_;
|
||||||
|
using ::testing::AnyNumber;
|
||||||
using ::testing::DoAll;
|
using ::testing::DoAll;
|
||||||
using ::testing::Mock;
|
using ::testing::Mock;
|
||||||
using ::testing::Ne;
|
using ::testing::Ne;
|
||||||
|
@ -340,6 +341,9 @@ TEST_F(MinidumpProcessorTest, TestSymbolSupplierLookupCounts) {
|
||||||
Property(&google_breakpad::CodeModule::code_file,
|
Property(&google_breakpad::CodeModule::code_file,
|
||||||
Ne("c:\\test_app.exe")),
|
Ne("c:\\test_app.exe")),
|
||||||
_, _, _)).WillRepeatedly(Return(SymbolSupplier::NOT_FOUND));
|
_, _, _)).WillRepeatedly(Return(SymbolSupplier::NOT_FOUND));
|
||||||
|
// Avoid GMOCK WARNING "Uninteresting mock function call - returning
|
||||||
|
// directly" for FreeSymbolData().
|
||||||
|
EXPECT_CALL(supplier, FreeSymbolData(_)).Times(AnyNumber());
|
||||||
ASSERT_EQ(processor.Process(minidump_file, &state),
|
ASSERT_EQ(processor.Process(minidump_file, &state),
|
||||||
google_breakpad::PROCESS_OK);
|
google_breakpad::PROCESS_OK);
|
||||||
|
|
||||||
|
@ -355,6 +359,9 @@ TEST_F(MinidumpProcessorTest, TestSymbolSupplierLookupCounts) {
|
||||||
Property(&google_breakpad::CodeModule::code_file,
|
Property(&google_breakpad::CodeModule::code_file,
|
||||||
Ne("c:\\test_app.exe")),
|
Ne("c:\\test_app.exe")),
|
||||||
_, _, _)).WillRepeatedly(Return(SymbolSupplier::NOT_FOUND));
|
_, _, _)).WillRepeatedly(Return(SymbolSupplier::NOT_FOUND));
|
||||||
|
// Avoid GMOCK WARNING "Uninteresting mock function call - returning
|
||||||
|
// directly" for FreeSymbolData().
|
||||||
|
EXPECT_CALL(supplier, FreeSymbolData(_)).Times(AnyNumber());
|
||||||
ASSERT_EQ(processor.Process(minidump_file, &state),
|
ASSERT_EQ(processor.Process(minidump_file, &state),
|
||||||
google_breakpad::PROCESS_OK);
|
google_breakpad::PROCESS_OK);
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,6 +60,7 @@ using google_breakpad::test_assembler::Label;
|
||||||
using google_breakpad::test_assembler::Section;
|
using google_breakpad::test_assembler::Section;
|
||||||
using std::vector;
|
using std::vector;
|
||||||
using testing::_;
|
using testing::_;
|
||||||
|
using testing::AnyNumber;
|
||||||
using testing::Return;
|
using testing::Return;
|
||||||
using testing::SetArgumentPointee;
|
using testing::SetArgumentPointee;
|
||||||
using testing::Test;
|
using testing::Test;
|
||||||
|
@ -90,6 +91,10 @@ class StackwalkerAMD64Fixture {
|
||||||
// SetModuleSymbols to override this.
|
// SetModuleSymbols to override this.
|
||||||
EXPECT_CALL(supplier, GetCStringSymbolData(_, _, _, _))
|
EXPECT_CALL(supplier, GetCStringSymbolData(_, _, _, _))
|
||||||
.WillRepeatedly(Return(MockSymbolSupplier::NOT_FOUND));
|
.WillRepeatedly(Return(MockSymbolSupplier::NOT_FOUND));
|
||||||
|
|
||||||
|
// Avoid GMOCK WARNING "Uninteresting mock function call - returning
|
||||||
|
// directly" for FreeSymbolData().
|
||||||
|
EXPECT_CALL(supplier, FreeSymbolData(_)).Times(AnyNumber());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the Breakpad symbol information that supplier should return for
|
// Set the Breakpad symbol information that supplier should return for
|
||||||
|
|
|
@ -62,6 +62,7 @@ using google_breakpad::test_assembler::Label;
|
||||||
using google_breakpad::test_assembler::Section;
|
using google_breakpad::test_assembler::Section;
|
||||||
using std::vector;
|
using std::vector;
|
||||||
using testing::_;
|
using testing::_;
|
||||||
|
using testing::AnyNumber;
|
||||||
using testing::Return;
|
using testing::Return;
|
||||||
using testing::SetArgumentPointee;
|
using testing::SetArgumentPointee;
|
||||||
using testing::Test;
|
using testing::Test;
|
||||||
|
@ -92,6 +93,10 @@ class StackwalkerARMFixture {
|
||||||
// SetModuleSymbols to override this.
|
// SetModuleSymbols to override this.
|
||||||
EXPECT_CALL(supplier, GetCStringSymbolData(_, _, _, _))
|
EXPECT_CALL(supplier, GetCStringSymbolData(_, _, _, _))
|
||||||
.WillRepeatedly(Return(MockSymbolSupplier::NOT_FOUND));
|
.WillRepeatedly(Return(MockSymbolSupplier::NOT_FOUND));
|
||||||
|
|
||||||
|
// Avoid GMOCK WARNING "Uninteresting mock function call - returning
|
||||||
|
// directly" for FreeSymbolData().
|
||||||
|
EXPECT_CALL(supplier, FreeSymbolData(_)).Times(AnyNumber());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the Breakpad symbol information that supplier should return for
|
// Set the Breakpad symbol information that supplier should return for
|
||||||
|
|
|
@ -61,6 +61,7 @@ using google_breakpad::test_assembler::Label;
|
||||||
using google_breakpad::test_assembler::Section;
|
using google_breakpad::test_assembler::Section;
|
||||||
using std::vector;
|
using std::vector;
|
||||||
using testing::_;
|
using testing::_;
|
||||||
|
using testing::AnyNumber;
|
||||||
using testing::Return;
|
using testing::Return;
|
||||||
using testing::SetArgumentPointee;
|
using testing::SetArgumentPointee;
|
||||||
using testing::Test;
|
using testing::Test;
|
||||||
|
@ -99,6 +100,10 @@ class StackwalkerX86Fixture {
|
||||||
// SetModuleSymbols to override this.
|
// SetModuleSymbols to override this.
|
||||||
EXPECT_CALL(supplier, GetCStringSymbolData(_, _, _, _))
|
EXPECT_CALL(supplier, GetCStringSymbolData(_, _, _, _))
|
||||||
.WillRepeatedly(Return(MockSymbolSupplier::NOT_FOUND));
|
.WillRepeatedly(Return(MockSymbolSupplier::NOT_FOUND));
|
||||||
|
|
||||||
|
// Avoid GMOCK WARNING "Uninteresting mock function call - returning
|
||||||
|
// directly" for FreeSymbolData().
|
||||||
|
EXPECT_CALL(supplier, FreeSymbolData(_)).Times(AnyNumber());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the Breakpad symbol information that supplier should return for
|
// Set the Breakpad symbol information that supplier should return for
|
||||||
|
|
Loading…
Reference in a new issue