-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fbc8d17
commit cffa0cf
Showing
4 changed files
with
101 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[package] | ||
name = "github_issue_172" | ||
version = "0.1.0" | ||
edition = "2018" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
struct AThing; | ||
|
||
pub mod alpha { | ||
use delta::ATrait; | ||
pub mod beta { | ||
use crate::AThing; | ||
use chrono::DateTime; | ||
|
||
pub struct AnotherThing { | ||
dt: chrono::Duration, | ||
} | ||
|
||
pub mod gamma { | ||
|
||
use rand::CryptoRng; | ||
} | ||
} | ||
pub mod delta { | ||
use super::beta::AnotherThing; | ||
use rand::Rng; | ||
|
||
pub trait ATrait {} | ||
} | ||
} |
60 changes: 60 additions & 0 deletions
60
tests/snapshots/generate_graph__github_issue_172__github_issue_172.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
--- | ||
source: tests/generate_graph.rs | ||
expression: output | ||
--- | ||
STDERR: | ||
|
||
STDOUT: | ||
digraph { | ||
|
||
graph [ | ||
label="github_issue_172", | ||
labelloc=t, | ||
|
||
pad=0.4, | ||
|
||
// Consider rendering the graph using a different layout algorithm, such as: | ||
// [dot, neato, twopi, circo, fdp, sfdp] | ||
layout=dot, | ||
overlap=false, | ||
splines="line", | ||
rankdir=LR, | ||
|
||
fontname="Helvetica", | ||
fontsize="36", | ||
]; | ||
|
||
node [ | ||
fontname="monospace", | ||
fontsize="10", | ||
shape="record", | ||
style="filled", | ||
]; | ||
|
||
edge [ | ||
fontname="monospace", | ||
fontsize="10", | ||
]; | ||
|
||
"github_issue_172" [label="crate|github_issue_172", fillcolor="#5397c8"]; // "crate" node | ||
"github_issue_172::AThing" [label="pub(crate) struct|AThing", fillcolor="#f8c04c"]; // "struct" node | ||
"github_issue_172::alpha" [label="pub mod|alpha", fillcolor="#81c169"]; // "mod" node | ||
"github_issue_172::alpha::beta" [label="pub mod|alpha::beta", fillcolor="#81c169"]; // "mod" node | ||
"github_issue_172::alpha::beta::AnotherThing" [label="pub struct|alpha::beta::AnotherThing", fillcolor="#81c169"]; // "struct" node | ||
"github_issue_172::alpha::beta::gamma" [label="pub mod|alpha::beta::gamma", fillcolor="#81c169"]; // "mod" node | ||
"github_issue_172::alpha::delta" [label="pub mod|alpha::delta", fillcolor="#81c169"]; // "mod" node | ||
"github_issue_172::alpha::delta::ATrait" [label="pub trait|alpha::delta::ATrait", fillcolor="#81c169"]; // "trait" node | ||
|
||
"github_issue_172" -> "github_issue_172::AThing" [label="owns", color="#000000", style="solid"] [constraint=true]; // "owns" edge | ||
"github_issue_172" -> "github_issue_172::alpha" [label="owns", color="#000000", style="solid"] [constraint=true]; // "owns" edge | ||
"github_issue_172::alpha" -> "github_issue_172::alpha::beta" [label="owns", color="#000000", style="solid"] [constraint=true]; // "owns" edge | ||
"github_issue_172::alpha" -> "github_issue_172::alpha::delta" [label="owns", color="#000000", style="solid"] [constraint=true]; // "owns" edge | ||
"github_issue_172::alpha" -> "github_issue_172::alpha::delta::ATrait" [label="uses", color="#7f7f7f", style="dashed"] [constraint=false]; // "uses" edge | ||
"github_issue_172::alpha::beta" -> "github_issue_172::AThing" [label="uses", color="#7f7f7f", style="dashed"] [constraint=false]; // "uses" edge | ||
"github_issue_172::alpha::beta" -> "github_issue_172::alpha::beta::AnotherThing" [label="owns", color="#000000", style="solid"] [constraint=true]; // "owns" edge | ||
"github_issue_172::alpha::beta" -> "github_issue_172::alpha::beta::gamma" [label="owns", color="#000000", style="solid"] [constraint=true]; // "owns" edge | ||
"github_issue_172::alpha::delta" -> "github_issue_172::alpha::beta::AnotherThing" [label="uses", color="#7f7f7f", style="dashed"] [constraint=false]; // "uses" edge | ||
"github_issue_172::alpha::delta" -> "github_issue_172::alpha::delta::ATrait" [label="owns", color="#000000", style="solid"] [constraint=true]; // "owns" edge | ||
|
||
} | ||
|