Talk:Test a function: Difference between revisions

From Rosetta Code
Content added Content deleted
m (fix unsigned comment)
No edit summary
Line 5: Line 5:


:On the other hand, a test framework really doesn't need to be more than a few functions; one to run tests, one to compare results for equality, one to print a summary at the end. —[[User:Dkf|Dkf]] 23:36, 15 June 2009 (UTC)
:On the other hand, a test framework really doesn't need to be more than a few functions; one to run tests, one to compare results for equality, one to print a summary at the end. —[[User:Dkf|Dkf]] 23:36, 15 June 2009 (UTC)

:Hi Tinku, languages don't have to have ''large'' testing frameworks. The task is worded to point out languages that don't have ''any'' well known testing frameworks, and give those that do, some small chance to show what is extra needs to be done in testing a small function. --[[User:Paddy3118|Paddy3118]] 04:03, 16 June 2009 (UTC)

Revision as of 04:03, 16 June 2009

How about just write a test for the palindrome task, if your language doesn't have large testing frameworks?
Shouldn't tasks lead toward implementation rather than omitting? --Tinku99 22:52, 15 June 2009 (UTC)

I'm tempted to disagree with such a change. Having a testing framework makes it easier to test the language implementation itself; they're often among the biggest consumers of such frameworks. So, implementing a framework (which doesn't actually need to be that complex) that lets you satisfy this task means that you can have a higher-quality language implementation. View it as a hint for how to make the jump to the next level of software engineering quality. (For example, Tcl's test suite exercises virtually the entire language implementation, including a very large fraction of the failure paths, and it makes it much easier to know early that maintenance hasn't screwed things up.)
On the other hand, a test framework really doesn't need to be more than a few functions; one to run tests, one to compare results for equality, one to print a summary at the end. —Dkf 23:36, 15 June 2009 (UTC)
Hi Tinku, languages don't have to have large testing frameworks. The task is worded to point out languages that don't have any well known testing frameworks, and give those that do, some small chance to show what is extra needs to be done in testing a small function. --Paddy3118 04:03, 16 June 2009 (UTC)