Advertisement
cepxuozab

Untitled

Jul 22nd, 2024
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.40 KB | None | 0 0
  1.  void TestResources() {
  2.         Resources resources(25);
  3.         ASSERT_EQUAL(resources.GetBrickCount(), 25);
  4.  
  5.        resources.TakeBricks(20);
  6.         ASSERT_EQUAL(resources.GetBrickCount(), 5);
  7.  
  8.         resources.TakeBricks(5);
  9.         PASSERT_EQUAL(resources.GetBrickCount(), 0);
  10.  
  11.        (resources.TakeBricks(1), out_of_range) ---- !!!!!!
  12.        ASSERT_EQUAL(resources.GetBrickCount(), 0);
  13.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement