mirror of
https://github.com/bertptrs/tracing-mutex.git
synced 2025-12-27 21:40:32 +01:00
Explicitly test for disallowed self-cycles
This commit is contained in:
@@ -226,6 +226,14 @@ mod tests {
|
|||||||
|
|
||||||
use super::*;
|
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]
|
#[test]
|
||||||
fn test_digraph() {
|
fn test_digraph() {
|
||||||
let mut graph = DiGraph::default();
|
let mut graph = DiGraph::default();
|
||||||
|
|||||||
Reference in New Issue
Block a user