Export of internal Abseil changes
-- 183ff8d9640e7c08f78a9d36113bc0109c34703b by Jorg Brown <jorg@google.com>: Internal cleanup PiperOrigin-RevId: 293667472 GitOrigin-RevId: 183ff8d9640e7c08f78a9d36113bc0109c34703b Change-Id: Ic21223ab9719b5d49b8f1eb21417e947190b056b
This commit is contained in:
parent
72382c21fe
commit
24713a7036
1 changed files with 14 additions and 0 deletions
|
@ -20,13 +20,27 @@ namespace {
|
|||
|
||||
int resize_call_count = 0;
|
||||
|
||||
// A mock string class whose only purpose is to track how many times its
|
||||
// resize() method has been called.
|
||||
struct resizable_string {
|
||||
size_t size() const { return 0; }
|
||||
char& operator[](size_t) {
|
||||
static char c = '\0';
|
||||
return c;
|
||||
}
|
||||
void resize(size_t) { resize_call_count += 1; }
|
||||
};
|
||||
|
||||
int resize_default_init_call_count = 0;
|
||||
|
||||
// A mock string class whose only purpose is to track how many times its
|
||||
// resize() and __resize_default_init() methods have been called.
|
||||
struct resize_default_init_string {
|
||||
size_t size() const { return 0; }
|
||||
char& operator[](size_t) {
|
||||
static char c = '\0';
|
||||
return c;
|
||||
}
|
||||
void resize(size_t) { resize_call_count += 1; }
|
||||
void __resize_default_init(size_t) { resize_default_init_call_count += 1; }
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue