Skip to content

Commit

Permalink
Merge branch 'release/20240604-6.9'
Browse files Browse the repository at this point in the history
  • Loading branch information
ktekinay committed Jun 4, 2024
2 parents 97b9c49 + 9873bc4 commit fcf29ee
Show file tree
Hide file tree
Showing 24 changed files with 2,856 additions and 141 deletions.
22 changes: 12 additions & 10 deletions Console Project/App.xojo_code
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Inherits ConsoleApplication

For Each tr As TestResult In tg.Results
Var useIndent As String = If(tr.Result = tr.Failed, kFailIndent, kIndent)
Var outLine As String = useIndent + tr.TestName + ": " + tr.Result + " (" + Format(tr.Duration, "#,###.0000000") + "s)"
Var outLine As String = useIndent + tr.TestName + ": " + tr.Result + " (" + tr.Duration.ToString("#,##0.0000000") + "s)"
output.WriteLine(outLine)
#If DebugBuild
debugOutput = debugOutput + outLine + EndOfLine
Expand Down Expand Up @@ -147,17 +147,19 @@ Inherits ConsoleApplication

Var allTestCount As Integer = controller.AllTestCount
Var runTestCount As Integer = controller.RunTestCount
Var passedPercent As Double = controller.PassedCount / runTestCount
Var failedPercent As Double = controller.FailedCount / runTestCount

WriteLine(output, "Start: " + now.ToString(DateTime.FormatStyles.Short, DateTime.FormatStyles.Short))
WriteLine(output, "Duration: " + Format(controller.Duration, "#,###.0000000") + "s")
WriteLine(output, "Groups: " + Format(controller.RunGroupCount, "#,0"))
WriteLine(output, "Total: " + Str(runTestCount) + If(allTestCount <> runTestCount, " of " + Str(allTestCount), "") + " tests were run")
WriteLine(output, "Passed: " + Str(controller.PassedCount) + _
If(runTestCount = 0, "", " (" + Format((controller.PassedCount / runTestCount) * 100, "##.00") + "%)"))
WriteLine(output, "Failed: " + Str(controller.FailedCount) + _
If(runTestCount = 0, "", " (" + Format((controller.FailedCount / runTestCount) * 100, "##.00") + "%)"))
WriteLine(output, "Skipped: " + Str(controller.SkippedCount))
WriteLine(output, "Not Implemented: " + Str(controller.NotImplementedCount))
WriteLine(output, "Duration: " + controller.Duration.ToString("#,##0.0000000") + "s")
WriteLine(output, "Groups: " + controller.RunGroupCount.ToString("#,##0"))
WriteLine(output, "Total: " + Str(runTestCount) + If(allTestCount <> runTestCount, " of " + allTestCount.ToString, "") + " tests were run")
WriteLine(output, "Passed: " + controller.PassedCount.ToString + _
If(runTestCount = 0, "", " (" + passedPercent.ToString("#,##0.00%") + ")"))
WriteLine(output, "Failed: " + controller.FailedCount.ToString + _
If(runTestCount = 0, "", " (" + failedPercent.ToString("#,##0.00%") + ")"))
WriteLine(output, "Skipped: " + controller.SkippedCount.ToString)
WriteLine(output, "Not Implemented: " + controller.NotImplementedCount.ToString)

