mirror of
https://github.com/bertptrs/tracing-mutex.git
synced 2025-12-25 20:50:32 +01:00
Explicitly test for disallowed self-cycles
This commit is contained in:
@@ -226,6 +226,14 @@ mod tests {
|
||||
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn test_no_self_cycle() {
|
||||
// Regression test for https://github.com/bertptrs/tracing-mutex/issues/7
|
||||
let mut graph = DiGraph::default();
|
||||
|
||||
assert!(!graph.add_edge(1, 1));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_digraph() {
|
||||
let mut graph = DiGraph::default();
|
||||
|
||||
Reference in New Issue
Block a user