Add unit tests for the scheduler

This commit is contained in:
2021-07-30 13:57:03 -04:00
parent ec4d5fc3da
commit 91d7e1c15d
2 changed files with 61 additions and 0 deletions

View File

@@ -24,6 +24,8 @@ public:
}
bool operator < (const SchedEntry &other) const;
std::string debug_string() const;
};
class Schedule {
@@ -32,7 +34,9 @@ private:
public:
void add(int64_t clk, int64_t thid, int64_t plid);
bool ready(int64_t clk) const;
bool empty() const { return schedule_.empty(); }
SchedEntry pop();
std::string debug_string();
void serialize(StreamBuffer *sb);
void deserialize(StreamBuffer *sb);