Skip to content

Commit

Permalink
fix tests for both modules
Browse files Browse the repository at this point in the history
  • Loading branch information
mattpolzin committed Sep 24, 2023
1 parent 109e1a2 commit 56475ff
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import XCTest
import OpenAPIKit30
import OpenAPIReflection
import OpenAPIReflection30

class AnyJSONCaseIterableTests: XCTestCase {
func test_CodableToAllCases() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//

import XCTest
@testable import OpenAPIReflection
@testable import OpenAPIReflection30

final class GenericOpenAPISchemaInternalTests: XCTestCase {
func test_reencodedSchemaGuess() throws {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import XCTest
import OpenAPIKit30
import OpenAPIReflection
import OpenAPIReflection30
import Sampleable

final class GenericOpenAPISchemaTests: XCTestCase {
Expand Down Expand Up @@ -459,7 +459,7 @@ extension GenericOpenAPISchemaTests {
static let sample: Self = .init(stringValue: "hello")

static func openAPISchema(using encoder: JSONEncoder) throws -> JSONSchema {
try OpenAPIReflection.genericOpenAPISchemaGuess(for: sample, using: encoder)
try OpenAPIReflection30.genericOpenAPISchemaGuess(for: sample, using: encoder)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import XCTest
import Foundation
import OpenAPIKit30
import OpenAPIReflection
import OpenAPIReflection30
import Sampleable

final class SchemaWithExampleTests: XCTestCase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

import XCTest
import Foundation
import OpenAPIReflection
import OpenAPIKit30
import OpenAPIReflection30

class SwiftPrimitiveTypesTests: XCTestCase {
func test_OptionalCaseIterableNodeAllCases() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//

import XCTest
import OpenAPIKit30
import OpenAPIKit
import OpenAPIReflection

class AnyJSONCaseIterableTests: XCTestCase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//

import XCTest
import OpenAPIKit30
import OpenAPIKit
import OpenAPIReflection
import Sampleable

Expand Down
8 changes: 4 additions & 4 deletions Tests/OpenAPIReflectionTests/SchemaWithExampleTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import XCTest
import Foundation
import OpenAPIKit30
import OpenAPIKit
import OpenAPIReflection
import Sampleable

Expand Down Expand Up @@ -45,13 +45,13 @@ final class SchemaWithExampleTests: XCTestCase {
expectedSchema.objectContext
)

XCTAssertNotNil(schemaGuess.example)
XCTAssertFalse(schemaGuess.examples.isEmpty)

// equality checks on AnyCodable are finicky but
// they compare equally when encoded to data.
XCTAssertEqual(
try testEncoder.encode(schemaGuess.example),
try testEncoder.encode(expectedSchema.example)
try testEncoder.encode(schemaGuess.examples),
try testEncoder.encode(expectedSchema.examples)
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import XCTest
import Foundation
import OpenAPIReflection
import OpenAPIKit30
import OpenAPIKit

class SwiftPrimitiveTypesTests: XCTestCase {
func test_OptionalCaseIterableNodeAllCases() {
Expand Down

0 comments on commit 56475ff

Please sign in to comment.