We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some helpers to test constructof laws would be nice, similar to what we have in Accessors (https://github.com/JuliaObjects/Accessors.jl/blob/master/ext/AccessorsTestExt.jl). Basically,
function test_constructorof_laws(obj, args; cmp=(==)) ctor = constructorof(typeof(obj)) reconstructed = ctor(getfields(obj)...) @test cmp(obj, reconstructed) @test typeof(obj) == typeof(reconstructed) @test getfields(ctor(args...)) == args end
Best to put into a Test extension, so this should wait until #86 -related issues get resolved.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Some helpers to test constructof laws would be nice, similar to what we have in Accessors (https://github.com/JuliaObjects/Accessors.jl/blob/master/ext/AccessorsTestExt.jl).
Basically,
Best to put into a Test extension, so this should wait until #86 -related issues get resolved.
The text was updated successfully, but these errors were encountered: