You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ParamsSource attribute doesn't work as expected #848
The properties marked with the ParamsSource attribute aren't set in the ExecutionValidatorBase.
This causes issues when this validator calls the GlobalSetup.
The property marked as this does work as expected (gets inited to the first listed value before calling the GlobalSetup method):
[Params(
typeof(BasicTestSet),
typeof(UnsafeTestSet),
typeof(SlowDeferredLinqTestSet),
typeof(FastLinqTestSet),
typeof(UnsafeLinqTestSet),
typeof(UnsafeParallelTestSet)
)]
public Type FilterType { get; set; }
The property marked as this doesn't work as expected - it remains null upon the GlobalSetup method call:
[ParamsSource(nameof(GetTestTypes))]
public Type FilterType { get; set; }
public static IEnumerable<Type> GetTestTypes() => new[] {typeof(BasicTestSet),
typeof(UnsafeTestSet),
typeof(SlowDeferredLinqTestSet),
typeof(FastLinqTestSet),
typeof(UnsafeLinqTestSet),
typeof(UnsafeParallelTestSet)};
@AndreyAkinshin I don't have time ;( I am finishing the CoreFX port ;)
@evilguest would you like to send a PR? you did a great job finding the source of the problem and now you are one step away from becoming a BenchmarkDotNet contributor!
Activity
AndreyAkinshin commentedon Aug 9, 2018
@evilguest thanks for the report!
@adamsitnik could you take a look?
adamsitnik commentedon Aug 9, 2018
@AndreyAkinshin I don't have time ;( I am finishing the CoreFX port ;)
@evilguest would you like to send a PR? you did a great job finding the source of the problem and now you are one step away from becoming a BenchmarkDotNet contributor!