Re: [Dev-C++] How to test methods with system calls
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
From: Eric <eri...@wo...> - 2008-10-22 16:00:59
|
GOOD QUESTION BUT THIS GROUP CAN NOT EVEN ASWER SIMPLE QUESTIONS ----- Original Message ----- From: Hiroyuki Yamada <yam...@gm...> To: <Dev...@li...> Sent: Thursday, October 23, 2008 1:35 AM Subject: [Dev-C++] How to test methods with system calls I'm testing some c++ programs having some methods with system calls, which are like write(2) and read(2). (I use googletest for the test.) Those write(2) and read(2) can fail for some reason, but it's not predicable, so I'm wondering how I can test error handling codes for errors by those system calls. Is there any way I can simulate those system call' errors without modification in source code ? How do you usually test those ? Thanks in advance, Hiroyuki *********************************************************** PLEASE READ: The contents of this Email and if any files transmitted with it are not confidential and intended for the use of the individual or entity to whom this Email is addressed. The views stated herein do not necessarily represent the view of myself been in sound mind and body & non intoxicated at the time I composed this Email. I knew what I was doing when I selected your Email address, so YOU are the correct intended recipient of this Email, you did NOT receive this email in error, GET A GRIP!!! don't procrastinate with endless excuses. You may copy, forward, disclose, print, delete it or otherwise use it or any part of it, in any form you can think of. After you have received this mail please feel free to Email the sender (me) with a personnel Email anytime, but NOT black text on white background HTML format. if you been the sender intend to send me a Email in HTML format, please add some living color to compensate the slightly wasted internet bandwidth, longer download time and wasted space of my hard drive as if I decide to save that Email (only for archive purposes), due to the fact that HTML Emails are two and half times bigger than the same Email content posted in plain text format. If you been the sender decide to send me been the receiver a attachment file larger than 200Kb in file size please give me prior courtesy to ask if I would like to receive it, as I been the receiver have a slow dial up connection speed and often other members of the household want to use the phone only when I go on Internet. *********************************************************** |