Wrox Programmer Forums
|
Need help with your homework? Need help with a homework question on any programming language? Post questions and help here, not in the language topic forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Need help with your homework? section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old March 29th, 2008, 02:09 PM
Registered User
 
Join Date: Mar 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jeptabo
Default Help

im finding difficult to answer a question on white and black box testing... example

A single element buffer can hold an integer number from the following range: -5 to 5.
If the buffer is ‘empty’, a number can be inserted to the buffer, but deletion results in an error. If the buffer is ‘full’, a number cannot be inserted (i.e. an error should be reported), but deletion will work (i.e. the number stored in the buffer will be removed).
Consider two operations on such a buffer: insert(number) and delete.
A pseudo code for delete is given below:
if status==empty then error
else { status=full;
if content<0 then write (“negative”)
else if content >0 then write (“positive”)
else write (“zero”) }
(i) Use a ‘black box’ approach to generate test cases for insert(number).

(ii) Use a ‘white box’ approach to generate test cases for delete. You are also required to draw a control graph for this operation.

Regards,
Jean

Reply With Quote









Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.