Content-Length: 4123 | pFad | https://github.com/davecom/SwiftGraph/raw/refs/heads/master/Tests/SwiftGraphTests/CycleTests.swift

th: 4111 // // CycleTests.swift // SwiftGraph // // Copyright (c) 2017 David Kopec // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. import XCTest @testable import SwiftGraph class CycleTests: XCTestCase { let simpleGraph: UnweightedGraph = UnweightedGraph(vertices: ["A", "B", "C", "D"]) let fullyConnected: UnweightedGraph = UnweightedGraph(vertices: ["A", "B", "C", "D", "E"]) override func setUp() { super.setUp() // setup a graph with 5 fully connected vertices for from in 0.. Bool in left.0 == right.0 && left.1 == right.1 } if !elementsEqual { XCTFail("Arrays not equal: \(lhs), \(rhs)", line: line) } } } fileprivate extension Edge { var asTuple: (Int, Int) { return (u, v) } }








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/davecom/SwiftGraph/raw/refs/heads/master/Tests/SwiftGraphTests/CycleTests.swift

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy