Title
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
They get inlined
You must either mock the internals of the inline function (things inside the function)
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)