dotgnu-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [DotGNU]internallcall test


From: Rhys Weatherley
Subject: Re: [DotGNU]internallcall test
Date: Tue, 22 Apr 2003 14:36:53 +1000
User-agent: KMail/1.4.3

On Tuesday 22 April 2003 01:45 pm, Jes?s Ju?rez wrote:
> Thanks Rhys and Gopal for you're answers. Rhys, you wrote if I could be
> more specific about the internallcall that i want to test. Well, i was
> seeing the lib_thread.c and lib_string.c between other things and if I want
> to test i.e. :
>
> /*
>  * private void FinalizeThread();
> */
> void _IL_Thread_FinalizeThread(ILExecThread *thread, ILObject *_this)
> {
> }
>
> For test this I wrote code based on IL_Thread.h and lib_defs.h.
>
> Could you tell how i should declare this method on the class that inherit
> TestCase?

I'm still confused ...

TestCase is for test code written in C#, not C.  So it won't be possible to 
integrate "code based on IL_Thread.h and lib_defs.h" into the C# test suite.

I doubt that it is even possible to write a C# test case for "FinalizeThread", 
given that it only fires during object finalization and it is impossible to 
force predictable finalization of an object.  You had to pick a hard one. :-)

For an easier example, have a look at "TestStringCompare" in  
"pnetlib/tests/runtime/System/TestString.cs".  The two-argument version of 
"String.Compare" is an internalcall.  The C code is on line 439 of 
"lib_string.c".

Cheers,

Rhys.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]