Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Unit testing
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Language-level unit testing support === Some programming languages directly support unit testing. Their grammar allows the direct declaration of unit tests without importing a library (whether third party or standard). Additionally, the Boolean conditions of the unit tests can be expressed in the same syntax as Boolean expressions used in non-unit test code, such as what is used for {{code| lang = java |if}} and {{code| lang = java |while}} statements. Languages with built-in unit testing support include: {{colbegin|colwidth=20em}} * [[Cobra (programming language)|Cobra]] * [[D (programming language)|D]]<ref>{{cite web|title=Unit Tests - D Programming Language|url=http://dlang.org/spec/unittest.html|website=D Programming Language|publisher=D Language Foundation|access-date=5 August 2017}}</ref> * [[Rust (programming language)|Rust]]<ref>{{cite web|url=https://doc.rust-lang.org/book/ch11-01-writing-tests.html|access-date=21 August 2023|title=How to Write Tests|author=Steve Klabnik and Carol Nichols, with contributions from the Rust Community|date=2015β2023}}</ref> {{colend}} Languages with standard unit testing framework support include: {{colbegin|colwidth=20em}} * [[Apex (programming language)|Apex]] * [[Crystal (programming language)|Crystal]]<ref>{{cite web|url=https://crystal-lang.org/api/0.23.1/Spec.html|access-date=18 September 2017|title=Crystal Spec|publisher=crystal-lang.org}}</ref> * [[Erlang (programming language)|Erlang]] * [[Go (programming language)|Go]]<ref>{{cite web|url=http://golang.org/pkg/testing/|access-date=3 December 2013|title=testing - The Go Programming Language|publisher=golang.org}}</ref> * [[Julia (programming language)|Julia]]<ref>{{cite web|url=https://docs.julialang.org/en/v1/stdlib/Test/|title=Unit Testing Β· The Julia Language|access-date=2022-06-15|publisher=docs.julialang.org}}</ref> * [[LabVIEW]] * [[MATLAB]] * [[Python (programming language)|Python]]<ref>{{cite web|url=https://docs.python.org/3/library/unittest.html|access-date=18 April 2016|title=unittest -- Unit testing framework|author=Python Documentation|date=2016}}</ref> * [[Racket (programming language)|Racket]]<ref name=Racket_Unit_Testing>{{cite web|last1=Welsh|first1=Noel|last2=Culpepper|first2=Ryan|title=RackUnit: Unit Testing|url=http://docs.racket-lang.org/rackunit/index.html|publisher=PLT Design Inc.|access-date=26 February 2019|ref=Racket_Unit_Testing}}</ref><ref name=Racket_Unit_Testing_Main_dist>{{cite web|last1=Welsh|first1=Noel|last2=Culpepper|first2=Ryan|title=RackUnit Unit Testing package part of Racket main distribution|url=https://pkgs.racket-lang.org/package/rackunit|publisher=PLT Design Inc.|access-date=26 February 2019|ref=Racket_Unit_Testing_Main_dist}}</ref> * [[Ruby (programming language)|Ruby]]<ref>{{cite web|url=http://ruby-doc.org/stdlib-2.0.0/libdoc/minitest/rdoc/MiniTest.html|title=Minitest (Ruby 2.0)|publisher=Ruby-Doc.org}}</ref> * [[Swift (programming language)|Swift]] {{colend}} Some languages do not have built-in unit-testing support but have established unit testing libraries or frameworks. These languages include: {{colbegin|colwidth=20em}} * [[ABAP]] * [[C++]] * [[C Sharp (programming language)|C#]] * [[Clojure]]<ref name=Clojure_Unit_Testing_Framework>{{cite web|last1=Sierra|first1=Stuart|title=API for clojure.test - Clojure v1.6 (stable)|url=https://clojure.github.io/clojure/clojure.test-api.html|access-date=11 February 2015|ref=Clojure_Unit_Testing_Framework}}</ref> * [[Elixir (programming language)|Elixir]] * [[Java (programming language)|Java]] * [[JavaScript]] * [[Objective-C]] * [[Perl]] * [[PHP]] * [[Windows PowerShell|PowerShell]]<ref>{{cite web|url=https://github.com/pester/Pester|access-date=28 January 2016|title=Pester Framework|website=[[GitHub]]}}</ref> * [[R (programming language)|R]] with testthat * [[Scala (programming language)|Scala]] * [[tcl]] * [[Visual Basic .NET]] * [[Xojo]] with XojoUnit {{colend}}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)