Kemsekov / GraphSharp

GraphSharp is a tool to study and use knowledge of graph theory in C#!
MIT License
38 stars 5 forks source link

Implement more test cases #10

Open Kemsekov opened 2 years ago

Kemsekov commented 2 years ago

Add wide rage of IVisitor.Select and IVisitor.EndVisit tests. Maybe add separate tests for IPropagators.

Create more tests for separate components more than integrated tests, where all of them works together.

For example create custom empty Propagator and feed it to IGraph in order to test IGraph implementation more than IPropagator one.

Do the same for IPropagators.

Kemsekov commented 2 years ago

Add tests for GraphStructureBase.IsTree, GraphStructureBase.CountDegrees, FromConnectionsList, ToConnectionsList, RemoveAllEdges

fernandoareias commented 6 months ago

Hey @Kemsekov, can I work on that?

Kemsekov commented 6 months ago

Hey @Kemsekov, can I work on that?

Yeah, I would be happy☺️

But my current testing is quite a mess actually.

Some tests fail to run together and runs fine separately (especially path finder tests)

Just create pull request and I will check it.

I actually want to add max flow and min cuts tests, for here is currently just two versions of max flows implemented that requires testing.

One is port from quik graph - MaxFlow. MaxFlowEdmondsKarp

https://github.com/Kemsekov/GraphSharp/blob/master/GraphSharp/Algorithms/GraphOperations/MaxFlow.cs

And other one is from google or tools.

https://github.com/Kemsekov/GraphSharp/blob/master/GraphSharp.GoogleOrTools/MaxFlow.cs

And min cut that uses max flow results to compute cut.

https://github.com/Kemsekov/GraphSharp/blob/master/GraphSharp/Algorithms/GraphOperations/MinCut.cs

If you could add tests to them and feedback to me if something is wrong I would be happy ☺️