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/README.md b/README.md index 8b1b0fe..ecc9f6c 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,6 @@ # 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) -[![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,13 +93,13 @@ 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 * [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 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 }