From 09330f7501c61aa1e957c85d363e029b975bb344 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Sun, 18 Mar 2012 11:48:39 +0000 Subject: [PATCH] [GB.GSL] * BUG: Remove from the Test project the files that must not be present in the subversion repository. git-svn-id: svn://localhost/gambas/trunk@4560 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- gb.gsl/Test/test/.gambas/MMAIN | Bin 12972 -> 0 bytes gb.gsl/Test/test/.gambas/TEST | Bin 3644 -> 0 bytes gb.gsl/Test/test/.gambas/TESTCOMPLEX | Bin 1932 -> 0 bytes gb.gsl/Test/test/.gambas/TESTSUITE | Bin 3648 -> 0 bytes gb.gsl/Test/test/.src/MMain.module~ | 247 ----------------------- gb.gsl/Test/test/.src/Test.class~ | 199 ------------------ gb.gsl/Test/test/.src/TestComplex.class~ | 94 --------- gb.gsl/Test/test/.src/TestSuite.class~ | 141 ------------- 8 files changed, 681 deletions(-) delete mode 100644 gb.gsl/Test/test/.gambas/MMAIN delete mode 100644 gb.gsl/Test/test/.gambas/TEST delete mode 100644 gb.gsl/Test/test/.gambas/TESTCOMPLEX delete mode 100644 gb.gsl/Test/test/.gambas/TESTSUITE delete mode 100644 gb.gsl/Test/test/.src/MMain.module~ delete mode 100644 gb.gsl/Test/test/.src/Test.class~ delete mode 100644 gb.gsl/Test/test/.src/TestComplex.class~ delete mode 100644 gb.gsl/Test/test/.src/TestSuite.class~ diff --git a/gb.gsl/Test/test/.gambas/MMAIN b/gb.gsl/Test/test/.gambas/MMAIN deleted file mode 100644 index 9b05d1779862024ef5f3fb7559b76dc8fba8f4ff..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12972 zcmbta33y!9bw2ZENy)-%)l#fWG&Y-9u%=9beR4yw-2m!c7iNT zB4vIq^RNn-{xE+yjQO}GkuvYVm`}j;hxt=s%um%MQs$ds%rn*>#+@+cr)d%?^D}1P zGJRy^Vk9$RjK5;w8-ZsrKXqi}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dq>$$Lv5p{SK zAi+YAG`I!}0m88bH#wUcS3%)9zGvrsKZ`V%x3f7Xt(#G?fSWN&hc~vb?fTu)*{*rT6Z$pY&vfvPS?-c_@Z(sA-I+Mg~AmS<~LWs<)-H8h1>PTU%)9(Yb*(Y|*NS;I1(lk!ECX zv;^>I31o~C+@pauJXpf& z}^*i=K{*df%DpMt+t&vwI5j{(QF0N>aa@YHS@sLs>` z3xywHYRv$O(p@C$YHgv7_v2s%HR+iFP~B}RU}smgH0ikj(C!Nc)Ce^JjSZn`C=4Ai zSg0x7z<7Fa!V3$05Da!(43*0X^UZo90k|dXoY{=rV!mu5$n?wduPqkvpkwbMli`~Y z&tyZxTMvtHdnfsjQ|v4B4N`MgcPYt7qhx6a576Y6mQu34aABdR*k5Q*b`%GaL#0CH zmhQo>_P zKp3Q-{0t-?JkT40hczeaLENyZj$rZtZNMYXMNS@koM0d5JV`Q9HeY!lc;g}LDs0k!wZrh5Z5hCI3!9YZEd&GD#@0pH8`uD_A;?8U zxYJ4P0-Oqmo10+h8~=1EbWmSQZ-G`8TG|T(wOwc>fa|;45kB7lhHEq%xciE@HJZAL zTiCH0nNpa;kDn3^6iP!qgM?cG(H7ci5I^;|V-Ip^yN7*(`d#YxsKcQS{KF;D9{_+0 BFEaoD diff --git a/gb.gsl/Test/test/.gambas/TEST b/gb.gsl/Test/test/.gambas/TEST deleted file mode 100644 index 56d0d6bfeca6d48eb09b6a84f5bcaf3b8da30455..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3644 zcmbVO-A`Oa6hHUwLV*I8!nRmS>y_X~{jQ%45(HYRO(@brd9Z5O!eyasciY`dN~0z= zwJ*k)sEH5NXpCvpXkty&po!_fV0`n9cVGAeO4r}-+?mUimS~*axpU_H&YW}R%$bjC zZ+2c4@iNO(&$N3Y(uP{A;p3Ef0CngOd$n4F!zZs1b*S<75!BOa_}kFhLVgG8P;;%8 zwM?|+caaZ0)M*R(J*c$n>Y>cTsFbfqYYXL{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&^Dtldo}%!fsFB`nW{GInxwREEpt zVw5k*@I}o3kVfZl9^{c?IUmc>QXCbcij0=w>no?vVAe8TUI4cu6Z7RtEEAYTF%mPK zseEN2Uy9{qX|YtkP?DiaC4W&0rv+vOF_J=AXD^Y7Am>k}PAlamy>o)V$b!r*m1eMh F{{RmOPrCpB diff --git a/gb.gsl/Test/test/.gambas/TESTCOMPLEX b/gb.gsl/Test/test/.gambas/TESTCOMPLEX deleted file mode 100644 index 1452aa74d9c9c828c9ef1b396de0eb32666cc573..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1932 zcmbVNOHUI~6#ix?k0Mwi1x0FX8W#|sF)TEi7dMwBHxO^k7g z8xwV<3l=82F}jeA8>1Uzj0th&kARNfcW0)S1{34GIlX7j`*H8-^TnOZfYq=tIk3Y5 z&_QS*)ULDqXd?_-o)@WMG!mD*=(Rec?-f1jc{a~*i7s0peSk-EfS;_vhl#grK|e>@ z_JAJZ^6hawBYYrSq#9!aj8as zTU+r}1B*)1Q;mA-lvO)BD3WS>c?*7oiqcp8zSZ&f>ATJIR8wL)xIfCe-8>MY6|eQjc1lf#0wql4mUZ zZLHJcJNQq3gGN)`^gA0yFE180Y*K@sGT&QZIz=sHX4q4TAzV$!tenHB8%T}Jm(y9yI-%D1oq}_zRJ@U!#YFB_E`K|RKr%c_ zA(Ff>b<>$HVRp*6m600lQP(#;o)63w9k-k1^5Y(d%i~N6x3`9OUvP2Z2+m_^bkE%DHJcMg3p>1|%LXCIA2c diff --git a/gb.gsl/Test/test/.gambas/TESTSUITE b/gb.gsl/Test/test/.gambas/TESTSUITE deleted file mode 100644 index fa4229848123fc420f6e40f7504d4c5a080b6fac..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3648 zcma)8&2Jk;6o0epeAtO&CoZ&V3oLE}rC;iyloFMeq@<##t=c9k2U;X!FR|5pb$1P| zs6awJm45(nK)E0!E^tB|K+37&h7Sk{alqn$xRDDI;=uCz&CYB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/.src/MMain.module~ b/gb.gsl/Test/test/.src/MMain.module~ deleted file mode 100644 index 31f5cd9e7..000000000 --- a/gb.gsl/Test/test/.src/MMain.module~ +++ /dev/null @@ -1,247 +0,0 @@ -' Gambas module file - -Private ts As New TestSuite - -'------------------------------------------------------------------ -'Creates a new test object and adds it to the test suite -'------------------------------------------------------------------ -Public Function AddTest(name As String, result As Variant, expected As Variant, Optional note As String) As Test - - Dim t As New Test - - ts.AddTest(t) - t.Run(name, result, expected, note) - -End - - -'----------------------------------------------------------------- -'Test All GSL Class Methods -'----------------------------------------------------------------- -Public Sub testGslMethods() - Dim result As Variant - - AddTest("GSL.Acosh(45)", GSL.Acosh(45), ACosh(45)) - AddTest("GSL.Asinh(45)", GSL.Asinh(45), ASinh(45)) - AddTest("GSL.Atanh(0.45)", GSL.Atanh(0.45), ATanh(0.45)) - AddTest("GSL.Expm1(45)", GSL.Expm1(45), Expm(45)) - AddTest("GSL.Fcmpb(-0.3, 0.2, 0.1)", GSL.Fcmpb(-0.3, 0.2, 0.1), GSL.Fcmpb(-0.3, 0.2, 0.1)) - AddTest("GSL.Fcmpi(-0.3, 0.2, 0.1)", GSL.Fcmpi(1.3, 2.2, -1.1), 1) - result = GSL.Frexp(0.45) - AddTest("GSL.Frexp(0.45)", result), result) - AddTest("GSL.Hypot(10.27, 7.45)", GSL.Hypot(10.27, 7.45), GSL.Hypot(10.27, 7.45)) - AddTest("GSL.Hypot3(10.27, 7.45, 6.78125)", GSL.Hypot3(10.27, 7.45, 6.78125), GSL.Hypot3(10.27, 7.45, 6.78125)) - AddTest("GSL.IntPow(2.0, 8)", GSL.IntPow(2.0, 8), 256.00) - AddTest("GSL.IntPow2(8)", GSL.IntPow2(8), GSL.IntPow2(8)) - AddTest("GSL.IntPow3(8)", GSL.IntPow3(8), GSL.IntPow3(8)) - AddTest("GSL.IntPow4(8)", GSL.IntPow4(8), GSL.IntPow4(8)) - AddTest("GSL.IntPow5(8)", GSL.IntPow5(8), GSL.IntPow5(8)) - AddTest("GSL.IntPow6(8)", GSL.IntPow6(8), GSL.IntPow6(8)) - AddTest("GSL.IntPow7(8)", GSL.IntPow7(8), GSL.IntPow7(8)) - AddTest("GSL.IntPow8(8)", GSL.IntPow8(8), GSL.IntPow8(8)) - AddTest("GSL.IntPow9(8)", GSL.IntPow9(8), GSL.IntPow9(8)) - AddTest("GSL.IsEven(2)", GSL.IsEven(2), True) - AddTest("GSL.IsFinite(25)", GSL.IsFinite(25), True) - AddTest("GSL.IsInf(0)", GSL.IsInf(0), False) - AddTest("GSL.IsNan(0)", GSL.IsNan(0), False) - AddTest("GSL.IsOdd(3)", GSL.IsOdd(3), True) - AddTest("GSL.IsPos(0)", GSL.IsPos(0), True) - AddTest("GSL.Ldexp(17.63, 3)", GSL.Ldexp(17.63, 3), 141.04) - AddTest("GSL.Log1p(12.36)", GSL.Log1p(12.36), GSL.Log1p(12.36)) - AddTest("GSL.MaxFloat(2.0123, 2.01234)", GSL.MaxFloat(2.0123, 2.01234), 2.01234) - AddTest("GSL.MaxInt(1,3)", GSL.MaxInt(1, 3), 3) - AddTest("GSL.MinFLoat(0.001, 0.0011)", GSL.MinFLoat(0.001, 0.0011), 0.001) - AddTest("GSL.MinInt(1,3)", GSL.MinInt(1, 3), 1) - - End - - -'---------------------------------------------------------------- -'Test GSL Class constance -'---------------------------------------------------------------- -Public Sub testGslConstance() - ' Constance - AddTest("GSL.M_1_PI", GSL.M_1_PI, 0.31830988618379067153776752675) - AddTest("GSL.M_2_PI", GSL.M_2_PI, 0.63661977236758134307553505349) - AddTest("GSL.M_2_SQRTPI", GSL.M_2_SQRTPI, 1.12837916709551257389615890312) - AddTest("GSL.M_E", GSL.M_E, 2.71828182845904523536028747135) - AddTest("GSL.M_EULER", GSL.M_EULER, 0.57721566490153286060651209008) - AddTest("GSL.M_LN2", GSL.M_LN2, 0.69314718055994530941723212146) - AddTest("GSL.M_LN10", GSL.M_LN10, 2.30258509299404568401799145468) - AddTest("GSL.M_LNPI", GSL.M_LNPI, 1.14472988584940017414342735135) - AddTest("GSL.M_LOG10E", GSL.M_LOG10E, 0.43429448190325182765112891892) - AddTest("GSL.M_LOGE", GSL.M_LOGE, 1.44269504088896340735992468100) - AddTest("GSL.M_PI", GSL.M_PI, 3.14159265358979323846264338328) - AddTest("GSL.M_PI_2", GSL.M_PI_2, 1.57079632679489661923132169164) - AddTest("GSL.M_PI_4", GSL.M_PI_4, 0.78539816339744830961566084582) - AddTest("GSL.M_SQRT1_2", GSL.M_SQRT1_2, 0.70710678118654752440084436210) - AddTest("GSL.M_SQRT2", GSL.M_SQRT2, 1.41421356237309504880168872421) - AddTest("GSL.M_SQRT3", GSL.M_SQRT3, 1.73205080756887729352744634151) - AddTest("GSL.M_SQRTPI", GSL.M_SQRTPI, 1.77245385090551602729816748334) - -End - - - -'------------------------------------------------------------------ -'Test Complex Class Methods -'------------------------------------------------------------------ -Public Sub AddComplexTest(name As String, result As Variant, expected As Variant, Optional note As String) - - Dim t As New TestComplex - - ts.AddTest(t) - t.Run(name, result, expected, note) - -End - - -'------------------------------------------------------------------- -'Test Complex Class Methods -'------------------------------------------------------------------- -Public Sub testComplexMethods() - Dim c As New Complex - Dim z1 As New Complex - Dim z2 As New Complex - Dim z3 As Complex - - z1.Set(1, 1) - z2.Set(2, 2) - - AddComplexTest("z1.Abs()", z1.Abs(), z1.Abs(), ("z1 = " & z1.ToString())) - AddComplexTest("z1.Abs2()", z1.Abs2(), z1.Abs2(), "z1 = " & z1.ToString()) - AddComplexTest("z1.Add(z2)", z1.Add(z2), z1.Add(z2), "z1 = " & z1.ToString()) - AddComplexTest("z1.AddImag(1)", z1.AddImag(1), z1.AddImag(1), "z1 = " & z1.ToString()) - AddComplexTest("z1.AddReal(1)", z1.AddReal(1), z1.AddReal(1), "z1 = " & z1.ToString()) - AddComplexTest("z1.Arccos()", z1.Arccos(), z1.Arccos(), "z1 = " & z1.ToString()) - AddComplexTest("z1.Arccosh()", z1.Arccosh(), z1.Arccosh(), "z1 = " & z1.ToString()) - AddComplexTest("z1.ArccoshReal(5.45)", z1.ArccoshReal(5.45), z1.ArccoshReal(5.45), "z1 = " & z1.ToString()) - AddComplexTest("z1.ArccosReal(3.25)", z1.ArccosReal(3.25), z1.ArccosReal(3.25), "z1 = " & z1.ToString()) - AddComplexTest("z1.Arccot()", z1.Arccot(), z1.Arccot(), "z1 = " & z1.ToString()) - AddComplexTest("z1.Arccoth()", z1.Arccoth(), z1.Arccoth(), "z1 = " & z1.ToString()) - AddComplexTest("z1.Arccsc()", z1.Arccsc(), z1.Arccsc(), "z1 = " & z1.ToString()) - AddComplexTest("z1.Arccsch()", z1.Arccsch(), z1.Arccsch(), "z1 = " & z1.ToString()) - AddComplexTest("z1.ArccscReal(3.45)", z1.ArccscReal(3.45), z1.ArccscReal(3.45), "z1 = " & z1.ToString()) - AddComplexTest("z1.Arcsec()", z1.Arcsec(), z1.Arcsec(), "z1 = " & z1.ToString()) - AddComplexTest("z1.Arcsech()", z1.Arcsech(), z1.Arcsech(), "z1 = " & z1.ToString()) - AddComplexTest("z1.ArcsecReal(3.45)", z1.ArcsecReal(3.45), z1.ArcsecReal(3.45), "z1 = " & z1.ToString()) - AddComplexTest("z1.Arcsin()", z1.Arcsin(), z1.Arcsin(), "z1 = " & z1.ToString()) - AddComplexTest("z1.Arcsinh()", z1.Arcsinh(), z1.Arcsinh(), "z1 = " & z1.ToString()) - AddComplexTest("z1.ArcsinReal(3.45)", z1.ArcsinReal(3.45), z1.ArcsinReal(3.45), "z1 = " & z1.ToString()) - AddComplexTest("z1.Arctan()", z1.Arctan(), z1.Arctan(), "z1 = " & z1.ToString()) - AddComplexTest("z1.Arctanh()", z1.Arctanh(), z1.Arctanh(), "z1 = " & z1.ToString()) - AddComplexTest("z1.ArctanhReal(3.45)", z1.ArctanhReal(3.45), z1.ArctanhReal(3.45), "z1 = " & z1.ToString()) - AddComplexTest("z1.Arg()", z1.Arg(), z1.Arg(), "z1 = " & z1.ToString()) - AddComplexTest("z1.Copy()", z1.Copy(), z1.Copy(), "z1 = " & z1.ToString()) - AddComplexTest("z1.Cos()", z1.Cos(), z1.Cos(), "z1 = " & z1.ToString()) - AddComplexTest("z1.Cosh()", z1.Cosh(), z1.Cosh(), "z1 = " & z1.ToString()) - AddComplexTest("z1.Cot()", z1.Cot(), z1.Cot(), "z1 = " & z1.ToString()) - AddComplexTest("z1.Coth()", z1.Coth(), z1.Coth(), "z1 = " & z1.ToString()) - AddComplexTest("z1.Csc()", z1.Csc(), z1.Csc(), "z1 = " & z1.ToString()) - AddComplexTest("z1.Csch()", z1.Csch(), z1.Csch(), "z1 = " & z1.ToString()) - AddComplexTest("z1.Csch()", z1.Csch(), z1.Csch(), "z1 = [" & z1.ToString() & "] z2 = [" & z2.ToString() & "]") - AddComplexTest("z1.DivImag(3.45)", z1.DivImag(3.45), z1.DivImag(3.45), "z1 = " & z1.ToString()) - AddComplexTest("z1.DivReal(3.45)", z1.DivReal(3.45), z1.DivReal(3.45), "z1 = " & z1.ToString()) - AddComplexTest("z1.Exp()", z1.Exp(), z1.Exp(), "z1 = " & z1.ToString()) - AddComplexTest("z1.Log()", z1.Log(), z1.Log(), "z1 = " & z1.ToString()) - AddComplexTest("z1.Log10()", z1.Log10(), z1.Log10(), "z1 = " & z1.ToString()) - AddComplexTest("z1.LogAbs()", z1.LogAbs(), z1.LogAbs(), "z1 = " & z1.ToString()) - AddComplexTest("z1.Logb(z2)", z1.Logb(z2), z1.Logb(z2), "z1 = [" & z1.ToString() & "] z2 = [" & z2.ToString() & "]") - AddComplexTest("z1.Mul(z2)", z1.Mul(z2), z1.Mul(z2), "z1 = [" & z1.ToString() & "] z2 = [" & z2.ToString() & "]") - AddComplexTest("z1.MulImag(3.45)", z1.MulImag(3.45), z1.MulImag(3.45), "z1 = " & z1.ToString()) - AddComplexTest("z1.MulReal(3.45)", z1.MulReal(3.45), z1.MulReal(3.45), "z1 = " & z1.ToString()) - z1.Polar(5, 2) - AddComplexTest("z1.Polar(5,2)", z1.Copy(), z1.Copy(), "z1 = " & z1.ToString()) - AddComplexTest("z1.Pow(z2)", z1.Pow(z2), z1.Pow(z2), "z1 = [" & z1.ToString() & "] z2 = [" & z2.ToString() & "]") - AddComplexTest("z1.PowReal(2) ", z1.PowReal(2), z1.PowReal(2), "z1 = [" & z1.ToString() & "] z2 = [" & z2.ToString() & "]") - z1.Rect(1, 1) - AddComplexTest("z1.Rect(1,1)", z1.Copy(), z1.Copy(), "z1 = " & z1.ToString()) - AddComplexTest("z1.Sec()", z1.Sec(), z1.Sec(), "z1 = " & z1.ToString()) - AddComplexTest("z1.Sech()", z1.Sech(), z1.Sech(), "z1 = " & z1.ToString()) - z1.Set(2, 2) - AddComplexTest("z1.Set(2,2)", z1.Copy(), z1.Copy(), "z1 = " & z1.ToString()) - AddComplexTest("z1.Sin()", z1.Sin(), z1.Sin(), "z1 = " & z1.ToString()) - AddComplexTest("z1.Sinh()", z1.Sinh(), z1.Sinh(), "z1 = " & z1.ToString()) - AddComplexTest("z1.Sqrt()", z1.Sqrt(), z1.Sqrt(), "z1 = " & z1.ToString()) - AddComplexTest("z1.SqrtReal(3.45)", z1.SqrtReal(3.45), z1.SqrtReal(3.45), "z1 = " & z1.ToString()) - AddComplexTest("z1.Sub(z2)", z1.Sub(z2), z1.Sub(z2), "z1 = [" & z1.ToString() & "] z2 = [" & z2.ToString() & "]") - AddComplexTest("z1.SubImag(1.321)", z1.SubImag(1.321), z1.SubImag(1.321), "z1 = " & z1.ToString()) - AddComplexTest("z1.SubReal(2.125)", z1.SubReal(2.125), z1.SubReal(2.125), "z1 = " & z1.ToString()) - AddComplexTest("z1.Tan()", z1.Tan(), z1.Tan(), "z1 = " & z1.ToString()) - AddComplexTest("z1.Tanh()", z1.Tanh(), z1.Tanh(), "z1 = " & z1.ToString()) - -End - - -'------------------------------------------------------------------- -' Add Polynomial Tests -'------------------------------------------------------------------- -Public Sub AddPolynomialTest(name As String, result As Variant, expected As Variant, Optional note As String) - - Dim t As New TestPolynomial - - ts.AddTest(t) - t.Run(name, result, expected, note) - -End - - -'------------------------------------------------------------------- -' Polynomial Tests -'------------------------------------------------------------------- -Public Sub testPolynomialMethods() - Dim c As New Complex - Dim p1 As New Polynomial - Dim p2 As New Polynomial - Dim p3 As Polynomial - Dim f1 As Float - Dim f2 As Float - - p1.AddCoef(0.565) - p1.AddCoef(1.738) - p1.AddCoef(3.1465) - - AddPolynomialTest("p1.AddCoef(0.565)", p1.AddCoef(0.565), 1, p1.ToString()) - AddPolynomialTest("p1.AddCoef(1.738)", p1.AddCoef(1.738), 2, p1.ToString()) - AddPolynomialTest("p1.AddCoef(3.1465)", p1.AddCoef(3.1465), 3, p1.ToString()) - - -End Sub - - - - - - -'------------------------------------------------------------------- -'Run all tests -'------------------------------------------------------------------- -Public Sub Main() - - ' Setup test suite - ts.Name = "GSL Component" - ts.HeaderChar = "=" - ts.HeaderWidth = 40 - ts.TestHeaderChar = "-" - ts.TestHeaderWidth = 40 - ts.Note = "This test suite was developed for use\n" - "with GSL Component development. However,\n" - "it may be useful in other projects." - ts.ShowTestNotes = True - - 'Run our GSL Class Tests - testGslMethods() - testGslConstance - - 'Run Complex Class Test - testComplexMethods() - - 'Run Polynomial Class Test - testPolynomialMethods() - - - ' Finnish by showing test results - ts.ShowTests() -End - - diff --git a/gb.gsl/Test/test/.src/Test.class~ b/gb.gsl/Test/test/.src/Test.class~ deleted file mode 100644 index 8a8bab4e4..000000000 --- a/gb.gsl/Test/test/.src/Test.class~ +++ /dev/null @@ -1,199 +0,0 @@ -' Gambas class file - -' ================================================================== -' @Class: TestSuite -' @Author: R Morgan -' @Date: 03/01/2012 -' @Ver: 0.01 -' @Desc: A framework for running unit and regression tests. -' ================================================================== -Public Name As String ' Name of test, usually the function or method name. -Public msgError As String ' Error Message if any -Public hasError As Boolean = False ' True is we find an error -Public Expected As Variant ' Expected Value -Public Result As Variant ' Result value -Public ExpType As String ' Expected Datatype -Public ResType As String ' Result Datatype -Public Note As String ' Note on test - -'------------------------------------------------------------------- -'@Sub: AddError -'@Desc: This method simply adds the passed error string to the -'error message array. -'@Ver:0.01 -'@First: 03/01/2012 -'@Returns: Void -'@Param msg - A string containing the error message -'------------------------------------------------------------------- -Public Sub AddError(msg As String) - - Me.msgError = msg - Me.hasError = True - -End - - -'------------------------------------------------------------------- -'@Func; TypeError -'@Desc: This method creates an error message for a type error -'@Ver:0.01 -'@First: 03/01/2012 -'@Returns: A string containing the type error message. -'@Param msg - A string containing the type as a string. -'------------------------------------------------------------------- -Public Function TypeError(gotType As String, expectedType As String) As String - - Dim msg As String - - msg = "Type error :<<< Expected type: " & expectedType & " Got type: " & gotType & " >>>" - - Return msg - -End - - -'------------------------------------------------------------------- -'@Desc: This method simply adds the passed error string to the -'error message array. -'@Ver:0.01 -'@First: 03/01/2012 -'@Returns: Void -'@Param: msg - A string containing the error message -'------------------------------------------------------------------- -Public Function ValueError(gotValue As Variant, expectedValue As Variant) As String - - Dim msg As String - - msg = "Value error: <<< Expected: " & Str(expectedValue) & " Got: " & Str(gotValue) & " >>>" - Return msg - -End - - -'------------------------------------------------------------------- -'@Desc: This method simply adds the passed error string to the -'error message array. -'@Ver:0.01 -'@First: 03/17/2012 -'@Returns: Void -'@Params: msg - A string contianing the error message. -'------------------------------------------------------------------- -Public Function LengthError(result As Integer, expected As Integer) As String - Dim msg As String - - msg = "Length error: <<< Expected a length of " & Str(expected) & " Got: " & Str(expected) & " >>>" - Return msg - -End - - -'------------------------------------------------------------------- -'@Desc: This method simply adds the passed error string to the -'error message array. -'@Ver:0.01 -'@First: 03/01/2012 -'@Returns: Void -'@Param msg - A string containing the error message -'------------------------------------------------------------------- -Public Function getTypeString(p As Variant) As String - - Select Case TypeOf(p) - Case gb.NULL - Return "NULL" - Case gb.Boolean - Return "Boolean" - Case gb.Byte - Return "Byte" - Case gb.Class - Return "Class" - Case gb.Date - Return "Date" - Case gb.Float - Return "Float" - Case gb.Integer - Return "Integer" - Case gb.Long - Return "Long" - Case gb.Object - Return "Object" - Case gb.Pointer - Return "Pointer" - Case gb.Short - Return "Short" - Case gb.Single - Return "Single" - Case gb.String - Return "String" - Case gb.Variant - Return "Variant" - Default - Return "Unknown" - End Select - -End - - -'------------------------------------------------------------------- -'Compare two value for equality -'------------------------------------------------------------------- -Public Function IsEqual(result As Variant, expected As Variant) As Boolean - Dim err As Boolean = False - Dim i As Integer = 0 - - If TypeOf(result) <> TypeOf(expected) Then - AddError(TypeError(Me.ResType, Me.ExpType)) - Me.hasError = True - Else - If result Is Object And result Is Array And expected Is Array Then - If result.len <> expected.len Then - Me.hasError(LengthError(result.len, expected.len)) - Else - For i = 0 To result.len - 1 - If result[i] <> expected[i] Then - Me.hasError = True - Endif - Next - Endif - - Else - If result <> expected Then - AddError(ValueError(Me.Result, Me.Expected)) - Me.hasError = True - Endif - Endif - Endif - - Return Me.hasError - -End - - - -'------------------------------------------------------------------- -'@Desc: This method tests the given values for equality in both -' type and value. -'@Ver:0.01 -'@First: 03/01/2012 -'@Returns: -'@Param: func - A string containing the function that was tested. -'@Param: result - A variant value containing the actual result of -' the test. -'@Param: expected - A variant value containing the expected result - 'value for the test. -'------------------------------------------------------------------- -Public Sub Run(func As String, result As Variant, expected As Variant, Optional note As String) As Boolean - - Dim err As Boolean = False - - Me.Name = func - Me.Note = note - - Me.Expected = expected - Me.ExpType = getTypeString(expected) - - Me.Result = result - Me.ResType = Me.getTypeString(result) - - Return IsEqual(result, expected) - -End diff --git a/gb.gsl/Test/test/.src/TestComplex.class~ b/gb.gsl/Test/test/.src/TestComplex.class~ deleted file mode 100644 index 73bd62758..000000000 --- a/gb.gsl/Test/test/.src/TestComplex.class~ +++ /dev/null @@ -1,94 +0,0 @@ -' Gambas class file - -Inherits Test - -Public Function getComplexTypeString(p As Variant) As String - Dim result As String - - result = getTypeString(p) - - If result = "Unknown" Then - If result Is Complex Then - result = "Complex" - Endif - Endif - - Return result - -End - - -Public Sub IsComplexEqual(result As Variant, expected As Variant) As Boolean - - If result Is Complex Or expected Is Complex Then - 'We have objects that need special processing - If Me.IsEqual(result, expected) Then - Me.Result = result.ToString() - Me.ResType = "Complext" - Me.Expected = expected.ToString() - Me.ExpType = "Complex" - Else - Me.AddError(Me.ValueError(result.ToString, expected.ToString)) - Me.hasError = True - Endif - Else - Me.hasError = Me.IsEqual(result, expected) - Endif - - Return Me.hasError - -End - - -Public Sub Run(func As String, result As Variant, expected As Variant, Optional note As String) As Boolean - Dim err As Boolean = False - - Me.Name = func - Me.Note = note - - Me.Expected = expected - Me.ExpType = Me.getTypeString(expected) - - - Me.Result = result - Me.ResType = Me.getTypeString(result) - - If TypeOf(result) <> gb.Object And TypeOf(expected) <> gb.Object Then - ' Not an object so run parent code - If TypeOf(result) <> TypeOf(expected) Then - Me.AddError(Me.TypeError(Me.ResType, Me.ExpType)) - err = True - Else - If result <> expected Then - Me.AddError(Me.ValueError(Me.Result, Me.Expected)) - err = True - Endif - Endif - Else - 'We have objects that need special processing - If TypeOf(result) <> TypeOf(expected) Then - Me.AddError(Me.TypeError(Me.ResType, Me.ExpType)) - err = True - Else - If result Is Complex And expected Is Complex Then - If Me.IsEqual(result, expected) Then - Me.Result = result.ToString() - Me.ResType = "Complex Object" - Me.Expected = expected.ToString() - Me.ExpType = "Complex Object" - Else - Me.AddError(Me.ValueError(result.ToString, expected.ToString)) - err = True - Endif - Endif - Endif - - Endif - - Return Me.hasError - - - -End - - diff --git a/gb.gsl/Test/test/.src/TestSuite.class~ b/gb.gsl/Test/test/.src/TestSuite.class~ deleted file mode 100644 index 6f4e26cd3..000000000 --- a/gb.gsl/Test/test/.src/TestSuite.class~ +++ /dev/null @@ -1,141 +0,0 @@ -' Gambas class file - -' ================================================================== -' @Class: TestSuite -' @Author: R Morgan -' @Date: 03/01/2012 -' @Ver: 0.01 -' @Desc: A framework for running unit and regression tests. -' ================================================================== - -Public numErrors As Integer -Public msgErrors As New String[] -Private numTests As Integer -Public Tests As New Test[] -Public hasErrors As Boolean -Public HeaderChar As String = "=" -Public HeaderWidth As Integer = 40 -Public TestHeaderChar As String = "-" -Public TestHeaderWidth As Integer = 40 -Public Name As String - -Public Note As String -Public NoteHeaderChar As String = "*" -Public NoteHeaderWidth As Integer = 40 -Public ShowTestNotes As Boolean = False - - -Public Sub AddTest(t As Test) - - Tests.Add(t) - numTests += 1 - -End - - - -Public Procedure ErrorCount() As Integer - Dim i As Integer - Dim t As Test - - For i = 0 To Tests.Length - 1 - t = Tests[i] - If t.hasError Then - Me.numErrors += 1 - Me.hasErrors = True - Endif - Next - - Return Me.numErrors -End - - - - -Public Sub ShowHeader() - Dim Header As String - - Me.ErrorCount() - - Header = String$(Me.HeaderWidth, Me.HeaderChar) - Header &= "\n " & Name & " test\n" - Header &= " Date: " & Date() & "\n" - Header &= " Time: " & Time() & "\n" - - If Me.hasErrors Then - Header &= " Failure:" & Me.numErrors & " errors occurred.\n" - Else - Header &= " Success: All tests passed.\n" - Endif - - Header &= " There are " & numTests & " test in this run.\n" - Header &= String$(Me.HeaderWidth, Me.HeaderChar) - Header &= "\n\n" - - Print Header - -End - -Public Sub ShowNotes() - Dim Header As String - - If Len(Me.Note) > 0 Then - Header = String$(Me.NoteHeaderWidth, Me.NoteHeaderChar) - Header &= "\n" - Header &= Me.Note & "\n" - Header &= String$(Me.NoteHeaderWidth, Me.NoteHeaderChar) - Header &= "\n\n" - - Print Header - - Endif - -End - - - -Public Sub ShowTest(idx As Integer) - Dim t As New Test - Dim header As String - Dim cnt As Integer = idx + 1 - t = Tests[idx] - - header = String$(Me.TestHeaderWidth, Me.TestHeaderChar) - header &= "\n #" & cnt & " " & t.Name & "\n" - - If t.hasError Then - header &= " Status: <<<<< Failure >>>>> \n" - header &= " Error: " & t.msgError & "\n" - Else - header &= " Status: Passed \n" - Endif - - header &= " Expected result: " & Str(t.Expected) & "\n of type: " & t.ExpType & "\n" - header &= " Recieved result: " & Str(t.Result) & "\n of type: " & t.ResType & "\n" - - If ShowTestNotes Then - header &= " Notes: " & t.Note & "\n" - Endif - header &= String$(Me.TestHeaderWidth, Me.TestHeaderChar) - - Print header - -End - - -Public Sub ShowTests() - Dim t As Test - Dim i As Integer - - Me.ShowHeader() - Me.ShowNotes() - - i = 0 - For i = 0 To Tests.Length - 1 - ShowTest(i) - Next - -End - - -