[Gambas-user] Test Module, First try
Christof Thalhofer
chrisml at deganius.de
Sun Jul 26 10:25:29 CEST 2020
Am 23.07.20 um 23:53 schrieb Brian G:
> Hi,
>
> Been busy the last few days so a long delay,
Here also.
Here 2 tests fail. I attached the TAP.
In 'CreateProgramFromCommandLineArgs()' crashes
'MMain.GenerateFilesFromArgs("{i}i=9:Print i:inc i")'
Language problem.
And this also fails (I do not understand what it does, especially the
call 'TSR.CompareStringArray(CompiledResult, ShouldBeFile) = True' is
crazy):
> Assert.Equals(TSR.CompareStringArray(CompiledResult, ShouldBeFile) = True, True, "Test a Basic App with all supported types")
As the result of
'TSR.CompareStringArray(CompiledResult, ShouldBeFile)'
is a boolean, you should test it so:
> Assert.Ok(TSR.CompareStringArray(CompiledResult, ShouldBeFile), "Test a Basic App with all supported types")
Do you agree?
Alles Gute
Christof Thalhofer
--
Dies ist keine Signatur
-------------- next part --------------
1..10
Test TbCommandLinePrograms:CreateProgramFromCommandLineArgs
ok 1 - Test For bad Component
# gbs3: Dim i as integer:Print i:inc i.0: Unbekannte Komponente: gb.inotifyt
# gbs3: Dim i as integer:Print i:inc i.0: Unbekannte Komponente: gb.inotifyt
not ok 2 - TbCommandLinePrograms:CreateProgramFromCommandLineArgs crashed with error 'gbs3: {i}i=9:Print i:inc i.0: Unbekannte Komponente: gb.inotify'
1..2
not ok 1 - TbCommandLinePrograms:CreateProgramFromCommandLineArgs
Test TbCommandLinePrograms:ExecuteACommandLineProgram
ok 1 - Check the output from the Executed command line script
1..1
ok 2 - TbCommandLinePrograms:ExecuteACommandLineProgram
Test TbCommandLinePrograms:Precompile
ok 1 - Test precompile short forms I
ok 2 - Test precompile short forms F
ok 3 - Test precompile short forms L
ok 4 - Test For Error
1..4
ok 3 - TbCommandLinePrograms:Precompile
Test TcMMainFunctions:CheckLibraryVersions
ok 1 - Veryify we can get the correct library n.n.x
ok 2 - Veryify we can get the correct library n.x.x
ok 3 - Veryify we can get the correct library n.n.n
ok 4 - Veryify we can get the correct library n.x.x
ok 5 - Veryify we can get the correct library x.x.x
ok 6 - Veryify we can get the correct library bad directory name
ok 7 - Veryify we can get the correct library Bad Lib Name
1..7
ok 4 - TcMMainFunctions:CheckLibraryVersions
Test TcMMainFunctions:CheckProcessLibrary
ok 1 - Verify that error is generated when not found
ok 2 - Test for absolute path in library name
ok 3 - Test for auto select from system library n.n.x
ok 4 - Test for auto select from User .local library n.n.n
ok 5 - Test for auto select from User .local library n.n.n
ok 6 - Test for auto select from User .local library n.n.x
ok 7 - Test for auto select from User .local library n.x.x
ok 8 - Test for auto select from User .local unknown library x.x.x
1..8
ok 5 - TcMMainFunctions:CheckProcessLibrary
Test TcMMainFunctions:Components
ok 1 - Check if 'form' is correctly set on init of components
ok 2 - Forms need gui first in components
1..2
ok 6 - TcMMainFunctions:Components
Test TcMMainFunctions:FullReadCompileCheck
# Compare size a=32, b=32
# 0001 = "Class.Testit.Defined.{" | "Class.Testit.Defined.{"
# 0002 = "...public.a.as.integer" | "...public.a.as.integer"
# 0003 = "public.sub.GetA().as.integer" | "public.sub.GetA().as.integer"
# 0004 = "...return.a" | "...return.a"
# 0005 = "end" | "end"
# 0006 = "}" | "}"
# 0007 = "Project.file.{" | "Project.file.{"
# 0008 = "#.Gambas.Project.File.3.0" | "#.Gambas.Project.File.3.0"
# 0009 = "Title=Gambas.Script" | "Title=Gambas.Script"
# 0010 = "Startup=MMain" | "Startup=MMain"
# 0011 - "Component=gb.pcre" | "Component=gb.eval"
# 0012 - "Component=gb.eval" | "Component=gb.eval.highlight"
# 0013 - "Component=gb.eval.highlight" | "Component=gb.pcre"
# 0014 = "}" | "}"
# 0015 = "'.Gambas.module.file" | "'.Gambas.module.file"
# 0016 = "Public.x.as.string.=.\"hello\"" | "Public.x.as.string.=.\"hello\""
# 0017 = "public.struct.testStruct" | "public.struct.testStruct"
# 0018 = "....H.as.string." | "....H.as.string."
# 0019 = "....g.as.integer" | "....g.as.integer"
# 0020 = "....f.as.variant" | "....f.as.variant"
# 0021 = "end.struct" | "end.struct"
# 0022 = "public.sub.WriteSomething()" | "public.sub.WriteSomething()"
# 0023 = "..print.\"Write.Something\"" | "..print.\"Write.Something\""
# 0024 = "end" | "end"
# 0025 = "public.sub.MoreFunctions().as.string" | "public.sub.MoreFunctions().as.string"
# 0026 = "print.\"More.stuff.as.string\"" | "print.\"More.stuff.as.string\""
# 0027 = "end" | "end"
# 0028 = "Public.Sub.Main()" | "Public.Sub.Main()"
# 0029 = "for.i.as.integer.=.0.to.20" | "for.i.as.integer.=.0.to.20"
# 0030 = "...print.x;;i" | "...print.x;;i"
# 0031 = "next" | "next"
# 0032 = "End" | "End"
not ok 1 - Test a Basic App with all supported types
#
# ------------- Expected -------------
# T
#
# ---------------- Got ---------------
#
# ------------------------------------
#
1..1
not ok 7 - TcMMainFunctions:FullReadCompileCheck
Test TcMMainFunctions:ValidFileRebuildCheck
ok 1 - Check if rebuild required - not needed
ok 2 - Check if rebuild required - Needed
1..2
ok 8 - TcMMainFunctions:ValidFileRebuildCheck
Test TdMServerPages:RunWebPageGeneratedProgram
ok 1 - Verify That a correct Basic webpage is generated
1..1
ok 9 - TdMServerPages:RunWebPageGeneratedProgram
Test TdMServerPages:WebPageProgramCreation
ok 1 - Compile Web Page, test for correct source code output
1..1
ok 10 - TdMServerPages:WebPageProgramCreation
# Ran 'TbCommandLinePrograms.CreateProgramFromCommandLineArgs;ExecuteACommandLineProgram;Precompile,TcMMainFunctions.CheckLibraryVersions;CheckProcessLibrary;Components;FullR
eadCompileCheck;ValidFileRebuildCheck,TdMServerPages.RunWebPageGeneratedProgram;WebPageProgramCreation'
#
# 2 tests failed:
# 2: TbCommandLinePrograms:CreateProgramFromCommandLineArgs -- TbCommandLinePrograms:CreateProgramFromCommandLineArgs crashed with error 'gbs3: {i}i=9:Print i:inc i.0: Unbekannte Komponente: gb.inotify'
# 1: TcMMainFunctions:FullReadCompileCheck -- Test a Basic App with all supported types
#
# FAILED
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20200726/4e74007d/attachment.sig>
More information about the User
mailing list