Closed janousch closed 4 years ago
The generic AssertEqual
looks a little esoteric to me, and I've got a few questions before we proceed with that:
CustomThunk
ensure that both types match, e.g. prevent users from pluggin in different types into Actual
and Expected
?Also, we've got compiler errors in our current project. Apperently, FProperty
, FObjectProperty
and FStrProperty
don't exist in 4.23? We should always ensure backwards compatibility with officially supported engine versions.
The tolerance looks promising, though :) Would you mind splitting that out into a dedicated feature branch as per our contribution guidelines and create a new pull request for that one?
If you want to use the same code for all unreal versions, this approach is not possible. FProperty is replacing UProperty in UE4.25. How about creating branches for the different unreal versions?
For the two points: To ensure that both types match the function needs to be modified. It could also support structs with same properties, but the function needs to be modified for that.
I'll create a new feature branch for the tolerance ;)
A little bit more generic than a template function. I also exposed the tolerance value for all float value comparisons.