Unit testing: Difference between revisions

Rename Perl 6 -> Raku, alphabetize, minor clean-up
(→‎{{header|REXX}}: added the REXX computer programming language for this task.)
(Rename Perl 6 -> Raku, alphabetize, minor clean-up)
Line 57:
123 -234
-111</pre>
 
 
=={{header|Julia}}==
Line 63 ⟶ 62:
https://docs.julialang.org/en/v1/stdlib/Test/index.html.
 
=={{header|Racket}}==
 
One could say that Racket has no unit testing built into the language. The most popular unit-testing framework, [https://docs.racket-lang.org/rackunit/ rackunit], is just a library. However, the default Racket installation does include rackunit out of the box.
 
The Racket command line tool, raco, has a command <code>raco test</code>. The command will look for a submodule <code>test</code> and run it. Users can choose any testing framework they want, with rackunit being the most popular one as mentioned above. Again, <code>raco test</code> is not really built into the language either.
=={{header|Perl 6}}==
 
=={{header|Perl 6Raku}}==
(formerly Perl 6)
Perl 6 does not really have a mechanism built into the compiler to do unit testing, (It '''does''' have design-by-contract capabilities built in, but that is more for run-time, not really for unit testing.) Perl 6, and Perl in general '''does''' have unit testing built into the community. The [[wp:Test_Anything_Protocol|Test-Anything-Protocol]] was invented and developed specifically to do unit testing on the original version of Perl, is still heavily used for modern versions, and has become a major standard for unit testing in many different languages other than Perl.
 
Line 71 ⟶ 75:
 
Unit testing tools are not built in to the base compiler. Basic tools are distributed with the compiler as loadable modules. Many more complex toolkits and test harnesses are available through the [https://modules.perl6.org/ Perl 6 ecosystem]. In general, it is uncommon to include testing code in with run-time code; not unheard-of and not forbidden, but uncommon. Instead Perl modules by convention and community pressure tend to have a test suite that is automatically run when the module is installed. Again, there is no rule that a module that is released for public consumption '''must''' have a test suite, but the community tends to favour modules that have them and discourage/avoid those without.
 
=={{header|Racket}}==
 
One could say that Racket has no unit testing built into the language. The most popular unit-testing framework, [https://docs.racket-lang.org/rackunit/ rackunit], is just a library. However, the default Racket installation does include rackunit out of the box.
 
The Racket command line tool, raco, has a command <code>raco test</code>. The command will look for a submodule <code>test</code> and run it. Users can choose any testing framework they want, with rackunit being the most popular one as mentioned above. Again, <code>raco test</code> is not really built into the language either.
 
 
=={{header|REXX}}==
Line 88 ⟶ 85:
=={{header|Scala}}==
The main Scala testing frameworks ( [http://www.scalacheck.org ScalaCheck], [http://www.scalatest.org ScalaTest], and [http://www.specs2.org specs2]) provide an implementation of the common test interface and only need to be added to the classpath to work with [https://www.scala-sbt.org/ sbt].
 
=={{header|zkl}}==
zkl has built-in unit testing as shown in [[Test_a_function#zkl]].
10,327

edits