diff --git a/src/MyQueue.cpp b/src/MyQueue.cpp index ad118e1..deae86e 100644 --- a/src/MyQueue.cpp +++ b/src/MyQueue.cpp @@ -17,3 +17,9 @@ bool MyQueue::IsEmpty() const { return _q.empty(); } + +void MyQueue::NewFunction() +{ + static int nonsense = 0; + nonsense += 1; +} diff --git a/src/MyQueue.h b/src/MyQueue.h index 847a6a8..99f066d 100644 --- a/src/MyQueue.h +++ b/src/MyQueue.h @@ -7,6 +7,7 @@ class MyQueue void Push(int val); void Pop(); bool IsEmpty() const; + void NewFunction(); private: std::queue _q; diff --git a/tests/TestMyQueue.cpp b/tests/TestMyQueue.cpp index 3549507..6c6fbbc 100644 --- a/tests/TestMyQueue.cpp +++ b/tests/TestMyQueue.cpp @@ -14,3 +14,8 @@ TEST(MyQueueTest, PushAndPopWorks) { q.Pop(); EXPECT_TRUE(q.IsEmpty()); } + +TEST(MyQueueTest, TestNonsense) { + MyQueue q; + q.NewFunction(); +}