Working on unit tests for class world

This commit is contained in:
2021-08-03 11:25:12 -04:00
parent 91d7e1c15d
commit 202c5a24ba
13 changed files with 240 additions and 103 deletions

View File

@@ -256,6 +256,9 @@ public:
// Get the total number of bytes ever written to this buffer.
int64_t total_writes() const;
// Amount of data inside the buffer.
int64_t fill() const;
// Discard all data. Reset total read and write counts.
// Frees up as much space as possible.
void clear();
@@ -353,6 +356,9 @@ public:
// Copy the entire contents of this streambuffer into another one.
void copy_into(StreamBuffer *sb);
// Compare the contents of this streambuffer to another one.
bool contents_equal(const StreamBuffer *sb) const;
// Calculate a noncryptographic but good hash of what's in the buffer.
util::HashValue hash() const;