From ea0b01199f2f4bbafcc291f0a26f81924b11485c Mon Sep 17 00:00:00 2001 From: Christian Thaeter Date: Sat, 18 Aug 2007 22:46:27 +0200 Subject: [PATCH 1/2] forgot a slot for bug tests --- wiki/index.html | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/wiki/index.html b/wiki/index.html index e77f90799..7a5c333ce 100755 --- a/wiki/index.html +++ b/wiki/index.html @@ -3494,7 +3494,7 @@ Portions written by Luke Blanshard are hereby released into the public domain. <!--}}}--> -
+
! 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}}}.
@@ -3537,11 +3537,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.|
 
 
From 27c3451aa189c8512a071c4f08211f4bc4c7064a Mon Sep 17 00:00:00 2001 From: Christian Thaeter Date: Sun, 19 Aug 2007 05:53:43 +0200 Subject: [PATCH 2/2] plugin test update, prepared for C++ --- tests/20plugin.tests | 21 ++++++++++++++++++++- tests/plugin/example_plugin.c | 6 +++--- tests/plugin/plugin_main.c | 34 +++++++++++++++++++++++----------- 3 files changed, 46 insertions(+), 15 deletions(-) diff --git a/tests/20plugin.tests b/tests/20plugin.tests index 51ea85370..6e8cd96de 100644 --- a/tests/20plugin.tests +++ b/tests/20plugin.tests @@ -1,5 +1,24 @@ TESTING "test plugin example code" ./test-plugin -TEST "plugin example" < #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; }