another function that contains one or more sample calls to the function being tested
Tags
#python #sicp
Question
Tests typically take the form of [...].
Answer
?
Tags
#python #sicp
Question
Tests typically take the form of [...].
Answer
another function that contains one or more sample calls to the function being tested
If you want to change selection, open original toplevel document below and click on "Move attachment"
Parent (intermediate) annotation
Open it Tests
typically take the form of another function that contains one or more sample
calls to the function being tested. The returned value is then verified against
an expected result. Unlike most functions, which are meant to be general, tests
involve selecting and validating calls with specific argumen
Original toplevel document
1.5 Control of verifying that the function's behavior
matches expectations. Our language of functions is now sufficiently complex
that we need to start testing our implementations.
A test is a mechanism for systematically performing this verification. <span>Tests
typically take the form of another function that contains one or more sample
calls to the function being tested. The returned value is then verified against
an expected result. Unlike most functions, which are meant to be general, tests
involve selecting and validating calls with specific argument values. Tests
also serve as documentation: they demonstrate how to call a function and what
argument values are appropriate.
Assertions. Programmers use assert statements to verify expectations,
such as the output of a function being tested. An assert statement has an
expression in a boolean context,
Summary
status
not learned
measured difficulty
37% [default]
last interval [days]
repetition number in this series
0
memorised on
scheduled repetition
scheduled repetition interval
last repetition or drill
Details
No repetitions
Discussion
Do you want to join discussion? Click here to log in or create user.