Commit Graph
70 Commits
Author SHA1 Message Date
warrence baa6775156 Fix docs in testing helper assert_valid_path 2026-10-21 22:03:40 +02:00
warrence 9b11090e82 Fix missing loop var usage 2026-10-18 11:48:23 +02:00
warrence f41b77903f Add docs for MakeTestGraph generator methods 2026-10-16 20:23:58 +02:00
warrence 3fb3e67e8e Add GraphTopology::common_neighbors 2026-10-16 20:19:08 +02:00
warrence 90a2bd9e9e Add GraphTopologyConversion tests related to addition and deletion 2026-10-15 10:01:54 +02:00
warrence 7196871a96 Add ElementMap conversion tests via new GraphIsomorphism 2026-10-15 09:32:15 +02:00
warrence 9ae841288b Add conversion test for empty graph 2026-10-15 08:46:47 +02:00
warrence eab5a63e6c Fix loop patterns 2026-10-15 08:45:18 +02:00
warrence 3d1e8246a8 Fix clippy findings and related issues 2026-10-13 21:25:50 +02:00
warrence 7cfee9cce5 Remove function calls inside of 'expect' 2026-10-12 21:52:51 +02:00
warrence b124e58b38 Change GraphTopologyConversion::convert return value to include the new GraphIsomorphism
This allows to convert maps for the converted graph.
2026-10-12 21:33:49 +02:00
warrence 1979d33649 Add reserve calls to the test fixtures 2026-10-12 20:23:27 +02:00
warrence 3d7dda6f7b Refactor ElementMap, removing its copy-on-write feature 2026-10-11 22:24:00 +02:00
warrence c8855daddf Renamed FromGraph to GraphTopologyConversion to align with existing traits and separate from From trait 2026-09-29 23:16:57 +02:00
warrence a9190f88db Add From and FromGraph tests for FrozenGraph and for GraphTopologyAddition
The new tests are analogous to the existing Clone tests. Currently, only FrozenGraph implements From and FromGraph, but not GraphTopologyAddition, so the tests relying on GraphTopologyAddition are currently unused.
2026-09-25 08:41:10 +02:00
warrence d438a4288a Extract asserts from Clone tests to be reusable 2026-09-25 08:36:30 +02:00
warrence 038e984c97 Add FromGraph trait, and add implementation for FrozenGraph 2026-09-19 17:53:44 +02:00
warrence e593298eba Add Clone to graph models, and tests 2026-09-19 17:19:47 +02:00
warrence 4c6a8a43e4 Refactor tests: use MakeTestGraph in model-specific tests, deconstruct vertex arrays where useful, adjust local variable names 2026-09-04 09:28:00 +02:00
warrence 3ad448974e Add new assert helper function for GraphTopologyDeletion tests 2026-09-03 20:40:15 +02:00
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 8a1d491943 Format test code 2026-09-03 09:06:22 +02:00
warrence 5825ef3b47 Change all graph tests to pub to avoid unused-warnings 2026-09-02 09:30:37 +02:00
warrence 0ff830ef48 Refactor graph trait tests to minimize macro code, and split into separate files per macro
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:49:42 +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 cd1d2cddee Move related tests into new testing macro for GraphTopologyAddition 2026-08-17 10:19:22 +02:00
warrence b4374174a9 Add reserve_vertices and reserve_edges to GraphTopologyAddition 2026-08-07 19:01:03 +02:00
warrence 59d9c2b8a7 Add ElementMap::reserve to replace ElementMap::expand, update tests
ElementMap tests are now self contained unit tests, without any graph context. The only exception is the repurposed test "reused_slot_returns_old_value", which is not suited for GraphTopologyDeletion, but actually specific for Graph.
2026-08-06 23:06:52 +02:00
warrence a7346bd782 Rename EntityMap to ElementMap (tests not yet updated) 2026-08-06 23:01:10 +02:00
warrence 10d0c382cc Add GraphTopologyAddition trait from GraphTopology
Move capacity and add methods from GraphTopology trait to new GraphTopologyAddition trait
2026-08-06 14:17:21 +02:00
warrence 2851cf60fd Add Incidence struct for GraphTopology to use 2026-08-06 09:57:51 +02:00
warrence 0169343ac8 Merge branch 'main' into release-0.3.0 2026-07-31 10:16:03 +02:00
warrence 1b79809e2f Remove deprecated method calls from map tests 2026-07-31 09:33:26 +02:00
warrence 1b8df19d00 Remove tests for deprecated VertexMap/EdgeMap::sync 2026-07-31 09:31:21 +02:00
warrence 9608796f23 Move dfs_find_path tests into dfs_testing 2026-07-22 13:44:32 +02:00
warrence c253e4a840 Add tests for GraphTopology::vertex_map and edge_map 2026-07-22 13:31:15 +02:00
warrence d711e68577 Replace VertexMap and EdgeMap with now public EntityMap 2026-07-22 13:30:09 +02:00
warrence 3fa4b66981 Fix IncidenceCursor for AppendGraph and Graph, and add tests 2026-07-17 22:06:28 +02:00
warrence cf31ee2f01 Replace VertexMap/EdgeMap.len with capacity
Rename EdgeMap.len to capacity.
Add VertexMap.capacity and EdgeMap.capacity.
Deprecate VertexMap.len and EdgeMap.len.
2026-07-13 10:48:16 +02:00
warrence 6d2d1de8ea Hide testing macros from docs 2026-07-03 22:49:14 +02:00
warrence 6a0c426c77 Rename find_path* algorithms to dfs_find_path* 2026-07-03 21:43:55 +02:00
warrence 21c95b4796 Add find_path algorithm and tests 2026-06-29 21:03:10 +02:00
warrence c197766229 Fix formatting 2026-06-26 15:38:49 +02:00
warrence c147ed4974 Update breadth-first search tests 2026-06-26 15:35:23 +02:00
warrence 135f256141 Add depth-first search algorithms and tests 2026-06-26 15:34:42 +02:00
warrence 91ac925417 Add breadth-first search algorithms and tests 2026-06-25 21:56:22 +02:00
warrence e299012948 Move the disconnected test graph to the more general graph_topology_test_fixtures macro 2026-06-25 20:17:55 +02:00
warrence ce692cb0b2 Add trait imports to test functions, making macros self-contained 2026-05-18 15:55:56 +02:00