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
6 changes: 6 additions & 0 deletions src/MyQueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,9 @@ bool MyQueue::IsEmpty() const
{
return _q.empty();
}

void MyQueue::NewFunction()
{
static int nonsense = 0;
nonsense += 1;
}
1 change: 1 addition & 0 deletions src/MyQueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ class MyQueue
void Push(int val);
void Pop();
bool IsEmpty() const;
void NewFunction();

private:
std::queue<int> _q;
Expand Down
5 changes: 5 additions & 0 deletions tests/TestMyQueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,8 @@ TEST(MyQueueTest, PushAndPopWorks) {
q.Pop();
EXPECT_TRUE(q.IsEmpty());
}

TEST(MyQueueTest, TestNonsense) {
MyQueue q;
q.NewFunction();
}