Skip to content

Commit 451a7b7

Browse files
committed
Renmae dotRepresentation to graphDescription
1 parent 6c48807 commit 451a7b7

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

Examples/Packages/iOS/Sources/iOSApp/iOSApp.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public struct iOSApp: App {
4646
.navigationViewStyle(.stack)
4747
}
4848
.observe { snapshot in
49-
print(snapshot.dotRepresentation())
49+
print(snapshot.graphDescription())
5050
}
5151
}
5252
}

Sources/Atoms/Snapshot.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public struct Snapshot: CustomStringConvertible {
4444
return cache?.value
4545
}
4646

47-
/// Returns a DOT language representation of dependency graph.
47+
/// Returns a DOT language representation of the dependency graph.
4848
///
4949
/// This method generates a string that represents
5050
/// the [DOT the graph description language](https://graphviz.org/doc/info/lang.html)
@@ -68,7 +68,7 @@ public struct Snapshot: CustomStringConvertible {
6868
/// ```
6969
///
7070
/// - Returns: A dependency graph represented in DOT the graph description language.
71-
public func dotRepresentation() -> String {
71+
public func graphDescription() -> String {
7272
guard !caches.keys.isEmpty else {
7373
return "digraph {}"
7474
}

Tests/AtomsTests/SnapshotTests.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ final class SnapshotTests: XCTestCase {
2727
XCTAssertNil(snapshot.lookup(atom1))
2828
}
2929

30-
func testDotRepresentationEmpty() {
30+
func testEmptyGraphDescription() {
3131
let snapshot = Snapshot(graph: Graph(), caches: [:], subscriptions: [:]) {}
3232

33-
XCTAssertEqual(snapshot.dotRepresentation(), "digraph {}")
33+
XCTAssertEqual(snapshot.graphDescription(), "digraph {}")
3434
}
3535

36-
func testDotRepresentation() {
36+
func testGraphDescription() {
3737
struct Value0: Hashable {}
3838
struct Value1: Hashable {}
3939
struct Value2: Hashable {}
@@ -76,7 +76,7 @@ final class SnapshotTests: XCTestCase {
7676
) {}
7777

7878
XCTAssertEqual(
79-
snapshot.dotRepresentation(),
79+
snapshot.graphDescription(),
8080
"""
8181
digraph {
8282
node [shape=box]

0 commit comments

Comments
 (0)