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
Assertion (software development)
(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!
=== Assertions in production environment === When a program is deployed to [[production environment|production]], assertions are typically turned off, to avoid any overhead or side effects they may have. In some cases assertions are completely absent from deployed code, such as in C/C++ assertions via macros. In other cases, such as Java, assertions are present in the deployed code, and can be turned on in the field for debugging.<ref>[http://docs.oracle.com/javase/8/docs/technotes/guides/language/assert.html Programming With Assertions], [http://docs.oracle.com/javase/8/docs/technotes/guides/language/assert.html#enable-disable Enabling and Disabling Assertions]</ref> Assertions may also be used to promise the compiler that a given edge condition is not actually reachable, thereby permitting certain [[compiler optimizations|optimizations]] that would not otherwise be possible. In this case, disabling the assertions could actually reduce performance.
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)