Jump to content

Stefan Glienke

Members
  • Content Count

    1370
  • Joined

  • Last visited

  • Days Won

    130

Everything posted by Stefan Glienke

  1. Stefan Glienke

    TestInsight 1.1.9.0 released

    Decision is of course up to you and I am not forcing anyone to use my plugin - after all it excels well for fast running tests and not for test suits that might take minutes or longer to run. Anyhow if the lack of being able to identify failed test by their name is a problem for you there might be something wrong with your test naming. See this example from Spring4D And here the result from Grep as you can see that the TestOrdered and TestOrdered_Issue179 are only implemented once: So I am using inheritance to have a base test class here and then only inherit from that for the different dictionary implementations to be tested. In my case I have the identical test being performed 4 times - and I guess the same will be the case for Aurelius - with potentially some tests that might be different but could still be implemented as virtual methods in some base class and then inherited and thus provide the exact name where they failed. Furthermore simply double clicking on the failed test should lead you do the code. Edit: another question: if you run your test suite as part of CI - how would you know there which SaveBlob failed if you just name a dozen of tests "SaveBlob" - as you can see this is not a particular problem of TI but likely results from some non optimal naming of your tests and simply relying on the hierarchical view of the DUnit UI to find which one it is.
  2. Stefan Glienke

    TestInsight 1.1.9.0 released

    1. Known and as designed - TI is designed with TDD in mind where you usually don't care about some hierarchies and just about passed/not passed - that is why originally it just had the group by type view - only later I introduced the group by fixture view which has no hierarchical display but just groups by the fixture names and its test cases. The issue was brought up several times but to be honest I have no intentions to replicate the full hierarchical view which the DUnit GUI has. 2. That is a wrong understanding - TI only runs the tests when you hit one of the play buttons or when one of the 2 options to run it automatically are enabled - however even then it only runs once the trigger (hit save or idle for the set time) happens. If the test application has an issue and keeps running in the background you can hit the "stop" button which then tries to terminate that process. 3. Obviously my UI is not good enough as I get this question quite often - however reading the tooltips will reveal this option - the second button from the left (the "fast forward" one) has 2 options in one - if there is no test selected it does "discover tests" - that is it runs the project but tells the framework to not execute every testcase - and thus gets all of them as skipped - if any test is selected it changes to "run selected tests". Long story short - simply hit that button and it collects all tests without actually executing them which is then an almost instant action.
  3. Stefan Glienke

    Grep search empty window with 10.4.1

    I can confirm - I noticed this happening as well but could not see yet what exactly is causing it. No fancy grep options though, just plain searching files of some directory or project group The grep window goes blank, just a grey window with nothing on it.
  4. Stefan Glienke

    CPP or C++ Category

    Delphipraxis, not RADStudiopraxis - anyhow I am not the one to decide.
  5. Stefan Glienke

    CPP or C++ Category

    Ok can we then also have a C# and Typescript area because those would be the real half brothers of Delphi (same father ya know)
  6. Stefan Glienke

    CPP or C++ Category

    Why should a Delphi forum have a C++ area?
  7. Possible copyright violation as it contains code related to DXScene and VGScene which was/is under copyright by Eugene Kryukov and was sold to Embarcadero.
  8. Stefan Glienke

    does a class property or a variable exist

    RTTI does not contain any information about class properties or vars/fields For clarification please see my P.S. in this post.
  9. Stefan Glienke

    where can I get general git process questions answered?

    Sounds more like current git workflow is done wrong when there is a struggle with 3 people trying to use it - because git was exactly invented for a distributed team (linux kernel). There are several models out there that have pros and cons - the famous one from over 10 years ago (which I saw had a note added earlier this year): https://nvie.com/posts/a-successful-git-branching-model/ This one refers to another one: https://guides.github.com/introduction/flow/ And since gitlab is a competitor to github they also have their model: https://docs.gitlab.com/ee/topics/gitlab_flow.html Read up on those - try to understand - identify which one fits your situation best and then come back asking some specific questions
  10. Stefan Glienke

    Why is TList freed in this code?

    What do you mean how does it behave - like a multimap
  11. Stefan Glienke

    Why is TList freed in this code?

    That's why IMultiMap<TKey,TValue> from Spring4d is so cool
  12. Stefan Glienke

    a pair of MM test

    I know english is not your native language but to be honest just throwing around numbers and all kinds of different benchmarks it totally confusing for me - it would be very helpful if you could present your findings in a more structured way as I really find the topic interesting but it is very exhausting to follow you.
  13. Stefan Glienke

    a pair of MM test

    Thanks, might be worth putting that info into the github readme because right now this looks like the Sea*.dll are yours where no code nor their source is found for in the repo. Also apart from the raw speed numbers do you have total/peak memory allocated comparisons for the tests you mention as well? Edit: what is the "FastMM5 benchmark utility" you referring to? I see no benchmark in the FastMM5 repo
  14. Stefan Glienke

    a pair of MM test

    X is n times faster than Y is not leading anywhere unless you profile the bottleneck of Y in your benchmark. Run it under VTune or uProf and report your findings. As for your MM it might be faster but nobody serious will download and use some random dlls (that are not even signed) from the internet and put them into production.
  15. Stefan Glienke

    Automated Way to Detect Interface Breaking Changes

    Unless you use generics - they are off limits to be changed (interface and implementation section) in both cases - also for units inline methods are off limits - for packages they are ok because inlining does not happen across binary module boundaries.
  16. Keep in mind this was addressed at Uwes comment that he did not publish something similar because he did not make the effort to make it work not only for his but as a general purpose thing. I cannot speak for others but for me it was reading a lof of collection library code (not only Delphi) - the Delphi specific things (can/cannot use System.Move and such) comes from general core runtime (RTL) knowledge. And sometimes after years it dawns on you that naive usage of generics in large OOP architectures is not the greatest thing and you start refactoring stuff.
  17. Simple: pointers stored in the weakref table in System don't match those after using Move
  18. I disagree - if this implementation were done totally naive it would have actually worked for any T yet in a non optimized way - but the author tried to be clever by using Move 😉 Leave implementing generic collections to people experienced with it (which I in no way claim to have monopoly on) P.S. Since the XE7 refactoring disaster of System.Generics.Collections which still has existing bugs as aftermath I am very sensitive regarding this topic.
  19. I admit - it's not common but good luck storing something like this in your list then: type TMyRecord = record [weak] something: IWhatever; end; I am not bashing any code here but when something is published as general purpose use (which an unconstrained generic collection class is) then I expect it to work for any T. If you don't handle this in your private code because you don't have such use case you of course don't need to care. As for TRingBuffer<T> - it leaks strings for example: var b: TRingbuffer<string>; begin b := TRingbuffer<string>.Create(8); b.Add('one'); b.Delete(1); b.Add(['two', 'three']); b.Free; end;
  20. Read System.Collections.Generics. Particularly the places where it checks for HasWeakRef(T) What weak references are and how they are handled and why you cannot simply System.Move them refer to System.pas (start with RegisterWeakRef)
  21. No, yes For managed types you can System.Move them in the internal array - however it also does it when peeking x items into the result array. For types containing weak reference System.Move does not work even for the internal array.
  22. Spring4d 2.0 already has this: https://bitbucket.org/sglienke/spring4d/src/c336b8dd39bfc30cbcf2fa1f6d8323e663bdcc05/Source/Base/Collections/Spring.Collections.Base.pas#lines-473 It is an abstract base class (you don't simply use that one) implemented by several different ready to use collections such as queue, deque, boundedqueue (does not grow like queue does), evictingqueue (drops the oldest element when full) TRingbuffer<T> unfortunately has several defects, mostly around simply using Move regardless the type of T (managed, containing weak reference)
  23. What you refer to is called forking and in fact GitHub is able to track what repositories are a fork and where they originate from. The problem is a different one and that is that often forks are more active than the original one which at some point might be completely inactive. If I were someone actively working on a fork while the original project might be dead I'd reach out to the original maintainer/author and try to work something out.
  24. Yes it is - optimizer does not reorder. If it would short-circuit evaluation would be broken. FWIW setting Result to False and or'ing it with A is unnecessary - x or False = x
  25. That code does not compile, method references cannot be declared as consts. What you probably meant was this: const Funcs: array[0..2] of function: Boolean = (A, B, C); And yes, that only works if they are parameterless otherwise you would have to declare that differently - but again only works if they are have homogeneous signatures. Talking about possibly overengineering: https://en.wikipedia.org/wiki/Specification_pattern
×