Skip to content
This repository has been archived by the owner on Aug 10, 2021. It is now read-only.

Implementation of kotlin.test #1639

Closed
MarkusAmshove opened this issue May 30, 2018 · 4 comments
Closed

Implementation of kotlin.test #1639

MarkusAmshove opened this issue May 30, 2018 · 4 comments

Comments

@MarkusAmshove
Copy link

Hi,

I'm currently migrating a library from being JVM only to multiplatform and I'm also trying to implement a library for kotlin native.

I do have a dependency on kotlin.test and it is working like a charm with the -tr flag on compilation.

I've now stumbeld on the assertions assertSame and assertNotSame which don't seem to be implemented yet (Gradle output):

> Task :kluent-native:compileKonanKluent-nativeLinux FAILED
/home/markus/scm/Kluent/common/src/main/kotlin/org/amshove/kluent/Basic.kt:10:58: error: unresolved reference: assertSame
infix fun <T> T.shouldBe(expected: T?): T = this.apply { assertSame(expected, this) }

I'm currently using native 0.6, because of the same issue described in #1612 so I'm not sure if it would just work if I could use 0.7.
However I wasn't able to find the platform implementation for kotlin.test inside this native repo, could you guide me to the correct location so I can look it up in the future? :-)

@ilmat192
Copy link
Contributor

Hi @MarkusAmshove!

Thank you for the report. assertSame/assertNotSame are really not implemented in KN and we will fix that. As for the second question, the user API for KN's kotlin.test can be found here. If you are interested in implementation details, you may look at this package.

@olonho
Copy link
Contributor

olonho commented May 31, 2018

I have added those on 62c1a6d

@MarkusAmshove
Copy link
Author

MarkusAmshove commented May 31, 2018

Thanks for implementing it, I'll use that implementation in the future :-)

Edit: Nevermind on the different behavior, I forgot an overload :-)

@olonho
Copy link
Contributor

olonho commented May 31, 2018

Shall be fixed.

@olonho olonho closed this as completed May 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants