Merge from Cehteh

Merge commit 'pipapo'
This commit is contained in:
Fischlurch 2007-08-19 21:59:18 +02:00
commit 91d04f7019
4 changed files with 53 additions and 21 deletions

View file

@ -1,5 +1,24 @@
TESTING "test plugin example code" ./test-plugin
TEST "plugin example" <<END
TEST "C plugin example" C <<END
out: opened
out: Hallo Welt!
out: Tschuess C
out: opened
out: Hello World!
out: Bye C
out: closed
out: closed
END
TEST "C++ plugin example" C++ <<END
out: opened
out: Hallo Welt!
out: Tschuess C++
out: opened
out: Hello World!
out: Bye C++
out: closed
out: closed
END

View file

@ -21,17 +21,17 @@ void hallo(void)
void tschuess(const char* m)
{
printf("Tschues %s\n", m);
printf("Tschuess %s\n", m);
}
void hello(void)
{
printf("Hello world!\n");
printf("Hello World!\n");
}
void bye(const char* m)
{
printf("bye %s\n", m);
printf("Bye %s\n", m);
}
CINELERRA_INTERFACE_IMPLEMENT(hello, 1, german, myopen, myclose,

View file

@ -1,4 +1,4 @@
#include <string.h>
#include "lib/plugin.h"
#include "hello_interface.h"
@ -9,6 +9,9 @@ main(int argc, char** argv)
{
NOBUG_INIT;
if (argc < 2)
return -1;
cinelerra_init_plugin ();
/*
we have a plugin 'hello_1' which provides us 2 hello interfaces, one for english and one for german output,
@ -17,24 +20,31 @@ main(int argc, char** argv)
TODO("macros, doing casting and typing");
CINELERRA_INTERFACE_TYPE(hello, 1)* hello_de =
(CINELERRA_INTERFACE_TYPE(hello, 1)*) cinelerra_interface_open ("example_plugin", "german_1", sizeof(CINELERRA_INTERFACE_TYPE(hello, 1)));
if( !strcmp(argv[1],"C"))
{
if (!hello_de) CINELERRA_DIE;
CINELERRA_INTERFACE_TYPE(hello, 1)* hello_de =
(CINELERRA_INTERFACE_TYPE(hello, 1)*) cinelerra_interface_open ("example_plugin", "german_1", sizeof(CINELERRA_INTERFACE_TYPE(hello, 1)));
hello_de->hello();
if (!hello_de) CINELERRA_DIE;
hello_de->hello();
hello_de->goodbye(argv[1]);
CINELERRA_INTERFACE_TYPE(hello, 1)* hello_en =
(CINELERRA_INTERFACE_TYPE(hello, 1)*) cinelerra_interface_open ("example_plugin", "english_1", sizeof(CINELERRA_INTERFACE_TYPE(hello, 1)));
CINELERRA_INTERFACE_TYPE(hello, 1)* hello_en =
(CINELERRA_INTERFACE_TYPE(hello, 1)*) cinelerra_interface_open ("example_plugin", "english_1", sizeof(CINELERRA_INTERFACE_TYPE(hello, 1)));
if (!hello_en) CINELERRA_DIE;
if (!hello_en) CINELERRA_DIE;
hello_en->hello();
hello_en->hello();
hello_en->goodbye(argv[1]);
cinelerra_interface_close (hello_en);
cinelerra_interface_close (hello_de);
cinelerra_interface_close (hello_en);
cinelerra_interface_close (hello_de);
}
if( !strcmp(argv[1],"C++"))
{
#if 0
/*
same again for a plugin written in C++
@ -44,6 +54,7 @@ main(int argc, char** argv)
if (!hello_de) CINELERRA_DIE;
hello_de->say_hello();
hello_de->say_hello();
hello_en =
@ -55,6 +66,7 @@ main(int argc, char** argv)
cinelerra_interface_close (hello_en);
cinelerra_interface_close (hello_de);
#endif
}
return 0;
}

View file

@ -3497,7 +3497,7 @@ Portions written by Luke Blanshard are hereby released into the public domain.
&lt;!--}}}--&gt;
</pre>
</div>
<div title="TestSh" modifier="CehTeh" modified="200708181322" created="200708131509" tags="buildsys organization testsuite" changecount="11">
<div title="TestSh" modifier="CehTeh" modified="200708182045" created="200708131509" tags="buildsys organization testsuite" changecount="12">
<pre>! The Test Script
To drive the various tests, we use the script {{{tests/test.sh}}}. All tests are run under valgrind control if available unless {{{VALGRINDFLAGS=DISABLE}}} is defined.
* The SCons buildsystem will build and run the testcode when executing the target {{{scons tests}}}.
@ -3540,11 +3540,12 @@ Here is the order suggested:
|01..|Infrastructure, package consistency etc.|
|10..|Basic support library functionality|
|20..|Higher level support library services|
|40..|Backend Unit tests|
|50..|Proc Layer Unit tests|
|60..|User interface Unit tests (Gui, Scripting)|
|70..|Unit interaction tests (Backend, Proc, UI, ...)|
|80..|Functionality tests on the complete program|
|30..|Backend Unit tests|
|40..|Proc Layer Unit tests|
|50..|User interface Unit tests (Gui, Scripting)|
|60..|Unit interaction tests (Backend, Proc, UI, ...)|
|70..|Functionality tests on the complete program|
|80..|Reported bugs which can be expressed in a test case|
|90..|Optional tests, example code etc.|
</pre>