From 11ff72181710d769d4c7383194116610c1b6eacb Mon Sep 17 00:00:00 2001
From: cornet
Date: Thu, 23 Apr 2009 09:14:00 +0000
Subject: add statisticsFunctions tests projects
---
RUN_TESTS/RUN_TESTS.vcproj | 4 +-
scilab2c.sln | 263 +++++++++++++++++++++
scilab2c_f2c.sln | 263 +++++++++++++++++++++
.../max/test_DoubleMax/testDoubleMax.vcproj | 213 +++++++++++++++++
.../max/test_FloatMax/testFloatMax.vcproj | 213 +++++++++++++++++
src/statisticsFunctions/mean/testDoubleMean.c | 8 +-
.../mean/test_DoubleMean/testDoubleMean.vcproj | 213 +++++++++++++++++
.../mean/test_FloatMean/testFloatMean.vcproj | 213 +++++++++++++++++
.../min/test_DoubleMin/testDoubleMin.vcproj | 213 +++++++++++++++++
.../min/test_FloatMin/testFloatMin.vcproj | 213 +++++++++++++++++
.../prod/test_DoubleProd/testDoubleProd.vcproj | 213 +++++++++++++++++
.../prod/test_FloatProd/testFloatProd.vcproj | 213 +++++++++++++++++
src/statisticsFunctions/statisticsFunctions.vcproj | 20 ++
src/statisticsFunctions/sum/testDoubleSum.c | 8 +-
.../sum/test_DoubleSum/testDoubleSum.vcproj | 213 +++++++++++++++++
.../sum/test_FloatSum/testFloatSum.vcproj | 213 +++++++++++++++++
.../variance/testDoubleVarianceNono.c | 20 +-
.../variance/testFloatVarianceNono.c | 20 +-
.../test_DoubleVariance/testDoubleVariance.vcproj | 213 +++++++++++++++++
.../testDoubleVarianceNono.vcproj | 213 +++++++++++++++++
.../test_FloatVariance/testFloatVariance.vcproj | 213 +++++++++++++++++
.../testFloatVarianceNono.vcproj | 213 +++++++++++++++++
22 files changed, 3558 insertions(+), 30 deletions(-)
create mode 100644 src/statisticsFunctions/max/test_DoubleMax/testDoubleMax.vcproj
create mode 100644 src/statisticsFunctions/max/test_FloatMax/testFloatMax.vcproj
create mode 100644 src/statisticsFunctions/mean/test_DoubleMean/testDoubleMean.vcproj
create mode 100644 src/statisticsFunctions/mean/test_FloatMean/testFloatMean.vcproj
create mode 100644 src/statisticsFunctions/min/test_DoubleMin/testDoubleMin.vcproj
create mode 100644 src/statisticsFunctions/min/test_FloatMin/testFloatMin.vcproj
create mode 100644 src/statisticsFunctions/prod/test_DoubleProd/testDoubleProd.vcproj
create mode 100644 src/statisticsFunctions/prod/test_FloatProd/testFloatProd.vcproj
create mode 100644 src/statisticsFunctions/sum/test_DoubleSum/testDoubleSum.vcproj
create mode 100644 src/statisticsFunctions/sum/test_FloatSum/testFloatSum.vcproj
create mode 100644 src/statisticsFunctions/variance/test_DoubleVariance/testDoubleVariance.vcproj
create mode 100644 src/statisticsFunctions/variance/test_DoubleVarianceNono/testDoubleVarianceNono.vcproj
create mode 100644 src/statisticsFunctions/variance/test_FloatVariance/testFloatVariance.vcproj
create mode 100644 src/statisticsFunctions/variance/test_FloatVarianceNono/testFloatVarianceNono.vcproj
diff --git a/RUN_TESTS/RUN_TESTS.vcproj b/RUN_TESTS/RUN_TESTS.vcproj
index ef6e3ae4..f672b950 100644
--- a/RUN_TESTS/RUN_TESTS.vcproj
+++ b/RUN_TESTS/RUN_TESTS.vcproj
@@ -24,7 +24,7 @@
>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/statisticsFunctions/max/test_FloatMax/testFloatMax.vcproj b/src/statisticsFunctions/max/test_FloatMax/testFloatMax.vcproj
new file mode 100644
index 00000000..a8b2effa
--- /dev/null
+++ b/src/statisticsFunctions/max/test_FloatMax/testFloatMax.vcproj
@@ -0,0 +1,213 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/statisticsFunctions/mean/testDoubleMean.c b/src/statisticsFunctions/mean/testDoubleMean.c
index e430c7eb..1e1b2576 100644
--- a/src/statisticsFunctions/mean/testDoubleMean.c
+++ b/src/statisticsFunctions/mean/testDoubleMean.c
@@ -319,12 +319,12 @@ static int zrowmeanaTest(void) {
}
assert(zreals(rowMeanmedIn_2_6[0]) == 0.1 / 2.0 && zimags(rowMeanmedIn_2_6[0]) == 2.1 / 2.0);
assert( ( fabs(zreals(rowMeanmedIn_2_6[1]) ) - ( 0.5 / 2.0 ) ) / fabs ( zreals(rowMeanmedIn_2_6[1]) ) < 3e-16 );
- assert(fabs(zimags(rowMeanmedIn_2_6[1]) == 1.7 / 2.0) < 1e-16);
+ assert(fabs(double(zimags(rowMeanmedIn_2_6[1]) == 1.7 / 2.0)) < 1e-16);
assert( ( fabs(zreals(rowMeanmedIn_2_6[2]) ) - ( 0.9 / 2.0 ) ) / fabs ( zreals(rowMeanmedIn_2_6[2]) ) < 3e-16 );
- assert(fabs(zimags(rowMeanmedIn_2_6[2]) == 1.3 / 2.0) < 1e-16);
- assert(fabs(zreals(rowMeanmedIn_2_6[3]) == 1.3 / 2.0) < 1e-16);
+ assert(fabs(double(zimags(rowMeanmedIn_2_6[2]) == 1.3 / 2.0)) < 1e-16);
+ assert(fabs(double(zreals(rowMeanmedIn_2_6[3]) == 1.3 / 2.0)) < 1e-16);
assert( ( fabs(zimags(rowMeanmedIn_2_6[3]) ) - ( 0.9 / 2.0 ) ) / fabs ( zimags(rowMeanmedIn_2_6[3]) ) < 3e-16 );
- assert(fabs(zreals(rowMeanmedIn_2_6[4]) == 1.7 / 2.0) < 1e-16);
+ assert(fabs(double(zreals(rowMeanmedIn_2_6[4]) == 1.7 / 2.0)) < 1e-16);
assert( ( fabs(zimags(rowMeanmedIn_2_6[4]) ) - ( 0.5 / 2.0 ) ) / fabs ( zimags(rowMeanmedIn_2_6[4]) ) < 3e-16 );
assert(zreals(rowMeanmedIn_2_6[5]) == 2.1 / 2.0 && zimags(rowMeanmedIn_2_6[5]) == 0.1 / 2.0);
diff --git a/src/statisticsFunctions/mean/test_DoubleMean/testDoubleMean.vcproj b/src/statisticsFunctions/mean/test_DoubleMean/testDoubleMean.vcproj
new file mode 100644
index 00000000..3c459c1d
--- /dev/null
+++ b/src/statisticsFunctions/mean/test_DoubleMean/testDoubleMean.vcproj
@@ -0,0 +1,213 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/statisticsFunctions/mean/test_FloatMean/testFloatMean.vcproj b/src/statisticsFunctions/mean/test_FloatMean/testFloatMean.vcproj
new file mode 100644
index 00000000..265088a7
--- /dev/null
+++ b/src/statisticsFunctions/mean/test_FloatMean/testFloatMean.vcproj
@@ -0,0 +1,213 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/statisticsFunctions/min/test_DoubleMin/testDoubleMin.vcproj b/src/statisticsFunctions/min/test_DoubleMin/testDoubleMin.vcproj
new file mode 100644
index 00000000..66f85753
--- /dev/null
+++ b/src/statisticsFunctions/min/test_DoubleMin/testDoubleMin.vcproj
@@ -0,0 +1,213 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/statisticsFunctions/min/test_FloatMin/testFloatMin.vcproj b/src/statisticsFunctions/min/test_FloatMin/testFloatMin.vcproj
new file mode 100644
index 00000000..4654d96f
--- /dev/null
+++ b/src/statisticsFunctions/min/test_FloatMin/testFloatMin.vcproj
@@ -0,0 +1,213 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/statisticsFunctions/prod/test_DoubleProd/testDoubleProd.vcproj b/src/statisticsFunctions/prod/test_DoubleProd/testDoubleProd.vcproj
new file mode 100644
index 00000000..a784deba
--- /dev/null
+++ b/src/statisticsFunctions/prod/test_DoubleProd/testDoubleProd.vcproj
@@ -0,0 +1,213 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/statisticsFunctions/prod/test_FloatProd/testFloatProd.vcproj b/src/statisticsFunctions/prod/test_FloatProd/testFloatProd.vcproj
new file mode 100644
index 00000000..16705103
--- /dev/null
+++ b/src/statisticsFunctions/prod/test_FloatProd/testFloatProd.vcproj
@@ -0,0 +1,213 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/statisticsFunctions/statisticsFunctions.vcproj b/src/statisticsFunctions/statisticsFunctions.vcproj
index 0bb30f5a..a66e1113 100644
--- a/src/statisticsFunctions/statisticsFunctions.vcproj
+++ b/src/statisticsFunctions/statisticsFunctions.vcproj
@@ -491,6 +491,26 @@
/>
+
+
+
+
+
+
+
+
diff --git a/src/statisticsFunctions/sum/testDoubleSum.c b/src/statisticsFunctions/sum/testDoubleSum.c
index e00ec0ec..c5e2af2d 100644
--- a/src/statisticsFunctions/sum/testDoubleSum.c
+++ b/src/statisticsFunctions/sum/testDoubleSum.c
@@ -319,12 +319,12 @@ static int zrowsumaTest(void) {
}
assert(zreals(rowSummedIn_2_6[0]) == 0.1 && zimags(rowSummedIn_2_6[0]) == 2.1);
assert(zreals(rowSummedIn_2_6[1]) == 0.5);
- assert(fabs(zimags(rowSummedIn_2_6[1]) == 1.7) < 1e-16);
+ assert(fabs(double(zimags(rowSummedIn_2_6[1]) == 1.7)) < 1e-16);
assert(zreals(rowSummedIn_2_6[2]) == 0.9);
- assert(fabs(zimags(rowSummedIn_2_6[2]) == 1.3) < 1e-16);
- assert(fabs(zreals(rowSummedIn_2_6[3]) == 1.3) < 1e-16);
+ assert(fabs(double(zimags(rowSummedIn_2_6[2]) == 1.3)) < 1e-16);
+ assert(fabs(double(zreals(rowSummedIn_2_6[3]) == 1.3)) < 1e-16);
assert(zimags(rowSummedIn_2_6[3]) == 0.9);
- assert(fabs(zreals(rowSummedIn_2_6[4]) == 1.7) < 1e-16);
+ assert(fabs(double(zreals(rowSummedIn_2_6[4]) == 1.7)) < 1e-16);
assert(zimags(rowSummedIn_2_6[4]) == 0.5);
assert(zreals(rowSummedIn_2_6[5]) == 2.1 && zimags(rowSummedIn_2_6[5]) == 0.1);
diff --git a/src/statisticsFunctions/sum/test_DoubleSum/testDoubleSum.vcproj b/src/statisticsFunctions/sum/test_DoubleSum/testDoubleSum.vcproj
new file mode 100644
index 00000000..f2197425
--- /dev/null
+++ b/src/statisticsFunctions/sum/test_DoubleSum/testDoubleSum.vcproj
@@ -0,0 +1,213 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/statisticsFunctions/sum/test_FloatSum/testFloatSum.vcproj b/src/statisticsFunctions/sum/test_FloatSum/testFloatSum.vcproj
new file mode 100644
index 00000000..963e40f4
--- /dev/null
+++ b/src/statisticsFunctions/sum/test_FloatSum/testFloatSum.vcproj
@@ -0,0 +1,213 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/statisticsFunctions/variance/testDoubleVarianceNono.c b/src/statisticsFunctions/variance/testDoubleVarianceNono.c
index fd82a5a2..890fb359 100644
--- a/src/statisticsFunctions/variance/testDoubleVarianceNono.c
+++ b/src/statisticsFunctions/variance/testDoubleVarianceNono.c
@@ -28,8 +28,8 @@ static int doubleVariance(void){
- outColumns= malloc((uint)5*sizeof(double));
- outRows= malloc((uint)4*sizeof(double));
+ outColumns= (double*)malloc((unsigned int)5*sizeof(double));
+ outRows= (double*)malloc((unsigned int)4*sizeof(double));
out = dvariancea(matrice,20);
drowvariancea(matrice,5,4,outRows);
@@ -101,8 +101,8 @@ static int doubleVariance(void){
double resultRows2[10]={0.0988544518240001696130 , 0.0874673050908554156058 , 0.0678199050579095519264, 0.0591380787668954188696 , 0.0175386373980947855855 ,0.0831815708684833926556 , 0.1035239817400336881370 , 0.0657802543744439444096 , 0.0667446022405332184402 , 0.0287884625084994134891};
- outColumns2= malloc((uint)7*sizeof(double));
- outRows2= malloc((uint)10*sizeof(double));
+ outColumns2= (double*)malloc((unsigned int)7*sizeof(double));
+ outRows2= (double*)malloc((unsigned int)10*sizeof(double));
@@ -150,9 +150,9 @@ static int doubleComplexVariance(void){
doubleComplex *in, *rowVariance, *colVariance;
doubleComplex out, *outRow, *outCol;
- in= malloc ((uint)6*sizeof(doubleComplex));
- outRow= malloc ((uint)3*sizeof(doubleComplex));
- outCol= malloc ((uint)2*sizeof(doubleComplex));
+ in= (doubleComplex*)malloc ((unsigned int)6*sizeof(doubleComplex));
+ outRow= (doubleComplex*)malloc ((unsigned int)3*sizeof(doubleComplex));
+ outCol= (doubleComplex*)malloc ((unsigned int)2*sizeof(doubleComplex));
in=DoubleComplexMatrix(inR,inI,6);
rowVariance=DoubleComplexMatrix(rowVarianceR,rowVarianceI,3);
@@ -291,9 +291,9 @@ static int doubleComplexVariance(void){
doubleComplex *in, *rowVariance, *colVariance;
doubleComplex out, *outRow, *outCol;
- in= malloc ((uint)70*sizeof(doubleComplex));
- outRow= malloc ((uint)7*sizeof(doubleComplex));
- outCol= malloc ((uint)10*sizeof(doubleComplex));
+ in= (doubleComplex*)malloc ((unsigned int)70*sizeof(doubleComplex));
+ outRow= (doubleComplex*)malloc ((unsigned int)7*sizeof(doubleComplex));
+ outCol= (doubleComplex*)malloc ((unsigned int)10*sizeof(doubleComplex));
in=DoubleComplexMatrix(inR,inI,70);
rowVariance=DoubleComplexMatrix(rowVarianceR,rowVarianceI,7);
diff --git a/src/statisticsFunctions/variance/testFloatVarianceNono.c b/src/statisticsFunctions/variance/testFloatVarianceNono.c
index 9880f923..bb01a02e 100644
--- a/src/statisticsFunctions/variance/testFloatVarianceNono.c
+++ b/src/statisticsFunctions/variance/testFloatVarianceNono.c
@@ -28,8 +28,8 @@ static int floatVariance(void){
- outColumns= malloc((uint)5*sizeof(float));
- outRows= malloc((uint)4*sizeof(float));
+ outColumns= (float*)malloc((unsigned int)5*sizeof(float));
+ outRows= (float*)malloc((unsigned int)4*sizeof(float));
out = svariancea(matrice,20);
srowvariancea(matrice,5,4,outRows);
@@ -100,8 +100,8 @@ static int floatVariance(void){
float resultRows2[10]={0.0988544518240001696130f , 0.0874673050908554156058f , 0.0678199050579095519264f, 0.0591380787668954188696f , 0.0175386373980947855855f ,0.0831815708684833926556f , 0.1035239817400336881370f, 0.0657802543744439444096f , 0.0667446022405332184402f , 0.0287884625084994134891f};
- outColumns2= malloc((uint)7*sizeof(float));
- outRows2= malloc((uint)10*sizeof(float));
+ outColumns2= (float*)malloc((unsigned int)7*sizeof(float));
+ outRows2= (float*)malloc((unsigned int)10*sizeof(float));
@@ -150,9 +150,9 @@ static int floatComplexVariance(void){
floatComplex *in, *rowVariance, *colVariance;
floatComplex out, *outRow, *outCol;
- in= malloc ((uint)6*sizeof(floatComplex));
- outRow= malloc ((uint)3*sizeof(floatComplex));
- outCol= malloc ((uint)2*sizeof(floatComplex));
+ in= (floatComplex*)malloc ((unsigned int)6*sizeof(floatComplex));
+ outRow= (floatComplex*)malloc ((unsigned int)3*sizeof(floatComplex));
+ outCol= (floatComplex*)malloc ((unsigned int)2*sizeof(floatComplex));
in=FloatComplexMatrix(inR,inI,6);
rowVariance=FloatComplexMatrix(rowVarianceR,rowVarianceI,3);
@@ -292,9 +292,9 @@ static int floatComplexVariance(void){
floatComplex *in, *rowVariance, *colVariance;
floatComplex out, *outRow, *outCol;
- in= malloc ((uint)70*sizeof(floatComplex));
- outRow= malloc ((uint)7*sizeof(floatComplex));
- outCol= malloc ((uint)10*sizeof(floatComplex));
+ in= (floatComplex*)malloc ((unsigned int)70*sizeof(floatComplex));
+ outRow= (floatComplex*)malloc ((unsigned int)7*sizeof(floatComplex));
+ outCol= (floatComplex*)malloc ((unsigned int)10*sizeof(floatComplex));
in=FloatComplexMatrix(inR,inI,70);
rowVariance=FloatComplexMatrix(rowVarianceR,rowVarianceI,7);
diff --git a/src/statisticsFunctions/variance/test_DoubleVariance/testDoubleVariance.vcproj b/src/statisticsFunctions/variance/test_DoubleVariance/testDoubleVariance.vcproj
new file mode 100644
index 00000000..66ade599
--- /dev/null
+++ b/src/statisticsFunctions/variance/test_DoubleVariance/testDoubleVariance.vcproj
@@ -0,0 +1,213 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/statisticsFunctions/variance/test_DoubleVarianceNono/testDoubleVarianceNono.vcproj b/src/statisticsFunctions/variance/test_DoubleVarianceNono/testDoubleVarianceNono.vcproj
new file mode 100644
index 00000000..d78b75f7
--- /dev/null
+++ b/src/statisticsFunctions/variance/test_DoubleVarianceNono/testDoubleVarianceNono.vcproj
@@ -0,0 +1,213 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/statisticsFunctions/variance/test_FloatVariance/testFloatVariance.vcproj b/src/statisticsFunctions/variance/test_FloatVariance/testFloatVariance.vcproj
new file mode 100644
index 00000000..be536983
--- /dev/null
+++ b/src/statisticsFunctions/variance/test_FloatVariance/testFloatVariance.vcproj
@@ -0,0 +1,213 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/statisticsFunctions/variance/test_FloatVarianceNono/testFloatVarianceNono.vcproj b/src/statisticsFunctions/variance/test_FloatVarianceNono/testFloatVarianceNono.vcproj
new file mode 100644
index 00000000..23670c69
--- /dev/null
+++ b/src/statisticsFunctions/variance/test_FloatVarianceNono/testFloatVarianceNono.vcproj
@@ -0,0 +1,213 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--
cgit