Assertions وہ statements ہیں ایک ٹیسٹ میں جو یہ check کرتے ہیں کہ ایک condition سچ ہے یا نہیں — یہ verify کرتے ہوئے کہ actual result موقع سے متوقع result سے ملتا ہے۔ یہ ٹیسٹوں کا بنیاد ہیں کہ کیسے pass یا fail کا تعین کیا جائے: اگر assertion fail ہو تو ٹیسٹ fail ہو جاتا ہے۔
Assertions کیا کام کرتے ہیں
An ASSERTION checks that something is as expected:
→ "assert that the actual value EQUALS the expected value"
→ if TRUE → the assertion passes; if FALSE → the assertion FAILS → the TEST FAILS
→ Assertions are how a test VERIFIES behavior (the "check" part of a test).
