Skip to content

Commit 2b5ed3f

Browse files
committed
intake the Testing_ module, which was formely part of swift-grammar and is now used only by this project
1 parent 0181228 commit 2b5ed3f

32 files changed

+1309
-36
lines changed

Package.resolved

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -79,21 +79,21 @@ let package:Package = .init(
7979
],
8080
dependencies: [
8181
.package(url: "https://github.com/tayloraswift/swift-bson", .upToNextMinor(
82-
from: "0.9.0")),
82+
from: "1.0.0")),
8383
.package(url: "https://github.com/tayloraswift/swift-dom", .upToNextMinor(
8484
from: "1.1.0")),
8585
.package(url: "https://github.com/tayloraswift/swift-grammar", .upToNextMinor(
86-
from: "0.4.0")),
86+
from: "0.5.0")),
8787
.package(url: "https://github.com/tayloraswift/swift-hash", .upToNextMinor(
8888
from: "0.7.1")),
8989
.package(url: "https://github.com/tayloraswift/swift-ip", .upToNextMinor(
90-
from: "0.3.2")),
90+
from: "0.3.3")),
9191
.package(url: "https://github.com/tayloraswift/swift-json", .upToNextMinor(
92-
from: "1.1.0")),
92+
from: "1.1.2")),
9393
.package(url: "https://github.com/tayloraswift/swift-mongodb", .upToNextMinor(
94-
from: "0.29.1")),
94+
from: "0.29.2")),
9595
.package(url: "https://github.com/tayloraswift/swift-png", .upToNextMinor(
96-
from: "4.4.8")),
96+
from: "4.4.9")),
9797
.package(url: "https://github.com/tayloraswift/swift-ucf", .upToNextMinor(
9898
from: "0.1.0")),
9999
.package(url: "https://github.com/tayloraswift/swift-unixtime", .upToNextMinor(
@@ -107,10 +107,8 @@ let package:Package = .init(
107107
.package(url: "https://github.com/apple/swift-collections", .upToNextMinor(
108108
from: "1.1.1")),
109109

110-
.package(url: "https://github.com/apple/swift-nio",
111-
from: "2.68.0"),
112-
.package(url: "https://github.com/apple/swift-nio-ssl",
113-
from: "2.27.0"),
110+
.package(url: "https://github.com/apple/swift-nio", from: "2.79.0"),
111+
.package(url: "https://github.com/apple/swift-nio-ssl", from: "2.27.0"),
114112

115113
.package(url: "https://github.com/apple/swift-nio-http2", .upToNextMinor(
116114
from: "1.33.0")),
@@ -442,6 +440,11 @@ let package:Package = .init(
442440

443441
.target(name: "TopologicalSorting"),
444442

443+
.target(name: "Testing_",
444+
dependencies: [
445+
.product(name: "Atomics", package: "swift-atomics"),
446+
]),
447+
445448
.target(name: "UA",
446449
dependencies: [
447450
.product(name: "Grammar", package: "swift-grammar"),
@@ -628,19 +631,19 @@ let package:Package = .init(
628631
dependencies: [
629632
.target(name: "PackageMetadata"),
630633
.target(name: "System_"),
631-
.product(name: "Testing_", package: "swift-grammar"),
634+
.target(name: "Testing_"),
632635
]),
633636

634637
.executableTarget(name: "S3Tests",
635638
dependencies: [
636639
.target(name: "S3Client"),
637-
.product(name: "Testing_", package: "swift-grammar"),
640+
.target(name: "Testing_"),
638641
]),
639642

640643
.executableTarget(name: "SemanticVersionTests",
641644
dependencies: [
642645
.target(name: "SemanticVersions"),
643-
.product(name: "Testing_", package: "swift-grammar"),
646+
.target(name: "Testing_"),
644647
]),
645648

646649
.testTarget(name: "SymbolGraphValidationTests",
@@ -652,13 +655,13 @@ let package:Package = .init(
652655
.executableTarget(name: "SymbolGraphBuilderTests",
653656
dependencies: [
654657
.target(name: "SymbolGraphBuilder"),
655-
.product(name: "Testing_", package: "swift-grammar"),
658+
.target(name: "Testing_"),
656659
]),
657660

658661
.executableTarget(name: "SymbolGraphCompilerTests",
659662
dependencies: [
660663
.target(name: "SymbolGraphBuilder"),
661-
.product(name: "Testing_", package: "swift-grammar"),
664+
.target(name: "Testing_"),
662665
]),
663666

664667
.testTarget(name: "SymbolGraphLinkerTests",
@@ -671,25 +674,25 @@ let package:Package = .init(
671674
dependencies: [
672675
.target(name: "SymbolGraphParts"),
673676
.target(name: "System_"),
674-
.product(name: "Testing_", package: "swift-grammar"),
677+
.target(name: "Testing_"),
675678
]),
676679

677680
.executableTarget(name: "SymbolGraphTests",
678681
dependencies: [
679682
.target(name: "SymbolGraphs"),
680-
.product(name: "Testing_", package: "swift-grammar"),
683+
.target(name: "Testing_"),
681684
]),
682685

683686
.executableTarget(name: "SymbolTests",
684687
dependencies: [
685688
.target(name: "Symbols"),
686-
.product(name: "Testing_", package: "swift-grammar"),
689+
.target(name: "Testing_"),
687690
]),
688691

689692
.executableTarget(name: "SystemTests",
690693
dependencies: [
691694
.target(name: "System_"),
692-
.product(name: "Testing_", package: "swift-grammar"),
695+
.target(name: "Testing_"),
693696
],
694697
exclude:
695698
[
@@ -698,14 +701,14 @@ let package:Package = .init(
698701

699702
.executableTarget(name: "TopologicalSortingTests",
700703
dependencies: [
704+
.target(name: "Testing_"),
701705
.target(name: "TopologicalSorting"),
702-
.product(name: "Testing_", package: "swift-grammar"),
703706
]),
704707

705708
.executableTarget(name: "UATests",
706709
dependencies: [
710+
.target(name: "Testing_"),
707711
.target(name: "UA"),
708-
.product(name: "Testing_", package: "swift-grammar"),
709712
]),
710713

711714
.testTarget(name: "UnidocDBTests",
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
infix operator ==? :ComparisonPrecedence
2+
3+
/// Compares two elements for equality.
4+
@inlinable public
5+
func ==? <T>(lhs:T, rhs:T) -> Assertion.ExpectedBinary<T, Assertion.Equal>?
6+
where T:Equatable
7+
{
8+
if lhs == rhs
9+
{
10+
return nil
11+
}
12+
else
13+
{
14+
return .init(lhs, rhs)
15+
}
16+
}
17+
extension Assertion
18+
{
19+
public
20+
enum Equal:BinaryAssertionOperator
21+
{
22+
public
23+
static var symbol:String { "==" }
24+
}
25+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
infix operator >? :ComparisonPrecedence
2+
3+
/// Compares two elements for equality.
4+
@inlinable public
5+
func >? <T>(lhs:T, rhs:T) -> Assertion.ExpectedBinary<T, Assertion.GreaterThan>?
6+
where T:Comparable
7+
{
8+
if lhs > rhs
9+
{
10+
return nil
11+
}
12+
else
13+
{
14+
return .init(lhs, rhs)
15+
}
16+
}
17+
extension Assertion
18+
{
19+
public
20+
enum GreaterThan:BinaryAssertionOperator
21+
{
22+
public
23+
static var symbol:String { ">" }
24+
}
25+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
infix operator >=? :ComparisonPrecedence
2+
3+
/// Compares two elements for equality.
4+
@inlinable public
5+
func >=? <T>(lhs:T, rhs:T) -> Assertion.ExpectedBinary<T, Assertion.GreaterThanEqual>?
6+
where T:Comparable
7+
{
8+
if lhs >= rhs
9+
{
10+
return nil
11+
}
12+
else
13+
{
14+
return .init(lhs, rhs)
15+
}
16+
}
17+
extension Assertion
18+
{
19+
public
20+
enum GreaterThanEqual:BinaryAssertionOperator
21+
{
22+
public
23+
static var symbol:String { ">=" }
24+
}
25+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
infix operator <? :ComparisonPrecedence
2+
3+
/// Compares two elements for equality.
4+
@inlinable public
5+
func <? <T>(lhs:T, rhs:T) -> Assertion.ExpectedBinary<T, Assertion.LessThan>?
6+
where T:Comparable
7+
{
8+
if lhs < rhs
9+
{
10+
return nil
11+
}
12+
else
13+
{
14+
return .init(lhs, rhs)
15+
}
16+
}
17+
extension Assertion
18+
{
19+
public
20+
enum LessThan:BinaryAssertionOperator
21+
{
22+
public
23+
static var symbol:String { "<" }
24+
}
25+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
infix operator <=? :ComparisonPrecedence
2+
3+
/// Compares two elements for equality.
4+
@inlinable public
5+
func <=? <T>(lhs:T, rhs:T) -> Assertion.ExpectedBinary<T, Assertion.LessThanEqual>?
6+
where T:Comparable
7+
{
8+
if lhs <= rhs
9+
{
10+
return nil
11+
}
12+
else
13+
{
14+
return .init(lhs, rhs)
15+
}
16+
}
17+
extension Assertion
18+
{
19+
public
20+
enum LessThanEqual:BinaryAssertionOperator
21+
{
22+
public
23+
static var symbol:String { "<=" }
24+
}
25+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
infix operator !=? :ComparisonPrecedence
2+
3+
/// Compares two elements for equality.
4+
@inlinable public
5+
func !=? <T>(lhs:T, rhs:T) -> Assertion.ExpectedBinary<T, Assertion.NotEqual>?
6+
where T:Equatable
7+
{
8+
if lhs != rhs
9+
{
10+
return nil
11+
}
12+
else
13+
{
14+
return .init(lhs, rhs)
15+
}
16+
}
17+
extension Assertion
18+
{
19+
public
20+
enum NotEqual:BinaryAssertionOperator
21+
{
22+
public
23+
static var symbol:String { "!=" }
24+
}
25+
}

0 commit comments

Comments
 (0)