学习如何在 Exercism 上测试你的 Racket 练习
你可以通过 DrRacket 运行提供的测试,或者在命令行中运行。
要通过 DrRacket 运行测试,只需打开测试文件,然后点击右上角的“Run”按钮。
要从命令行运行测试,只需在练习目录中运行测试。例如,如果测试套件名为 hello-world-test.rkt,可以运行以下命令:
raco test hello-world-test.rkt
会显示以下内容:
raco test: (submod "hello-world-test.rkt" test)
2 success(es) 0 failure(s) 0 error(s) 2 test(s) run
0
2 tests passed