Join Slack
Menu
Home
Archive
How to mock test an inline function?
# announcements
l
lynas
05/16/2019, 2:23 PM
How to mock test an inline function?
l
LeoColman
05/16/2019, 2:27 PM
It's impossible to mock inline functions, as they don't exist in bytecode
LeoColman
05/16/2019, 2:27 PM
They get inlined
LeoColman
05/16/2019, 2:27 PM
You must either mock the internals of the inline function (things inside the function)
LeoColman
05/16/2019, 2:28 PM
Or don't mock inline functions altogether, test their behavior and not how they do it
l
lynas
05/16/2019, 2:30 PM
ok
u
Uriel Salischiker
05/16/2019, 2:43 PM
(or dont inline them)
l
LeoColman
05/16/2019, 2:45 PM
Oh, yes, you may give up on inlining if you're not using inline-specific features (such as reified type parameters)
2175
Views
Open in Slack
Previous
Next
kotlinlang
A modern programming language that makes developers happier.
Powered by