sourcehook/test/main.cpp
changeset 162 a95db73792e5
parent 157 064f77cac7ab
child 164 52d6c14b6354
     1.1 --- a/sourcehook/test/main.cpp	Thu Dec 22 21:00:54 2005 +0000
     1.2 +++ b/sourcehook/test/main.cpp	Fri Dec 23 11:58:11 2005 +0000
     1.3 @@ -2,6 +2,7 @@
     1.4  //   hello pm how are you
     1.5  //    I'm fine, what about you?
     1.6  //     not bad, just looking for mem leaks
     1.7 +//      mem leaks in my code!? never! I have to preserve binary compatibility :(
     1.8  // This is a test file
     1.9  
    1.10  #include <stdio.h>
    1.11 @@ -75,6 +76,7 @@
    1.12  DO_TEST(Bail);
    1.13  DO_TEST(Reentr);
    1.14  DO_TEST(Manual);
    1.15 +DO_TEST(Recall);
    1.16  
    1.17  int main(int argc, char *argv[])
    1.18  {
    1.19 @@ -90,3 +92,37 @@
    1.20  	cin.read(&x, 1);
    1.21  }
    1.22  
    1.23 +SourceHook::ISourceHook *Test_Factory()
    1.24 +{
    1.25 +	return new SourceHook::CSourceHookImpl();
    1.26 +}
    1.27 +
    1.28 +void Test_Delete(SourceHook::ISourceHook *shptr)
    1.29 +{
    1.30 +	delete static_cast<SourceHook::CSourceHookImpl *>(shptr);
    1.31 +}
    1.32 +
    1.33 +void Test_CompleteShutdown(SourceHook::ISourceHook *shptr)
    1.34 +{
    1.35 +	static_cast<SourceHook::CSourceHookImpl *>(shptr)->CompleteShutdown();
    1.36 +}
    1.37 +
    1.38 +bool Test_IsPluginInUse(SourceHook::ISourceHook *shptr, SourceHook::Plugin plug)
    1.39 +{
    1.40 +	return static_cast<SourceHook::CSourceHookImpl *>(shptr)->IsPluginInUse(plug);
    1.41 +}
    1.42 +
    1.43 +void Test_UnloadPlugin(SourceHook::ISourceHook *shptr, SourceHook::Plugin plug)
    1.44 +{
    1.45 +	static_cast<SourceHook::CSourceHookImpl *>(shptr)->UnloadPlugin(plug);
    1.46 +}
    1.47 +
    1.48 +void Test_PausePlugin(SourceHook::ISourceHook *shptr, SourceHook::Plugin plug)
    1.49 +{
    1.50 +	static_cast<SourceHook::CSourceHookImpl *>(shptr)->PausePlugin(plug);
    1.51 +}
    1.52 +
    1.53 +void Test_UnpausePlugin(SourceHook::ISourceHook *shptr, SourceHook::Plugin plug)
    1.54 +{
    1.55 +	static_cast<SourceHook::CSourceHookImpl *>(shptr)->UnpausePlugin(plug);
    1.56 +}
    1.57 \ No newline at end of file