This change allows compiling the google-breakpad code using a global ::string class instead of std::string. For more details take a look at common/using_std_string.h
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@974 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
93cebf538e
commit
6de969a304
103 changed files with 521 additions and 385 deletions
|
@ -40,6 +40,7 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "common/using_std_string.h"
|
||||
#include "google_breakpad/common/breakpad_types.h"
|
||||
#include "google_breakpad/processor/code_module.h"
|
||||
#include "google_breakpad/processor/code_modules.h"
|
||||
|
@ -54,7 +55,7 @@ class MockMemoryRegion: public google_breakpad::MemoryRegion {
|
|||
// Set this region's address and contents. If we have placed an
|
||||
// instance of this class in a test fixture class, individual tests
|
||||
// can use this to provide the region's contents.
|
||||
void Init(u_int64_t base_address, const std::string &contents) {
|
||||
void Init(u_int64_t base_address, const string &contents) {
|
||||
base_address_ = base_address;
|
||||
contents_ = contents;
|
||||
}
|
||||
|
@ -93,22 +94,22 @@ class MockMemoryRegion: public google_breakpad::MemoryRegion {
|
|||
}
|
||||
|
||||
u_int64_t base_address_;
|
||||
std::string contents_;
|
||||
string contents_;
|
||||
};
|
||||
|
||||
class MockCodeModule: public google_breakpad::CodeModule {
|
||||
public:
|
||||
MockCodeModule(u_int64_t base_address, u_int64_t size,
|
||||
const std::string &code_file, const std::string &version)
|
||||
const string &code_file, const string &version)
|
||||
: base_address_(base_address), size_(size), code_file_(code_file) { }
|
||||
|
||||
u_int64_t base_address() const { return base_address_; }
|
||||
u_int64_t size() const { return size_; }
|
||||
std::string code_file() const { return code_file_; }
|
||||
std::string code_identifier() const { return code_file_; }
|
||||
std::string debug_file() const { return code_file_; }
|
||||
std::string debug_identifier() const { return code_file_; }
|
||||
std::string version() const { return version_; }
|
||||
string code_file() const { return code_file_; }
|
||||
string code_identifier() const { return code_file_; }
|
||||
string debug_file() const { return code_file_; }
|
||||
string debug_identifier() const { return code_file_; }
|
||||
string version() const { return version_; }
|
||||
const google_breakpad::CodeModule *Copy() const {
|
||||
abort(); // Tests won't use this.
|
||||
}
|
||||
|
@ -116,8 +117,8 @@ class MockCodeModule: public google_breakpad::CodeModule {
|
|||
private:
|
||||
u_int64_t base_address_;
|
||||
u_int64_t size_;
|
||||
std::string code_file_;
|
||||
std::string version_;
|
||||
string code_file_;
|
||||
string version_;
|
||||
};
|
||||
|
||||
class MockCodeModules: public google_breakpad::CodeModules {
|
||||
|
@ -165,14 +166,14 @@ class MockSymbolSupplier: public google_breakpad::SymbolSupplier {
|
|||
typedef google_breakpad::SystemInfo SystemInfo;
|
||||
MOCK_METHOD3(GetSymbolFile, SymbolResult(const CodeModule *module,
|
||||
const SystemInfo *system_info,
|
||||
std::string *symbol_file));
|
||||
string *symbol_file));
|
||||
MOCK_METHOD4(GetSymbolFile, SymbolResult(const CodeModule *module,
|
||||
const SystemInfo *system_info,
|
||||
std::string *symbol_file,
|
||||
std::string *symbol_data));
|
||||
string *symbol_file,
|
||||
string *symbol_data));
|
||||
MOCK_METHOD4(GetCStringSymbolData, SymbolResult(const CodeModule *module,
|
||||
const SystemInfo *system_info,
|
||||
std::string *symbol_file,
|
||||
string *symbol_file,
|
||||
char **symbol_data));
|
||||
MOCK_METHOD1(FreeSymbolData, void(const CodeModule *module));
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue