I am new to Racket.
Can someone give me a simple example on how to use check expect in Racket, preferably with numbers?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The documentation is your best friend.
It’s really simple: the first parameter to
check-expectis the expression or procedure to be tested, and the second one is the expected result (hence the name). Assuming that you’ve selected an adequate language (for example:Beginning Student)The above will produce an output such as this: