diff options
| author | ruki <[email protected]> | 2025-03-21 23:12:16 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-04-08 15:31:54 +0800 |
| commit | 093894844d4d7e7e58a7a78d36f04cf59b95ff31 (patch) | |
| tree | e104010f2c4fabbc196ff40f7cc56f9a0f3dcaa9 /tests/modules/graph/test.lua | |
| parent | 43ea0c1fb1d9954e065f3dfdb7bd93493d5d9e38 (diff) | |
improve tests
Diffstat (limited to 'tests/modules/graph/test.lua')
| -rw-r--r-- | tests/modules/graph/test.lua | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/modules/graph/test.lua b/tests/modules/graph/test.lua index 3d5a0aede..da6218f14 100644 --- a/tests/modules/graph/test.lua +++ b/tests/modules/graph/test.lua @@ -43,14 +43,12 @@ function test_paritail_topo_sort(t) dag:partial_topo_sort_reset() local order_vertices = {} - local batch_size = math.huge - local batch, has_cycle = dag:partial_topo_sort_next(batch_size) + local batch, has_cycle = dag:partial_topo_sort_next() while #batch > 0 do for _, v in ipairs(batch) do table.insert(order_vertices, v) end - batch, has_cycle = dag:partial_topo_sort_next(batch_size) - + batch, has_cycle = dag:partial_topo_sort_next() if has_cycle then break end |
