Dear language developers/documenters. Please show us quickly how to write tests in your language. The 1st example after the `hello world` should be `hello_world_test` and ever example after that should have a test to go along with it. The first think any serious developer is going to want to do with your language is set up a #TDD work flow, so put this information front and center. Additional, tests show clearly how code is to be used and the expected result far better than any man-made doc.

Follow

@yisraeldov
One might posit that actually test_hello_world. should precede hello_world. :)

@Absinthe Well the `hello world` example is usually just to show the syntax of the language, it will be hard to write tests if you don't know the syntax first. But anything more than that should be test first.

@yisraeldov Well, if you test first, you on'y need to really know the syntax of your test package... :) Since it is going to fail anyway, it might help you to get the syntax as well.

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.