Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MyProject
- |-Sources
- | └MyProject
- | |-IPcalc.swift
- | └ main.swift
- |
- |-Tests
- | |-MyProjectTests
- | | └IPcalcTests.swift
- | └ LinuxMain.swift
- |
- └ Package.swift
- import XCTest
- @testable import IPcalc
- ...
- import XCTest
- @testable import IPcalcTests
- XCTMain([
- testCase(IPcalcTests.allTests),
- ])
- import PackageDescription
- let package = Package(
- name: "MyProject",
- products: [],
- dependencies: [],
- targets: [
- .target(
- name: "MyProject",
- dependencies: []),
- .testTarget(
- name: "MyProjectTests",
- dependencies: ["MyProject"]),
- ]
- )
- $ swift test
- Compile Swift Module 'MyProjectTests' (2 sources)
- /home/user/MyProject/Tests/MyProjectTests/IPcalcTests.swift:2:18: error: no such module 'IPcalc'
- @testable import IPcalc
Add Comment
Please, Sign In to add comment