Unit tests for the Swift project

Hey Swift devs,
So I have been able to clone the Swift project from Github and built the project successfully.I've just added some code to the Swift std library and I want to test the added functionality by writing some unit tests.But I'm stuck with going about doing this.How can I write unit tests for the Swift standard library?
Thank you!
Regards,Alwyn

Take a look at test/stdlib/. Unit tests use the SwiftUnittest framework, you should be able to get started by looking at existing examples.

Slava

···

On Sep 12, 2017, at 5:35 AM, Alwyn Concessao via swift-dev <swift-dev@swift.org> wrote:

Hey Swift devs,

So I have been able to clone the Swift project from Github and built the project successfully.I've just added some code to the Swift std library and I want to test the added functionality by writing some unit tests.But I'm stuck with going about doing this.How can I write unit tests for the Swift standard library?

Thank you!

Regards,
Alwyn
_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev

Okay.I see a couple of Swift files and .gyb files inside test/stdlib.I've made changes to the RangeReplaceableCollection protocol of the Swift stdlib.How can I write unit tests for that?Can I generate an Xcode project for the unit test files?

You can run unit tests by using build-script for example,

./utils/build-script -T

You can also run lit.py directly to only run selected tests. See docs/Testing.md for details.

Slava

···

On Sep 12, 2017, at 11:29 PM, Alwyn Concessao <alsav196@yahoo.com> wrote:

Thank you.

Regards,
Alwyn

On Wednesday, 13 September 2017, 7:39:08 AM IST, Slava Pestov <spestov@apple.com> wrote:

Take a look at test/stdlib/. Unit tests use the SwiftUnittest framework, you should be able to get started by looking at existing examples.

Slava

On Sep 12, 2017, at 5:35 AM, Alwyn Concessao via swift-dev <swift-dev@swift.org <mailto:swift-dev@swift.org>> wrote:

Hey Swift devs,

So I have been able to clone the Swift project from Github and built the project successfully.I've just added some code to the Swift std library and I want to test the added functionality by writing some unit tests.But I'm stuck with going about doing this.How can I write unit tests for the Swift standard library?

Thank you!

Regards,
Alwyn
_______________________________________________
swift-dev mailing list
swift-dev@swift.org <mailto:swift-dev@swift.org>
https://lists.swift.org/mailman/listinfo/swift-dev