From 8f73346f48cf2886ec46bf1f756283c2077f72fd Mon Sep 17 00:00:00 2001 From: Christian Treffs Date: Fri, 21 Apr 2023 10:08:10 +0200 Subject: [PATCH 1/4] Fix nil image in tests --- Package.resolved | 10 +++++----- Tests/FirebladeGraphTests/TraversalTests.swift | 14 ++++++++------ 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/Package.resolved b/Package.resolved index ca6e509..20dc274 100644 --- a/Package.resolved +++ b/Package.resolved @@ -11,12 +11,12 @@ } }, { - "package": "SnapshotTesting", + "package": "swift-snapshot-testing", "repositoryURL": "https://github.com/pointfreeco/swift-snapshot-testing.git", "state": { "branch": null, - "revision": "114882386a815f4a2e6d8f2f7ee4857acd372438", - "version": "1.7.2" + "revision": "cef5b3f6f11781dd4591bdd1dd0a3d22bd609334", + "version": "1.11.0" } }, { @@ -24,8 +24,8 @@ "repositoryURL": "https://github.com/davecom/SwiftGraph.git", "state": { "branch": null, - "revision": "3e9ed26e380b40fcadf80ef5d588829ced251673", - "version": "3.0.0" + "revision": "76b5180a5cc32eda7f5236a756f4c1e0936311c6", + "version": "3.1.0" } } ] diff --git a/Tests/FirebladeGraphTests/TraversalTests.swift b/Tests/FirebladeGraphTests/TraversalTests.swift index 608f181..737847a 100644 --- a/Tests/FirebladeGraphTests/TraversalTests.swift +++ b/Tests/FirebladeGraphTests/TraversalTests.swift @@ -5,8 +5,7 @@ // Created by Christian Treffs on 22.08.19. // -import class XCTest.XCTestCase -import func XCTest.XCTAssertEqual +import XCTest import FirebladeGraph import struct Foundation.UUID import SnapshotTesting @@ -16,7 +15,7 @@ import SnapshotTesting final class TraversalTests: XCTestCase { typealias StringNode = Node - func testDescendLinearGraph() { + func testDescendLinearGraph() throws { let a = StringNode("a") let b = StringNode("b") let c = StringNode("c") @@ -47,12 +46,14 @@ final class TraversalTests: XCTestCase { let expected = [a, b, c, d, e, f, g, h, i, j].map { $0.content } XCTAssertEqual(result, expected) + let image = try XCTUnwrap(a.renderGraphAsImage()) + #if !os(Linux) - assertSnapshot(matching: a.renderGraphAsImage()!, as: .image) + assertSnapshot(matching: image, as: .image) #endif } - func testDescendSpreadingGraph() { + func testDescendSpreadingGraph() throws { let a = Node(0) let b = Node(1) let c = Node(2) @@ -85,8 +86,9 @@ final class TraversalTests: XCTestCase { let expected = [a, b, c, e, f, g, d, h, i, j].map { $0.content } XCTAssertEqual(result, expected) + let image = try XCTUnwrap(a.renderGraphAsImage()) #if !os(Linux) - assertSnapshot(matching: a.renderGraphAsImage()!, as: .image) + assertSnapshot(matching: image, as: .image) #endif } From 37be0193e551a11c30099e4133edb097ae5da872 Mon Sep 17 00:00:00 2001 From: Christian Treffs Date: Fri, 21 Apr 2023 10:10:12 +0200 Subject: [PATCH 2/4] Fix readme links --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 8b1b0fe..9617607 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,6 @@ [![Build Status](https://travis-ci.com/fireblade-engine/graph.svg?branch=master)](https://travis-ci.com/fireblade-engine/graph) [![license](https://img.shields.io/badge/license-MIT-brightgreen.svg)](LICENSE) -[![swift version](https://img.shields.io/badge/swift-5.2-brightgreen.svg)](#) -[![platforms](https://img.shields.io/badge/platforms-%20macOS%20|%20iOS%20|%20tvOS%20|%20watchOS%20|%20linux%20-brightgreen.svg)](#) This is a **lightweight**, **fast** and **easy to use** [directed acyclic graph (DAG)](https://en.wikipedia.org/wiki/Directed_acyclic_graph) implementation in Swift. It is developed and maintained as part of the [Fireblade Game Engine](https://github.com/fireblade-engine) project. @@ -96,7 +94,7 @@ rootNode.update() ## 🏷️ Versioning -We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](tags). +We use [SemVer](http://semver.org/) for versioning. For the versions available, see the tags on this repository. ## ✍️ Authors From 8b0124249bd30fb49ff5dc719f9ebc2ee7e7bbe9 Mon Sep 17 00:00:00 2001 From: Christian Treffs Date: Fri, 21 Apr 2023 10:12:07 +0200 Subject: [PATCH 3/4] Remove travis --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 9617607..7b32c5d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ # Fireblade Graph -[![Build Status](https://travis-ci.com/fireblade-engine/graph.svg?branch=master)](https://travis-ci.com/fireblade-engine/graph) [![license](https://img.shields.io/badge/license-MIT-brightgreen.svg)](LICENSE) This is a **lightweight**, **fast** and **easy to use** [directed acyclic graph (DAG)](https://en.wikipedia.org/wiki/Directed_acyclic_graph) implementation in Swift. From f1d728d3677857d6a6fad4c967c25ee74b1b5eff Mon Sep 17 00:00:00 2001 From: Christian Treffs Date: Fri, 21 Apr 2023 10:13:25 +0200 Subject: [PATCH 4/4] Remove contribs --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7b32c5d..ecc9f6c 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,7 @@ We use [SemVer](http://semver.org/) for versioning. For the versions available, * [Christian Treffs](https://github.com/ctreffs) -See also the list of [contributors](graphs/contributors) who participated in this project. +See also the list of contributors who participated in this project. ## 🔏 License