Solved: 20 - Classes and Objects

This commit is contained in:
2026-08-15 17:43:30 +03:00
parent 8b82257ed6
commit 564cc1b765
3 changed files with 14 additions and 9 deletions
@@ -8,6 +8,8 @@ TEST(ClassesAndObjects, DepositAndWithdraw) {
EXPECT_TRUE(account.withdraw(30.0));
EXPECT_DOUBLE_EQ(account.balance(), 120.0);
EXPECT_FALSE(account.withdraw(1000.0));
EXPECT_DEATH(account.withdraw(-10.0), "amount > 0");
EXPECT_DEATH(account.deposit(-10.0), "amount > 0");
}
TEST(ClassesAndObjects, OwnerName) {