473,399 Members | 2,774 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Use of assertions

Pls. describe it in detail with code
Jun 2 '07 #1
1 1155
JosAH
11,448 Expert 8TB
Pls. describe it in detail with code
Have a look at this Tutorial, it desribes it much better than I could do
in a few lines. It's all about a crude way of programming by contract, i.e. you
'assert' that certain conditions are true before you start your method. You can
also check the correctness of your method by 'asserting' the results afterwards.

kind regards,

Jos
Jun 2 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: P. Chalin | last post by:
If you make use of assertions (e.g. assert statements) in your code, I would like to invite you to participate in a 15 min survey on program assertions. In this survey we seek your opinion...
14
by: Angel Tsankov | last post by:
I need to make verifications in release builds. If a verification fails, an error message should be displayed and the program should be aborted. I need this solution to be portable. Then I thought...
14
by: Divick | last post by:
Hi, is it a nice idea to do assetion checks for method arguments ? I am currently redesigning a piece of code. Now the problem is that there are some assumptions for the method arguments that the...
8
by: Jefffff | last post by:
Regarding the use of assertions: According to Juval Lowy's excellent coding standards document (PDF download available at www.idesign.net), every assumption in your code should have an...
4
by: douglass_davis | last post by:
Say I would like to use assertions to make sure correct inputs are given to a procedure. But, I want to do this in testing only, not in production. I saw Debug.Assert, which is nice, but does...
10
by: Matthew Wilson | last post by:
Lately, I've been writing functions like this: def f(a, b): assert a in assert b in The point is that I'm checking the type and the values of the parameters.
58
by: jeffc226 | last post by:
This might be less of a design issue than a C++ language issue per se, but I have a problem with assertions. I mean, they work, of course. But there's something I'm uncomfortable with that's never...
0
by: Duncan Smith | last post by:
Last week, I got reports back of errors in a patch I let someone try out (release dll, but not from the build machine). Turns out it was some Debug::Assert statements firing. In umanaged code,...
3
by: Hugh Oxford | last post by:
I am told that I should use assertions in my testing. The problem is, because I test using a cut of live data, the data always changes. Has anyone come up against this or have they abandoned...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.