diff options
| author | ruki <[email protected]> | 2025-03-20 23:16:51 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-04-08 15:31:54 +0800 |
| commit | a278d3bd3e74027e7fd1f878c7d8c991caf1a75f (patch) | |
| tree | 1ddcf6b69c37d1f89830ebfccff48f088113e69d /tests/modules | |
| parent | 5b57870c2854f96c9fd2aebb6e9fe538b9a27b8c (diff) | |
improve to find cycle
Diffstat (limited to 'tests/modules')
| -rw-r--r-- | tests/modules/graph/test.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/modules/graph/test.lua b/tests/modules/graph/test.lua index 63095be12..4bbefe069 100644 --- a/tests/modules/graph/test.lua +++ b/tests/modules/graph/test.lua @@ -52,5 +52,8 @@ function test_find_cycle(t) end local cycle = dag:find_cycle() t:are_equal(cycle, {1, 6, 0}) + + local _, has_cycle = dag:topological_sort() + t:require(has_cycle) end |
