Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/MyQueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,19 @@ bool MyQueue::IsEmpty() const
{
return _q.empty();
}

void MyQueue::NewFunction1()
{
// Complex demo function to show-off that we break code coverage with this change.
if (IsEmpty())
{
static int nonsense = 0;
nonsense += 1;
}
}

void MyQueue::NewFunction2()
{
// Complex demo function to show-off that we break code coverage with this change.
NewFunction1();
}
2 changes: 2 additions & 0 deletions src/MyQueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ class MyQueue
void Push(int val);
void Pop();
bool IsEmpty() const;
void NewFunction1();
void NewFunction2();

private:
std::queue<int> _q;
Expand Down
Loading