Commit Graph
17 Commits
Author SHA1 Message Date
warrence c25a8a4fc1 Add FrozenGraph tests 2026-09-03 19:49:45 +02:00
warrence a8b6f7591c Move common test helpers to fixtures module 2026-09-03 09:10:03 +02:00
warrence df5170f2f5 Refactor algorithm tests to minimize macro code, and move into tests/
The tests only declare a list of tests in the macro, no longer the test functions themselves. This allows better tooling support (e.g. IDE and rustfmt).
2026-08-31 19:44:55 +02:00
warrence 7fbd5eed9d Refactor graph creation in all tests into new internal MakeTestGraph trait
This large refactor allows future re-use of the existing tests for `FrozenGraph`, which does not implement `GraphTopologyAddition`, but instead has to convert from a different graph which does.

- Fix tests for `GraphTopologyDeletion` hard-coding Graph instead of using the trait.
- Fix some tests silently depending on macro call site uses.
- Change `GraphTopologyAddition` tests to use `Default::default` instead of `new`.
- Add new tests for `GraphTopology::vertex_map` and `edge_map` that also depend on `GraphTopologyAddition`, removing these dependencies from the existing tests.
- Add new test macro `graph_topology_addition_deletion_tests` for tests that need deletion and addition.
2026-08-29 22:38:27 +02:00
warrence 2d400628f7 Re-publish AppendGraph and Graph in models 2026-07-03 21:49:28 +02:00
warrence ce692cb0b2 Add trait imports to test functions, making macros self-contained 2026-05-18 15:55:56 +02:00
warrence 600664acb6 Update tests for Dijkstra's algorithm to test both graph models
Use the already established macro pattern, move actual tests to a new file in src/testing.
Use the make_test_graph() function from the graph topology tests instead of duplicating it for the Dijkstra tests.
2026-05-13 14:02:07 +02:00
warrence 726e7691ea Add weight parameter for Dijkstra's algorithm, add unweighted variants (unused) 2026-05-07 17:15:34 +02:00
warrence f40c03b113 Add VertexMap to attach data to vertices 2026-05-06 20:28:00 +02:00
warrence d0cbebcae0 Fix formatting 2026-04-22 16:32:17 +02:00
warrence ee26b7a3e0 Move AppendGraph to its own module 2026-04-22 16:31:17 +02:00
warrence a939f9b889 Add Dijkstra variant without returning predecessors 2026-04-22 15:50:45 +02:00
warrence a250bde626 Add DijkstraResult return type instead of unnamed tuple 2026-04-22 14:49:07 +02:00
warrence ab830ed221 Rename Graph to AppendGraph for future other graph models 2026-04-22 14:31:11 +02:00
warrence da9ba7b0ad Add GraphTopology trait and use it to interface graph model with algorithm 2026-04-22 14:26:35 +02:00
warrence 5ad480b379 Add tests for Dijkstra's algorithm on trivial graphs 2025-10-25 01:15:16 +02:00
warrence bff8ca6857 Move main() code into tests and remove binary crate 2025-10-15 17:09:11 +02:00