Merge branch 'master' of gitlab.com:gambas/gambas
This commit is contained in:
commit
9121eb3a26
3 changed files with 35 additions and 34 deletions
|
@ -58,13 +58,12 @@ End Struct
|
||||||
|
|
||||||
'Private arr As New Integer[2, 2]
|
'Private arr As New Integer[2, 2]
|
||||||
|
|
||||||
|
Private sTest As String '
|
||||||
Private sTest As String '
|
|
||||||
'
|
'
|
||||||
Private bReadOK As Boolean
|
Private bReadOK As Boolean
|
||||||
Private bWriteOK As Boolean
|
Private bWriteOK As Boolean
|
||||||
Private hWatchFile As File
|
Private hWatchFile As File
|
||||||
'Private bZeroExpected As Boolean
|
'Private bZeroExpected As Boolean
|
||||||
|
|
||||||
Private hStillHere1 As New MyPoint
|
Private hStillHere1 As New MyPoint
|
||||||
|
|
||||||
|
@ -1020,18 +1019,18 @@ Fast Public Function FastTests() As Integer
|
||||||
' Assert.Fail("Format Pi")
|
' Assert.Fail("Format Pi")
|
||||||
' Endif
|
' Endif
|
||||||
|
|
||||||
Test.Note("ValPtr")
|
Test.Note("VarPtr")
|
||||||
bTest = True
|
bTest = True
|
||||||
pp = VarPtr(bTest)
|
pp = VarPtr(bTest)
|
||||||
If Boolean@(pp) <> bTest Or Boolean@(pp) = False Then
|
If Boolean@(pp) <> bTest Or Boolean@(pp) = False Then
|
||||||
Assert.Fail("ValPtr")
|
Assert.Fail("VarPtr")
|
||||||
Endif
|
Endif
|
||||||
|
|
||||||
Test.Note("ValPtr2")
|
Test.Note("VarPtr2")
|
||||||
bTest = False
|
bTest = False
|
||||||
pp = VarPtr(bTest)
|
pp = VarPtr(bTest)
|
||||||
If Boolean@(pp) <> bTest Or Boolean@(pp) = True Then
|
If Boolean@(pp) <> bTest Or Boolean@(pp) = True Then
|
||||||
Assert.Fail("ValPtr2")
|
Assert.Fail("VarPtr2")
|
||||||
Endif
|
Endif
|
||||||
|
|
||||||
Assert.Equals(Val(Format$(Exp(20), "#########.#####")), 485165195.40979, "Val(Format$(Exp(20)")
|
Assert.Equals(Val(Format$(Exp(20), "#########.#####")), 485165195.40979, "Val(Format$(Exp(20)")
|
||||||
|
@ -2508,8 +2507,6 @@ Pass:
|
||||||
Endif
|
Endif
|
||||||
Endif
|
Endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
bWriteOK = False
|
bWriteOK = False
|
||||||
hWatchFile = Open "/dev/full" For Write Watch
|
hWatchFile = Open "/dev/full" For Write Watch
|
||||||
|
|
||||||
|
@ -2609,8 +2606,25 @@ Pass:
|
||||||
|
|
||||||
End
|
End
|
||||||
|
|
||||||
|
Public Sub TVal()
|
||||||
|
|
||||||
|
Dim d As Date
|
||||||
|
Dim s As String
|
||||||
|
|
||||||
|
' ------------------------------------------------- Date Standard
|
||||||
|
d = Date(Year(Now), Month(Now), Day(Now), Hour(Now), Minute(Now), Second(Now))
|
||||||
|
s = Format(d, gb.Standard)
|
||||||
|
Assert.Equals(Val(s), d, "Val Date Standard")
|
||||||
|
|
||||||
|
s = Str(3.14)
|
||||||
|
Assert.Equals(Val(s), 3.14, "Str-Val")
|
||||||
|
Assert.Equals(Val("-25"), -25, "Val -25")
|
||||||
|
Assert.Equals(Val("&H123abc"), 1194684, "Val string representing hex number")
|
||||||
|
Assert.Ok(Val("True"), " Val \"True\"")
|
||||||
|
Assert.NotOk(Val("False"), " Val \"False\"")
|
||||||
|
Assert.Null(Val("Gambas"), "Val \"Gambas\" is Null")
|
||||||
|
|
||||||
|
End
|
||||||
|
|
||||||
Fast Public Function _TestAndIf() As Integer
|
Fast Public Function _TestAndIf() As Integer
|
||||||
|
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
' Gambas test file
|
|
||||||
|
|
||||||
Public Sub ValDateStandard()
|
|
||||||
|
|
||||||
Dim d As Date
|
|
||||||
Dim s As String
|
|
||||||
|
|
||||||
d = Now
|
|
||||||
|
|
||||||
s = Format(d, gb.Standard)
|
|
||||||
Assert.Equals(Val(s), d, "Val Date Standard")
|
|
||||||
|
|
||||||
End
|
|
|
@ -1,15 +1,15 @@
|
||||||
[TestSuites]
|
[TestSuites]
|
||||||
Count=3
|
Count=3
|
||||||
TestWith=0
|
TestWith=0
|
||||||
Default="TVal.ValDateStandard"
|
Default="GambasSelftests.FastTests;TVal"
|
||||||
|
|
||||||
[TestSuites/1]
|
[TestSuites/1]
|
||||||
Name="Fast"
|
Name="Fast"
|
||||||
Tests="GambasSelftests.FastTests,TVal.ValDateGeneral"
|
Tests="GambasSelftests.FastTests;TVal,TVal"
|
||||||
|
|
||||||
[TestSuites/2]
|
[TestSuites/2]
|
||||||
Name="Full"
|
Name="Full"
|
||||||
Tests="FileReadWrite.FileReadWrite;ReadUrandom;ReadZero,GambasSelftests.FastTests,SlowThousandsProcs.FewThousandProcesses,TVal.ValDateGeneral,Timers.Timers"
|
Tests="FileReadWrite.FileReadWrite;ReadUrandom;ReadZero,GambasSelftests.FastTests;TVal,SlowThousandsProcs.FewThousandProcesses,TVal,Timers.Timers"
|
||||||
|
|
||||||
[TestSuites/3]
|
[TestSuites/3]
|
||||||
Name="Slow tests"
|
Name="Slow tests"
|
||||||
|
|
Loading…
Reference in a new issue