On Mon, Nov 5, 2012 at 3:15 PM, Graeme Geldenhuys
wrote:
> On 2012-11-05 13:07, Michael Van Canneyt wrote:
>>
>> This will not detect if no exception is raised, only if the right
>> exception is raised in case one is raised.
>
>
> You are correct. An extra test is needed just before the except blo
On 2012-11-05 13:07, Michael Van Canneyt wrote:
>
> This will not detect if no exception is raised, only if the right
> exception is raised in case one is raised.
You are correct. An extra test is needed just before the except block.
As your example shows, simply calling Fail(...) if no exceptio
On Mon, 5 Nov 2012, Graeme Geldenhuys wrote:
On 2012-11-05 12:49, ik wrote:
So how do I do it ?
Create a method of the test class, and pass that to AssertException.
Alternatively, do it manually as follows:
try
si.SetSlideName('001~z~1~a~4~d~1.1.2.swf');
si.SlideTypeDB;
except
On 2012-11-05 12:49, ik wrote:
>
> So how do I do it ?
Create a method of the test class, and pass that to AssertException.
Alternatively, do it manually as follows:
try
si.SetSlideName('001~z~1~a~4~d~1.1.2.swf');
si.SlideTypeDB;
except
on E: exception do
begin
CheckEq
On Mon, 5 Nov 2012, ik wrote:
On Mon, Nov 5, 2012 at 2:45 PM, Michael Van Canneyt
wrote:
On Mon, 5 Nov 2012, ik wrote:
Hello,
I wish to test if a method has raised an exception for a value
(something that should make the test pass) or not.
For example:
function TestNum(ch : Char) : By
On Mon, Nov 5, 2012 at 2:45 PM, Michael Van Canneyt
wrote:
>
>
> On Mon, 5 Nov 2012, ik wrote:
>
>> Hello,
>>
>> I wish to test if a method has raised an exception for a value
>> (something that should make the test pass) or not.
>>
>> For example:
>>
>> function TestNum(ch : Char) : Byte;
>> begi
On Mon, 5 Nov 2012, ik wrote:
Hello,
I wish to test if a method has raised an exception for a value
(something that should make the test pass) or not.
For example:
function TestNum(ch : Char) : Byte;
begin
if UpCase(ch) in ['A'..'F', '0'..'9'] then
...
else
raise Exception.Create('I
Hello,
I wish to test if a method has raised an exception for a value
(something that should make the test pass) or not.
For example:
function TestNum(ch : Char) : Byte;
begin
if UpCase(ch) in ['A'..'F', '0'..'9'] then
...
else
raise Exception.Create('Invalid char was given.');
end;