DUnitX? lazarus / 21-General ---------------------------------------------------------------------- axtens · 2021-07-13 03:36 Backstory: I'm a student on Exercism. They have a Delphi track. I was working on the track on my Windows laptop but am now doing my Exercism exercises exclusively in Linux. However, Delphi is not available for Linux. So I asked in the Exercism Slack about using Lazarus/FPC rather than Delphi and was told that there's no DUnitX for Lazarus/FPC and that I should try to get Wine to run Delphi (a prospect that I have grave doubts about.) Is it that case that there's no DUnitX for Lazarus/FPC. Is there a reason why not? Is it a SMOP or are there other reasons? -- Bruce ---------------------------------------------------------------------- HeavyUser · 2021-07-13 04:30 I have no idea what exactly they need from dunitx but lazarus/fpc come with their own unit testing framework call FPCUnit https://wiki.freepascal.org/fpcunit and there is a port of DUnit2 call fptest https://wiki.freepascal.org/FPTest which might be closer to DUnitX. ---------------------------------------------------------------------- JuhaManninen · 2021-07-13 06:23 Lazarus has an IDE plugin for it called FPCUnitIde. ---------------------------------------------------------------------- PascalDragon · 2021-07-13 06:50 Quote from: axtens on July 13, 2021, 05:36:46 amIs it that case that there's no DUnitX for Lazarus/FPC. Is there a reason why not? Is it a SMOP or are there other reasons? DUnitX relies on language features that are not available in FPC, yet (for example extended RTTI (which is currently Work-in-Progress) or custom attributes (which have initial support in trunk only)). ---------------------------------------------------------------------- wp · 2021-07-13 07:48 For my package fpexif I implemented a series of unit tests based on FPCUnit, and I was able to run the same test units also with Delphi, after adapting the project file: Lazarus-Version: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i program fpExifTests; {$mode objfpc}{$H+} uses  Interfaces, Forms, GuiTestRunner,  // here follow the test units  fetutils,  fetexifle,  fetexifbe,  fetiptc; {$R *.res} begin  Application.Initialize;  Application.CreateForm(TGuiTestRunner, TestRunner);  Application.Run;end. Delphi Version: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i program fpExifTests_Delphi7; uses  TestFramework,  Forms,  GUITestRunner,  TextTestRunner,  fpeexifdata in '..\..\fpeexifdata.pas',  fpeExifReadWrite in '..\..\fpeexifreadwrite.pas',  fpeGlobal in '..\..\fpeglobal.pas',  fpeIptcData in '..\..\fpeiptcdata.pas',  fpeIptcReadWrite in '..\..\fpeiptcreadwrite.pas',  fpeMakerNote in '..\..\fpemakernote.pas',  fpeMetadata in '..\..\fpemetadata.pas',  fpeStrConsts in '..\..\fpestrconsts.pas',  fpeTags in '..\..\fpetags.pas',  fpeUtils in '..\..\fpeUtils.pas',  // Here follow the test units  fetExifBE in 'common\fetexifbe.pas',  fetExifLE in 'common\fetexifle.pas',  fetIptc in 'common\fetiptc.pas',  fetUtils in 'common\fetutils.pas'; {$R *.res} begin  Application.Initialize;  GUITestRunner.RunRegisteredTests;end.