Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi, I see if a class has the [TestFixture] attribute, then it will be included in the Test Suite. So it seems that the initialization TDUnitX.RegisterTestFixture(TMyTests); is not neccessary. Maybe it just a relic from the past, or does it still serve a purpose?
  2. Thanks for your help.
  3. I'm using the latest version of superobject from here https://github.com/hgourvest/superobject. It fails to parse attached json file (return nil object). I have no problem using x-superobject, and notepad++ has no problem parsing it. Sample code: var O: ISuperObject; S: string; StrList: TStringList; begin StrList := TStringList.Create; try StrList.LoadFromFile(....'sample.json'); S := StrList.Text; O := SO(S); if O = nil then Memo1.Lines.Text := 'O = nil' else Memo1.Text := O.AsJSon(True); finally StrList.Free; end; Can anyone tell me why it fails? Is there a more recent version of superobject to use? hgourvest repo is no longer maintained. (My project is using superobject, so I don't want to swap to another library..) Thanks sample.json
  4. In Data structures & Algorithm courses, there is usually a discussion on Binary Search Trees and it is seems to be an important data structure. Although in Delphi land I don't see much mention of BST. So I'm curious do people use BST and if so in what cases? or does TStringList mostly replace the need for it. If you do use it, what implementation do you use. Most of the libraries I found don't seem to have a BST, although I did find one in https://github.com/Zeus64/alcinoe
  5. RaelB

    DUnit GUI does not seem to work

    It is unchecked. I did find the problem. There was no call to RegisterTest in initialization section of test unit.
  6. Hello, I'm using 10.3.2. I created a VCL Project, then added a Test Project and Test Case (DUnit). When I run the test project, it runs and exits, without doing anything. What is wrong? I have not made any changes to Conditional Defines, so it should be GUI runner. Thanks Rael
  7. Thanks, that is quite amazing. You're saying the loop is actually pausing/resuming depending on queue activity.
  8. In the SimplePipeline project (from HL-III presentation), if I add a call to sleep in AddOne stage, the program (i.e. UI) blocks for 5 seconds. procedure AddOne(const input, output: IOmniBlockingCollection); var v: TOmniValue; begin for v in input do begin output.Add(v.AsInteger + 1); Sleep(1000); end; end; I would expect this to not block the UI, since it is running in a Thread/Task?
  9. Hello, I am looking at the code from WebSpider demo from HL-III presentation. (The project is just called pipeline) It has code like this: procedure TfrmWebSpider.UniqueFilter(const input, output: IOmniBlockingCollection); var uniqueUrls: TStringList; url : string; begin uniqueUrls := TStringList.Create; try uniqueUrls.Sorted := true; for url in input do begin if uniqueUrls.IndexOf(url) < 0 then begin uniqueUrls.Add(url); output.TryAdd(url); end else if FURLCount.Decrement = 0 then FSpider.Input.CompleteAdding; end; finally FreeAndNil(uniqueUrls); end; end; When I run the demo, I see that the uniqueUrls TStringList is working on all inputs received. This is what we want, but how does this work?, since it is a local variable one would expect/imagine that it goes out of scope each time UniqueFilter is "called". Thanks Rael