$ swift test
Compiling Swift Module 'CardTestSuite' (3 sources)
Linking .build/debug/PlayingCard.xctest/Contents/MacOS/PlayingCard
Undefined symbols for architecture x86_64:
"__TFO11PlayingCard4RankCfT8rawValueSi_GSqS0__", referenced from:
__TFFC13CardTestSuite8RankTest22testRankStringEqualityFT_T_U_FSiGSqO11PlayingCard4Rank_ in RankTests.swift.o
"__TFV11PlayingCard4CardCfT4rankOS_4Rank4suitOS_4Suit_S0_", referenced from:
__TFC13CardTestSuite8CardTest14testCardSinglefT_T_ in CardTests.swift.o
__TFC13CardTestSuite8CardTest22testCardStringEqualityfT_T_ in CardTests.swift.o
"__TMO11PlayingCard4Rank", referenced from:
__TFC13CardTestSuite8RankTest22testRankStringEqualityfT_T_ in RankTests.swift.o
__TMaGSqO11PlayingCard4Rank_ in RankTests.swift.o
__TFFC13CardTestSuite8RankTest22testRankStringEqualityFT_T_U1_FO11PlayingCard4RankSi in RankTests.swift.o
__TMaGSaO11PlayingCard4Rank_ in RankTests.swift.o
__TFFC13CardTestSuite8RankTest22testRankStringEqualityFT_T_u_KzT_GSqSS_ in RankTests.swift.o
__TFFC13CardTestSuite8RankTest22testRankStringEqualityFT_T_u1_KzT_GSqSS_ in RankTests.swift.o
__TFFC13CardTestSuite8RankTest22testRankStringEqualityFT_T_u3_KzT_GSqSS_ in RankTests.swift.o
...
"__TMO11PlayingCard4Suit", referenced from:
__TFFC13CardTestSuite8SuitTest22testSuitStringEqualityFT_T_u_KzT_GSqSS_ in SuitTests.swift.o
__TFFC13CardTestSuite8SuitTest22testSuitStringEqualityFT_T_u1_KzT_GSqSS_ in SuitTests.swift.o
__TFFC13CardTestSuite8SuitTest22testSuitStringEqualityFT_T_u3_KzT_GSqSS_ in SuitTests.swift.o
__TFFC13CardTestSuite8SuitTest22testSuitStringEqualityFT_T_u5_KzT_GSqSS_ in SuitTests.swift.o
__TFC13CardTestSuite8SuitTest18testSuitComparablefT_T_ in SuitTests.swift.o
"__TMV11PlayingCard4Card", referenced from:
__TFC13CardTestSuite8CardTest14testCardSinglefT_T_ in CardTests.swift.o
__TFFC13CardTestSuite8CardTest22testCardStringEqualityFT_T_u_KzT_GSqSS_ in CardTests.swift.o
__TFFC13CardTestSuite8CardTest22testCardStringEqualityFT_T_u1_KzT_GSqSS_ in CardTests.swift.o
__TFFC13CardTestSuite8CardTest22testCardStringEqualityFT_T_u3_KzT_GSqSS_ in CardTests.swift.o
"__TWPO11PlayingCard4Ranks10ComparableS_", referenced from:
__TFC13CardTestSuite8RankTest18testRankComparablefT_T_ in RankTests.swift.o
"__TWPO11PlayingCard4Suits10ComparableS_", referenced from:
__TFC13CardTestSuite8SuitTest18testSuitComparablefT_T_ in SuitTests.swift.o
"__TWPV11PlayingCard4Cards10ComparableS_", referenced from:
__TFC13CardTestSuite8CardTest14testCardSinglefT_T_ in CardTests.swift.o
"__TWPV11PlayingCard4Cards9EquatableS_", referenced from:
__TFC13CardTestSuite8CardTest14testCardSinglefT_T_ in CardTests.swift.o
ld: symbol(s) not found for architecture x86_64
<unknown>:0: error: link command failed with exit code 1 (use -v to see invocation)
<unknown>:0: error: build had 1 command failures
error: exit(1): /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2016-04-12-a.xctoolchain/usr/bin/swift-build-tool -f /Volumes/Joses_Stuff/github/Swift\ OSS/example-package-playingcard/.build/debug.yaml test
···
On Apr 14, 2016, at 10:32 PM, Jose Cheyo Jimenez <cheyo@masters3d.com> wrote:
Hi Everybody,
I am trying to build the example-packages but I am getting errors once I try to run test
$ swift test
Compiling Swift Module 'CardTestSuite' (3 sources)
Linking .build/debug/PlayingCard.xctest/Contents/MacOS/PlayingCard
Undefined symbols for architecture x86_64:
"__TFO11PlayingCard4RankCfT8rawValueSi_GSqS0__", referenced from:
__TFFC13CardTestSuite8RankTest22testRankStringEqualityFT_T_U_FSiGSqO11PlayingCard4Rank_ in RankTests.swift.o
"__TFV11PlayingCard4CardCfT4rankOS_4Rank4suitOS_4Suit_S0_", referenced from:
__TFC13CardTestSuite8CardTest14testCardSinglefT_T_ in CardTests.swift.o
__TFC13CardTestSuite8CardTest22testCardStringEqualityfT_T_ in CardTests.swift.o
"__TMO11PlayingCard4Rank", referenced from:
__TFC13CardTestSuite8RankTest22testRankStringEqualityfT_T_ in RankTests.swift.o
__TMaGSqO11PlayingCard4Rank_ in RankTests.swift.o
__TFFC13CardTestSuite8RankTest22testRankStringEqualityFT_T_U1_FO11PlayingCard4RankSi in RankTests.swift.o
__TMaGSaO11PlayingCard4Rank_ in RankTests.swift.o
__TFFC13CardTestSuite8RankTest22testRankStringEqualityFT_T_u_KzT_GSqSS_ in RankTests.swift.o
__TFFC13CardTestSuite8RankTest22testRankStringEqualityFT_T_u1_KzT_GSqSS_ in RankTests.swift.o
__TFFC13CardTestSuite8RankTest22testRankStringEqualityFT_T_u3_KzT_GSqSS_ in RankTests.swift.o
...
"__TMO11PlayingCard4Suit", referenced from:
__TFFC13CardTestSuite8SuitTest22testSuitStringEqualityFT_T_u_KzT_GSqSS_ in SuitTests.swift.o
__TFFC13CardTestSuite8SuitTest22testSuitStringEqualityFT_T_u1_KzT_GSqSS_ in SuitTests.swift.o
__TFFC13CardTestSuite8SuitTest22testSuitStringEqualityFT_T_u3_KzT_GSqSS_ in SuitTests.swift.o
__TFFC13CardTestSuite8SuitTest22testSuitStringEqualityFT_T_u5_KzT_GSqSS_ in SuitTests.swift.o
__TFC13CardTestSuite8SuitTest18testSuitComparablefT_T_ in SuitTests.swift.o
"__TMV11PlayingCard4Card", referenced from:
__TFC13CardTestSuite8CardTest14testCardSinglefT_T_ in CardTests.swift.o
__TFFC13CardTestSuite8CardTest22testCardStringEqualityFT_T_u_KzT_GSqSS_ in CardTests.swift.o
__TFFC13CardTestSuite8CardTest22testCardStringEqualityFT_T_u1_KzT_GSqSS_ in CardTests.swift.o
__TFFC13CardTestSuite8CardTest22testCardStringEqualityFT_T_u3_KzT_GSqSS_ in CardTests.swift.o
"__TWPO11PlayingCard4Ranks10ComparableS_", referenced from:
__TFC13CardTestSuite8RankTest18testRankComparablefT_T_ in RankTests.swift.o
"__TWPO11PlayingCard4Suits10ComparableS_", referenced from:
__TFC13CardTestSuite8SuitTest18testSuitComparablefT_T_ in SuitTests.swift.o
"__TWPV11PlayingCard4Cards10ComparableS_", referenced from:
__TFC13CardTestSuite8CardTest14testCardSinglefT_T_ in CardTests.swift.o
"__TWPV11PlayingCard4Cards9EquatableS_", referenced from:
__TFC13CardTestSuite8CardTest14testCardSinglefT_T_ in CardTests.swift.o
ld: symbol(s) not found for architecture x86_64
<unknown>:0: error: link command failed with exit code 1 (use -v to see invocation)
<unknown>:0: error: build had 1 command failures
error: exit(1): /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2016-04-12-a.xctoolchain/usr/bin/swift-build-tool -f /Volumes/Joses_Stuff/github/Swift\ OSS/example-package-playingcard/.build/debug.yaml test
On Apr 14, 2016, at 10:32 PM, Jose Cheyo Jimenez <cheyo@masters3d.com <mailto:cheyo@masters3d.com>> wrote:
Hi Everybody,
I am trying to build the example-packages but I am getting errors once I try to run test
The package manager will add an implicit dependency between the test suite and the target it assumes it is trying to test. In your case, however, your package module is named PlayingCard, and your test module is name CardTests (not PlayingCardTests) so it doesn't find that dependency. This leaves it without any dependencies, and so the link fails. That the build of the individual test files doesn't fail is because we don't yet have a good way to enforce your Swift code only see what it is allowed to.
If you do:
$ git mv Tests/Card Tests/PlayingCard
$ TOOLCHAINS=swift swift build
$ TOOLCHAINS=swift swift test
then it should work.
- Daniel
···
On Apr 20, 2016, at 5:05 PM, Jose Cheyo Jimenez via swift-users <swift-users@swift.org> wrote:
$ swift test
Compiling Swift Module 'CardTestSuite' (3 sources)
Linking .build/debug/PlayingCard.xctest/Contents/MacOS/PlayingCard
Undefined symbols for architecture x86_64:
"__TFO11PlayingCard4RankCfT8rawValueSi_GSqS0__", referenced from:
__TFFC13CardTestSuite8RankTest22testRankStringEqualityFT_T_U_FSiGSqO11PlayingCard4Rank_ in RankTests.swift.o
"__TFV11PlayingCard4CardCfT4rankOS_4Rank4suitOS_4Suit_S0_", referenced from:
__TFC13CardTestSuite8CardTest14testCardSinglefT_T_ in CardTests.swift.o
__TFC13CardTestSuite8CardTest22testCardStringEqualityfT_T_ in CardTests.swift.o
"__TMO11PlayingCard4Rank", referenced from:
__TFC13CardTestSuite8RankTest22testRankStringEqualityfT_T_ in RankTests.swift.o
__TMaGSqO11PlayingCard4Rank_ in RankTests.swift.o
__TFFC13CardTestSuite8RankTest22testRankStringEqualityFT_T_U1_FO11PlayingCard4RankSi in RankTests.swift.o
__TMaGSaO11PlayingCard4Rank_ in RankTests.swift.o
__TFFC13CardTestSuite8RankTest22testRankStringEqualityFT_T_u_KzT_GSqSS_ in RankTests.swift.o
__TFFC13CardTestSuite8RankTest22testRankStringEqualityFT_T_u1_KzT_GSqSS_ in RankTests.swift.o
__TFFC13CardTestSuite8RankTest22testRankStringEqualityFT_T_u3_KzT_GSqSS_ in RankTests.swift.o
...
"__TMO11PlayingCard4Suit", referenced from:
__TFFC13CardTestSuite8SuitTest22testSuitStringEqualityFT_T_u_KzT_GSqSS_ in SuitTests.swift.o
__TFFC13CardTestSuite8SuitTest22testSuitStringEqualityFT_T_u1_KzT_GSqSS_ in SuitTests.swift.o
__TFFC13CardTestSuite8SuitTest22testSuitStringEqualityFT_T_u3_KzT_GSqSS_ in SuitTests.swift.o
__TFFC13CardTestSuite8SuitTest22testSuitStringEqualityFT_T_u5_KzT_GSqSS_ in SuitTests.swift.o
__TFC13CardTestSuite8SuitTest18testSuitComparablefT_T_ in SuitTests.swift.o
"__TMV11PlayingCard4Card", referenced from:
__TFC13CardTestSuite8CardTest14testCardSinglefT_T_ in CardTests.swift.o
__TFFC13CardTestSuite8CardTest22testCardStringEqualityFT_T_u_KzT_GSqSS_ in CardTests.swift.o
__TFFC13CardTestSuite8CardTest22testCardStringEqualityFT_T_u1_KzT_GSqSS_ in CardTests.swift.o
__TFFC13CardTestSuite8CardTest22testCardStringEqualityFT_T_u3_KzT_GSqSS_ in CardTests.swift.o
"__TWPO11PlayingCard4Ranks10ComparableS_", referenced from:
__TFC13CardTestSuite8RankTest18testRankComparablefT_T_ in RankTests.swift.o
"__TWPO11PlayingCard4Suits10ComparableS_", referenced from:
__TFC13CardTestSuite8SuitTest18testSuitComparablefT_T_ in SuitTests.swift.o
"__TWPV11PlayingCard4Cards10ComparableS_", referenced from:
__TFC13CardTestSuite8CardTest14testCardSinglefT_T_ in CardTests.swift.o
"__TWPV11PlayingCard4Cards9EquatableS_", referenced from:
__TFC13CardTestSuite8CardTest14testCardSinglefT_T_ in CardTests.swift.o
ld: symbol(s) not found for architecture x86_64
<unknown>:0: error: link command failed with exit code 1 (use -v to see invocation)
<unknown>:0: error: build had 1 command failures
error: exit(1): /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2016-04-12-a.xctoolchain/usr/bin/swift-build-tool -f /Volumes/Joses_Stuff/github/Swift\ OSS/example-package-playingcard/.build/debug.yaml test
On Apr 14, 2016, at 10:32 PM, Jose Cheyo Jimenez <cheyo@masters3d.com <mailto:cheyo@masters3d.com>> wrote:
Hi Everybody,
I am trying to build the example-packages but I am getting errors once I try to run test