File tree 4 files changed +31
-14
lines changed
4 files changed +31
-14
lines changed Original file line number Diff line number Diff line change 1
- // swift-tools-version:4.0
1
+ // swift-tools-version:5.5
2
+ // The swift-tools-version declares the minimum version of Swift required to build this package.
3
+
2
4
import PackageDescription
3
5
4
- let package = Package ( name: " TweetNacl " , products: [ . library( name: " TweetNacl " , targets: [ " TweetNacl " ] ) ] ,
5
- targets: [
6
- . target( name: " CTweetNacl " ) ,
7
- . target( name: " TweetNacl " , dependencies: [ " CTweetNacl " ] ) ,
8
- . testTarget( name: " TweetNaclTests " , dependencies: [ " TweetNacl " ] ) ,
9
- ] ,
10
- swiftLanguageVersions: [ 4 ] )
6
+ let package = Package (
7
+ name: " TweetNacl " ,
8
+ products: [
9
+ . library(
10
+ name: " TweetNacl " ,
11
+ targets: [ " TweetNacl " ] ) ,
12
+ ] ,
13
+ dependencies: [ ] ,
14
+ targets: [
15
+ . target( name: " CTweetNacl " ) ,
16
+ . target(
17
+ name: " TweetNacl " ,
18
+ dependencies: [ " CTweetNacl " ] ) ,
19
+ . testTarget(
20
+ name: " TweetNaclTests " ,
21
+ dependencies: [ " TweetNacl " ] ,
22
+ resources: [
23
+ . process( " SecretboxTestData.json " ) ,
24
+ . process( " BoxTestData.json " ) ,
25
+ . process( " ScalarMultiTestData.json " ) ,
26
+ . process( " SignTestData.json " )
27
+ ]
28
+ ) ,
29
+ ]
30
+ )
Original file line number Diff line number Diff line change @@ -48,8 +48,7 @@ class NaclBox_Test: XCTestCase {
48
48
49
49
let testSuite = XCTestSuite ( name: NSStringFromClass ( self ) )
50
50
51
- let testBundle = Bundle ( for: NaclBox_Test . self)
52
- let fileURL = testBundle. url ( forResource: " BoxTestData " , withExtension: " json " )
51
+ let fileURL = Bundle . module. url ( forResource: " BoxTestData " , withExtension: " json " )
53
52
let fileData = try ! Data ( contentsOf: fileURL!)
54
53
let json = try ! JSONSerialization . jsonObject ( with: fileData, options: [ ] )
55
54
let arrayOfData = json as! [ Array < String > ]
Original file line number Diff line number Diff line change @@ -77,8 +77,7 @@ class NaclScalarMulti_Tests: XCTestCase {
77
77
78
78
let testSuite = XCTestSuite ( name: NSStringFromClass ( self ) )
79
79
80
- let testBundle = Bundle ( for: NaclSecretbox_Tests . self)
81
- let fileURL = testBundle. url ( forResource: " ScalarMultiTestData " , withExtension: " json " )
80
+ let fileURL = Bundle . module. url ( forResource: " ScalarMultiTestData " , withExtension: " json " )
82
81
let fileData = try ! Data ( contentsOf: fileURL!)
83
82
let json = try ! JSONSerialization . jsonObject ( with: fileData, options: [ ] )
84
83
let arrayOfData = json as! [ Array < String > ]
Original file line number Diff line number Diff line change @@ -51,8 +51,7 @@ class NaclSecretbox_Tests: XCTestCase {
51
51
52
52
let testSuite = XCTestSuite ( name: NSStringFromClass ( self ) )
53
53
54
- let testBundle = Bundle ( for: NaclSecretbox_Tests . self)
55
- let fileURL = testBundle. url ( forResource: " SecretboxTestData " , withExtension: " json " )
54
+ let fileURL = Bundle . module. url ( forResource: " SecretboxTestData " , withExtension: " json " )
56
55
let fileData = try ! Data ( contentsOf: fileURL!)
57
56
let jsonDecoder = JSONDecoder ( )
58
57
let arrayOfData = try ! jsonDecoder. decode ( [ [ String ] ] . self, from: fileData)
You can’t perform that action at this time.
0 commit comments