summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorjofret2007-02-14 16:40:33 +0000
committerjofret2007-02-14 16:40:33 +0000
commit5fcd2352aa1dd7a7b22fd37e9e529a8414bf30e1 (patch)
tree6338cd0169fcc49c09e928807c3a8800ba8fb88a /src/test
parent85c7a2e39d24c29a079a47e5c75e88c468756e5d (diff)
downloadscilab2c-5fcd2352aa1dd7a7b22fd37e9e529a8414bf30e1.tar.gz
scilab2c-5fcd2352aa1dd7a7b22fd37e9e529a8414bf30e1.tar.bz2
scilab2c-5fcd2352aa1dd7a7b22fd37e9e529a8414bf30e1.zip
* src/test/test*.c :
Add some FIXME in order to remember to code some tests. * src/test/testFind.c : Testing of the find function. * src/test/testIsEmpty.c : Testing of the isEmpty function. * src/misc : Create for misc includes. * src/auxiliaryFunctions/find/notFound.h : Moved * src/misc/notFound.h : Better use here. * */*/Makefile : Modify all Makefiles. Remove -pedantic. Must be crazy to use this... * src/auxiliaryFunctions/isempty : IsEmpty functions implementation. * src/auxiliaryFunctions/isempty/{sdcz}isEmptya.c : Implementation : s(float) d(double) c(floatComplex) z(doubleComplex)
Diffstat (limited to 'src/test')
-rw-r--r--src/test/Makefile17
-rw-r--r--src/test/test.c13
-rw-r--r--src/test/test.h12
-rw-r--r--src/test/testCos.c40
-rw-r--r--src/test/testCosh.c13
-rw-r--r--src/test/testExp.c13
-rw-r--r--src/test/testSin.c13
-rw-r--r--src/test/testSinh.c13
-rw-r--r--src/test/testTan.c13
-rw-r--r--src/test/testTanh.c40
10 files changed, 164 insertions, 23 deletions
diff --git a/src/test/Makefile b/src/test/Makefile
index b9e8e291..f4f1c9c9 100644
--- a/src/test/Makefile
+++ b/src/test/Makefile
@@ -5,7 +5,7 @@
## Made by Bruno JOFRET <bruno.jofret@inria.fr>
##
## Started on Thu Nov 30 16:33:40 2006 jofret
-## Last update Wed Jan 31 09:27:59 2007 jofret
+## Last update Wed Feb 14 16:59:45 2007 jofret
##
## Copyright INRIA 2006
##
@@ -14,15 +14,18 @@ NAME = alltest
RM = rm -f
CC = gcc
-INCLUDE = ../type
-LINK = ../lib
+INCLUDE = -I ../type -I ../misc
+LINK = -L ../lib
LIBS = -lm \
-lCos -lCosh \
-lSin -lSinh \
-lTan -lTanh \
- -lExp
-CFLAGS = -Werror -Wall -pedantic -ansi
-CLFLAGS = -I$(INCLUDE) -L$(LINK) $(LIBS)
+ -lExp \
+ -lFind \
+ -lIsEmpty
+
+CFLAGS = -Werror -Wall -ansi $(INCLUDE)
+CLFLAGS = $(LINK) $(LIBS)
AR = ar cru
RANLIB = ranlib
@@ -33,6 +36,8 @@ SRC = testCos.c \
testTan.c \
testTanh.c \
testExp.c \
+ testFind.c \
+ testIsEmpty.c \
test.c
HEAD = test.h
diff --git a/src/test/test.c b/src/test/test.c
index ecf6e246..4b3805a3 100644
--- a/src/test/test.c
+++ b/src/test/test.c
@@ -5,7 +5,7 @@
** Made by Bruno JOFRET <bruno.jofret@inria.fr>
**
** Started on Fri Dec 8 14:53:51 2006 jofret
-** Last update Wed Jan 31 09:27:26 2007 jofret
+** Last update Wed Feb 14 16:10:20 2007 jofret
**
** Copyright INRIA 2006
*/
@@ -22,6 +22,7 @@ int main(int argc, char** argv) {
int sinStatus, sinhStatus = 0;
int tanStatus, tanhStatus = 0;
int expStatus = 0;
+ int findStatus, isEmptyStatus = 0;
printf("-*- -> Begin test sequence <- -*-");
@@ -42,11 +43,19 @@ int main(int argc, char** argv) {
/* Test Exponential stuffs */
expStatus = testExp();
+
+ /* Test Find stuffs */
+ findStatus = testFind();
+ /* Test IsEmpty stuffs */
+ isEmptyStatus = testIsEmpty();
+
+
printf("-*- -> End test sequence <- -*-");
newline();
return (cosStatus+coshStatus+
sinStatus+sinhStatus+
tanStatus+tanhStatus+
- expStatus);
+ expStatus+
+ findStatus+isEmptyStatus);
}
diff --git a/src/test/test.h b/src/test/test.h
index 475c1ebb..b5734135 100644
--- a/src/test/test.h
+++ b/src/test/test.h
@@ -5,7 +5,7 @@
** Made by Bruno JOFRET <bruno.jofret@inria.fr>
**
** Started on Fri Dec 8 15:00:40 2006 jofret
-** Last update Wed Jan 31 09:26:21 2007 jofret
+** Last update Wed Feb 14 15:49:51 2007 jofret
**
** Copyright INRIA 2006
*/
@@ -44,3 +44,13 @@ int testTanh();
** \brief Exponential Test
*/
int testExp();
+
+/*
+** \brief Find Test
+*/
+int testFind();
+
+/*
+** \brief IsEmpty Test
+*/
+int testIsEmpty();
diff --git a/src/test/testCos.c b/src/test/testCos.c
index f4c024bd..bd7a7668 100644
--- a/src/test/testCos.c
+++ b/src/test/testCos.c
@@ -5,7 +5,7 @@
** Made by Bruno JOFRET <bruno.jofret@inria.fr>
**
** Started on Fri Dec 8 15:05:44 2006 jofret
-** Last update Mon Dec 11 10:58:24 2006 jofret
+** Last update Wed Feb 14 17:37:43 2007 jofret
**
** Copyright INRIA 2006
*/
@@ -48,9 +48,45 @@ void dcossTest() {
printf("dcoss(-PI/6) = %e\n", dcoss(-PI/6));
}
+void ccossTest() {
+ printf(">> Float Complex scalar\n");
+ /* FIXME : Implement some test here ... */
+}
+
+void zcossTest() {
+ printf(">> Double Complex scalar\n");
+ /* FIXME : Implement some test here ... */
+}
+
+void scosaTest() {
+ printf(">> Float array\n");
+ /* FIXME : Implement some test here ... */
+}
+
+void dcosaTest() {
+ printf(">> Double Array\n");
+ /* FIXME : Implement some test here ... */
+}
+
+void ccosaTest() {
+ printf(">> Float Complex Array\n");
+ /* FIXME : Implement some test here ... */
+}
+
+void zcosaTest() {
+ printf(">> Double Complex Array\n");
+ /* FIXME : Implement some test here ... */
+}
+
int testCos() {
- printf(">>>> Cosine Tests\n");
+ printf("\n>>>> Cosine Tests\n");
scossTest();
dcossTest();
+ ccossTest();
+ zcossTest();
+ scosaTest();
+ dcosaTest();
+ ccosaTest();
+ zcosaTest();
return 0;
}
diff --git a/src/test/testCosh.c b/src/test/testCosh.c
index 0efb9868..dcd9ab1d 100644
--- a/src/test/testCosh.c
+++ b/src/test/testCosh.c
@@ -5,7 +5,7 @@
** Made by Bruno JOFRET <bruno.jofret@inria.fr>
**
** Started on Fri Dec 8 15:05:44 2006 jofret
-** Last update Mon Jan 29 16:15:15 2007 jofret
+** Last update Wed Feb 14 17:36:47 2007 jofret
**
** Copyright INRIA 2006
*/
@@ -49,8 +49,17 @@ void dcoshsTest() {
}
int testCosh() {
- printf(">>>> Hyperbolic Cosine Tests\n");
+ printf("\n>>>> Hyperbolic Cosine Tests\n");
scoshsTest();
dcoshsTest();
+ /* FIXME : Implement some test here ... */
+ /*
+ ccoshsTest();
+ zcoshsTest();
+ scoshaTest();
+ dcoshaTest();
+ ccoshaTest();
+ zcoshaTest();
+ */
return 0;
}
diff --git a/src/test/testExp.c b/src/test/testExp.c
index 8f6c921b..05145832 100644
--- a/src/test/testExp.c
+++ b/src/test/testExp.c
@@ -5,7 +5,7 @@
** Made by Bruno JOFRET <bruno.jofret@inria.fr>
**
** Started on Fri Dec 8 15:05:44 2006 jofret
-** Last update Wed Jan 31 09:25:30 2007 jofret
+** Last update Wed Feb 14 17:35:58 2007 jofret
**
** Copyright INRIA 2006
*/
@@ -49,8 +49,17 @@ void dexpsTest() {
}
int testExp() {
- printf(">>>> Exponential Tests\n");
+ printf("\n>>>> Exponential Tests\n");
sexpsTest();
dexpsTest();
+ /* FIXME : Implement some test here ... */
+ /*
+ cexpsTest();
+ zexpsTest();
+ sexpaTest();
+ dexpaTest();
+ cexpaTest();
+ zexpaTest();
+ */
return 0;
}
diff --git a/src/test/testSin.c b/src/test/testSin.c
index 30a24501..0e95deeb 100644
--- a/src/test/testSin.c
+++ b/src/test/testSin.c
@@ -5,7 +5,7 @@
** Made by Bruno JOFRET <bruno.jofret@inria.fr>
**
** Started on Fri Dec 8 15:06:16 2006 jofret
-** Last update Mon Dec 11 10:59:39 2006 jofret
+** Last update Wed Feb 14 17:31:37 2007 jofret
**
** Copyright INRIA 2006
*/
@@ -48,8 +48,17 @@ void dsinsTest() {
}
int testSin() {
- printf(">>>> Sine Tests\n");
+ printf("\n>>>> Sine Tests\n");
ssinsTest();
dsinsTest();
+ /* FIXME : Implement some test here ... */
+ /*
+ csinsTest();
+ zsinsTest();
+ ssinaTest();
+ dsinaTest();
+ csinaTest();
+ zsinaTest();
+ */
return 0;
}
diff --git a/src/test/testSinh.c b/src/test/testSinh.c
index 22ac851c..24bd655b 100644
--- a/src/test/testSinh.c
+++ b/src/test/testSinh.c
@@ -5,7 +5,7 @@
** Made by Bruno JOFRET <bruno.jofret@inria.fr>
**
** Started on Fri Dec 8 15:06:16 2006 jofret
-** Last update Mon Jan 29 16:16:59 2007 jofret
+** Last update Wed Feb 14 17:26:26 2007 jofret
**
** Copyright INRIA 2006
*/
@@ -48,8 +48,17 @@ void dsinhsTest() {
}
int testSinh() {
- printf(">>>> Hyperbolic Sine Tests\n");
+ printf("\n>>>> Hyperbolic Sine Tests\n");
ssinhsTest();
dsinhsTest();
+ /* FIXME : Implement some test here ... */
+ /*
+ csinhsTest();
+ zsinhsTest();
+ ssinhaTest();
+ dsinhaTest();
+ csinhaTest();
+ zsinhaTest();
+ */
return 0;
}
diff --git a/src/test/testTan.c b/src/test/testTan.c
index 0b1f1c52..3368184d 100644
--- a/src/test/testTan.c
+++ b/src/test/testTan.c
@@ -5,7 +5,7 @@
** Made by Bruno JOFRET <bruno.jofret@inria.fr>
**
** Started on Fri Dec 8 15:05:44 2006 jofret
-** Last update Mon Jan 29 17:13:12 2007 jofret
+** Last update Wed Feb 14 17:25:09 2007 jofret
**
** Copyright INRIA 2006
*/
@@ -49,8 +49,17 @@ void dtansTest() {
}
int testTan() {
- printf(">>>> Tangeant Tests\n");
+ printf("\n>>>> Tangeant Tests\n");
stansTest();
dtansTest();
+ /* FIXME : Implement some test here ... */
+ /*
+ ctansTest();
+ ztansTest();
+ stanaTest();
+ dtanaTest();
+ ctanaTest();
+ ztanaTest();
+ */
return 0;
}
diff --git a/src/test/testTanh.c b/src/test/testTanh.c
index 77c4452e..6ed1810b 100644
--- a/src/test/testTanh.c
+++ b/src/test/testTanh.c
@@ -5,7 +5,7 @@
** Made by Bruno JOFRET <bruno.jofret@inria.fr>
**
** Started on Fri Dec 8 15:05:44 2006 jofret
-** Last update Mon Jan 29 17:14:52 2007 jofret
+** Last update Wed Feb 14 17:17:37 2007 jofret
**
** Copyright INRIA 2006
*/
@@ -48,9 +48,45 @@ void dtanhsTest() {
printf("dtanhs(-PI/6) = %e\n", dtanhs(-PI/6));
}
+void ctanhsTest() {
+ printf(">> Float Complex scalar\n");
+ /* FIXME : Implement some test here ... */
+}
+
+void ztanhsTest() {
+ printf(">> Double Complex scalar\n");
+ /* FIXME : Implement some test here ... */
+}
+
+void stanhaTest() {
+ printf(">> Float array\n");
+ /* FIXME : Implement some test here ... */
+}
+
+void dtanhaTest() {
+ printf(">> Double array\n");
+ /* FIXME : Implement some test here ... */
+}
+
+void ctanhaTest() {
+ printf(">> Float Complex array\n");
+ /* FIXME : Implement some test here ... */
+}
+
+void ztanhaTest() {
+ printf(">> Double Complex array\n");
+ /* FIXME : Implement some test here ... */
+}
+
int testTanh() {
- printf(">>>> Hyperbolic Tangeant Tests\n");
+ printf("\n>>>> Hyperbolic Tangeant Tests\n");
stanhsTest();
dtanhsTest();
+ ctanhsTest();
+ ztanhsTest();
+ stanhaTest();
+ dtanhaTest();
+ ctanhaTest();
+ ztanhaTest();
return 0;
}