End Sub
#tag EndMethod
Expand Down
7 changes: 4 additions & 3 deletions Console Project/XojoUnitConsole.xojo_project
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Type=Console
RBProjectVersion=2022.041
RBProjectVersion=2024.011
MinIDEVersion=20070100
OrigIDEVersion=00000000
Class=App;App.xojo_code;&h000000003B77B45F;&h0000000000000000;false
Expand All @@ -26,7 +26,7 @@ Class=XojoUnitTestFailedException;../Shared Resources/XojoUnit/TestFramework/Xoj
Class=ObjectSpyTester;../Shared Resources/XojoUnit/Tests/ObjectSpyTester.xojo_code;&h0000000002FCEFFF;&h0000000044C729E7;false
Class=ObjectSpy;../Shared Resources/XojoUnit/TestFramework/ObjectSpy.xojo_code;&h000000001D641FFF;&h000000003E1A9B41;false
MajorVersion=6
MinorVersion=8
MinorVersion=9
SubVersion=0
NonRelease=0
Release=3
Expand Down Expand Up @@ -56,9 +56,10 @@ UseGDIPlus=False
UseBuildsFolder=True
CopyRedistNextToWindowsEXE=False
IncludePDB=False
WinUIFramework=False
IsWebProject=False
LinuxBuildArchitecture=1
MacBuildArchitecture=1
MacBuildArchitecture=4
WindowsBuildArchitecture=1
OptimizationLevel=0
WindowsVersions={35138b9a-5d96-4fbd-8e2d-a2440225f93a}|{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}|{1f676c76-80e1-4239-95bb-83d0f6d0da78}|{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Type=Desktop
RBProjectVersion=2022.041
MinIDEVersion=20070100
RBProjectVersion=2024.011
MinIDEVersion=20210300
OrigIDEVersion=00000000
Class=App;App.xojo_code;&h000000001BA8AB47;&h0000000000000000;false
Folder=XojoUnit;../Shared Resources/XojoUnit;&h000000002516B04D;&h0000000000000000;false
Expand All @@ -25,7 +25,7 @@ Class=ObjectSpyTester;../Shared Resources/XojoUnit/Tests/ObjectSpyTester.xojo_co
DefaultWindow=XojoUnitTestWindow
AppMenuBar=XojoUnitMenuBar
MajorVersion=6
MinorVersion=8
MinorVersion=9
SubVersion=0
NonRelease=0
Release=3
Expand All @@ -48,17 +48,19 @@ MacCreator=
MDI=0
MDICaption=
DefaultEncoding=&h0
AppIcon=XojoUnitDesktop.xojo_resources;&h0
OSXBundleID=com.example.xojounitdesktop
AppIcon=XojoUnitDesktopAPI1.xojo_resources;&h0
OSXBundleID=com.example.xojounitdesktopapi1
DebuggerCommandLine=
UseGDIPlus=True
UseBuildsFolder=True
HiDPI=True
DarkMode=True
CopyRedistNextToWindowsEXE=False
IncludePDB=False
WinUIFramework=False
IsWebProject=False
LinuxBuildArchitecture=1
MacBuildArchitecture=1
MacBuildArchitecture=4
WindowsBuildArchitecture=1
OptimizationLevel=0
WindowsVersions={35138b9a-5d96-4fbd-8e2d-a2440225f93a}|{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}|{1f676c76-80e1-4239-95bb-83d0f6d0da78}|{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}
Expand Down
29 changes: 29 additions & 0 deletions Desktop API2 Project/App.xojo_code
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#tag Class
Protected Class App
Inherits DesktopApplication
#tag Event
Sub Opening() Handles Opening
App.AllowAutoQuit = True
End Sub
#tag EndEvent


#tag Constant, Name = kEditClear, Type = String, Dynamic = False, Default = \"&Delete", Scope = Public
#Tag Instance, Platform = Windows, Language = Default, Definition = \"&Delete"
#Tag Instance, Platform = Linux, Language = Default, Definition = \"&Delete"
#tag EndConstant

#tag Constant, Name = kFileQuit, Type = String, Dynamic = False, Default = \"&Quit", Scope = Public
#Tag Instance, Platform = Windows, Language = Default, Definition = \"E&xit"
#tag EndConstant

#tag Constant, Name = kFileQuitShortcut, Type = String, Dynamic = False, Default = \"", Scope = Public
#Tag Instance, Platform = Mac OS, Language = Default, Definition = \"Cmd+Q"
#Tag Instance, Platform = Linux, Language = Default, Definition = \"Ctrl+Q"
#tag EndConstant


#tag ViewBehavior
#tag EndViewBehavior
End Class
#tag EndClass
14 changes: 14 additions & 0 deletions Desktop API2 Project/Build Automation.xojo_code
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#tag BuildAutomation
Begin BuildStepList Linux
Begin BuildProjectStep Build
End
End
Begin BuildStepList Mac OS X
Begin BuildProjectStep Build
End
End
Begin BuildStepList Windows
Begin BuildProjectStep Build
End
End
#tag EndBuildAutomation
68 changes: 68 additions & 0 deletions Desktop API2 Project/XojoUnitDesktopAPI2.xojo_project
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
Type=Desktop
RBProjectVersion=2024.011
MinIDEVersion=20210300
OrigIDEVersion=00000000
Class=App;App.xojo_code;&h000000001BA8AB47;&h0000000000000000;false
Folder=XojoUnit;../Shared Resources/XojoUnit;&h000000002516B04D;&h0000000000000000;false
Folder=Tests;../Shared Resources/XojoUnit/Tests;&h0000000044C729E7;&h000000002516B04D;false
Class=XojoUnitSuperClassTests;../Shared Resources/XojoUnit/Tests/XojoUnitSuperClassTests.xojo_code;&h000000003A8067FF;&h0000000044C729E7;false
Folder=TestFramework;../Shared Resources/XojoUnit/TestFramework;&h000000003E1A9B41;&h000000002516B04D;false
Class=DesktopTestController;../Shared Resources/XojoUnit/DesktopTestController.xojo_code;&h000000003FC78D4E;&h000000002516B04D;false
MenuBar=XojoUnitAPI2MenuBar;../Shared Resources/XojoUnit/XojoUnitAPI2MenuBar.xojo_menu;&h00000000726AEEEA;&h000000002516B04D;false
DesktopToolbar=XojoUnitTestAPI2Toolbar;../Shared Resources/XojoUnit/XojoUnitTestAPI2Toolbar.xojo_toolbar;&h000000004C5F6799;&h000000002516B04D;false
DesktopWindow=XojoUnitAPI2AboutWindow;../Shared Resources/XojoUnit/XojoUnitAPI2AboutWindow.xojo_window;&h0000000006C01E42;&h000000002516B04D;false
DesktopWindow=XojoUnitAPI2TestWindow;../Shared Resources/XojoUnit/XojoUnitAPI2TestWindow.xojo_window;&h000000005E851226;&h000000002516B04D;false
BuildSteps=Build Automation;Build Automation.xojo_code;&h000000004A6BC0FB;&h0000000000000000;false
Class=XojoUnitTests;../Shared Resources/XojoUnit/Tests/XojoUnitTests.xojo_code;&h0000000045CA76B3;&h0000000044C729E7;false
Class=TestGroup;../Shared Resources/XojoUnit/TestFramework/TestGroup.xojo_code;&h000000006F90619D;&h000000003E1A9B41;false
Class=TestController;../Shared Resources/XojoUnit/TestFramework/TestController.xojo_code;&h000000006FF90549;&h000000003E1A9B41;false
Class=Assert;../Shared Resources/XojoUnit/TestFramework/Assert.xojo_code;&h000000006F374736;&h000000003E1A9B41;false
Class=TestResult;../Shared Resources/XojoUnit/TestFramework/TestResult.xojo_code;&h000000001624A4EB;&h000000003E1A9B41;false
Class=XojoUnitFailTests;../Shared Resources/XojoUnit/Tests/XojoUnitFailTests.xojo_code;&h000000002FC99FFF;&h0000000044C729E7;false
Class=XojoUnitTestFailedException;../Shared Resources/XojoUnit/TestFramework/XojoUnitTestFailedException.xojo_code;&h000000000AF4DFFF;&h000000003E1A9B41;false
Class=ObjectSpy;../Shared Resources/XojoUnit/TestFramework/ObjectSpy.xojo_code;&h000000001D641FFF;&h000000003E1A9B41;false
Class=ObjectSpyTester;../Shared Resources/XojoUnit/Tests/ObjectSpyTester.xojo_code;&h0000000002FCEFFF;&h0000000044C729E7;false
DefaultWindow=XojoUnitAPI2TestWindow
AppMenuBar=XojoUnitAPI2MenuBar
MajorVersion=6
MinorVersion=9
SubVersion=0
NonRelease=0
Release=3
InfoVersion=
LongVersion=
ShortVersion=
WinCompanyName=
WinInternalName=
WinProductName=
WinFileDescription=
AutoIncrementVersionInformation=True
BuildFlags=&h6800
BuildLanguage=&h0
DebugLanguage=&h0
Region=
WindowsName=XojoUnit.exe
MacCarbonMachName=XojoUnit
LinuxX86Name=XojoUnit
MacCreator=
MDI=0
MDICaption=
DefaultEncoding=&h0
AppIcon=XojoUnitDesktopAPI2.xojo_resources;&h0
OSXBundleID=com.example.xojounitdesktopapi2
DebuggerCommandLine=
UseGDIPlus=True
UseBuildsFolder=True
HiDPI=True
DarkMode=True
CopyRedistNextToWindowsEXE=False
IncludePDB=False
WinUIFramework=False
IsWebProject=False
LinuxBuildArchitecture=1
MacBuildArchitecture=4
WindowsBuildArchitecture=1
OptimizationLevel=0
WindowsVersions={35138b9a-5d96-4fbd-8e2d-a2440225f93a}|{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}|{1f676c76-80e1-4239-95bb-83d0f6d0da78}|{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}
WindowsRunAs=0
MacOSMinimumVersion=
Binary file not shown.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ Xojo 2019 Release 2 or later is required for XojoUnit with Desktop and Console.

## Release Notes

## 6.9 (June 6, 2024)

- Support Dark Mode.
- Split Desktop project into API1 and API2 versions.
- Converted some function calls to replacements, e.g., `Format` -> `.ToString`.

### 6.8 (Feb. 23, 2023)

- Introduced `ObjectSpy` class.
Expand Down
2 changes: 0 additions & 2 deletions Shared Resources/XojoUnit/TestFramework/Assert.xojo_code
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ Protected Class Assert
If diff <= (Abs(tolerance) + 0.00000001) Then
Pass()
Else
'Fail(FailEqualMessage(Format(expected, "-#########.##########"), Format(actual, "-#########.##########")), message)
Fail(FailEqualMessage(expected.ToString(Locale.Current, "#########.##########"), actual.ToString(Locale.Current, "#########.##########")), message)
End If
End Sub
Expand Down Expand Up @@ -431,7 +430,6 @@ Protected Class Assert
If diff > (Abs(tolerance) + 0.00000001) Then
Pass()
Else
'Fail(FailEqualMessage(Format(expected, "-#########.##########"), Format(actual, "-#########.##########")), message)
Fail(FailEqualMessage(expected.ToString(Locale.Current, "#########.##########"), actual.ToString(Locale.Current, "#########.##########")), message)
End If
End Sub
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ Protected Class ObjectSpy
Var numberTypes() As Int32 = Array( _
Variant.TypeInt32, _
Variant.TypeInt64, _
Variant.TypeInteger, _
Variant.TypeSingle, _
Variant.TypeDouble _
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ Protected Class TestController
#tag Constant, Name = kHasDotComment, Type = String, Dynamic = False, Default = \"(\?#HasDot)", Scope = Private, CompatibilityFlags = (TargetConsole and (Target32Bit or Target64Bit)) or (TargetWeb and (Target32Bit or Target64Bit)) or (TargetDesktop and (Target32Bit or Target64Bit))
#tag EndConstant

#tag Constant, Name = XojoUnitVersion, Type = String, Dynamic = False, Default = \"6.8", Scope = Public
#tag Constant, Name = XojoUnitVersion, Type = String, Dynamic = False, Default = \"6.9", Scope = Public
#tag EndConstant


Expand Down
Loading

0 comments on commit fcf29ee

Please sign in to comment.