Skip to content
New issue

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

Assert Almost Equal does not work for Arrays #187

Open
neilpate opened this issue Feb 23, 2024 · 2 comments
Open

Assert Almost Equal does not work for Arrays #187

neilpate opened this issue Feb 23, 2024 · 2 comments

Comments

@neilpate
Copy link

All the other comparison operations support an array input, but the Amost Equal does not.

image

@francois-normandin
Copy link
Collaborator

@neilpate I'm not terribly fond of adding more polymorphic VIs to account for all the use cases.

However, there are a couple things you can do to create nice reusable addons to Caraya Assert methods.
Here is an example for handling an array of inputs, while not using Variant inputs (and all the shenanigans that would be needed to ensure the inputs are actually "almost comparable". The technique allows you to wrap all the methods if you want, including changing formats or using classes/interfaces.

image

AssertAlmostEqualArray example.zip

@neilpate
Copy link
Author

neilpate commented Mar 4, 2024

Thanks @francois-normandin

I can completely believe what a pain managing all the polymorphic VIs is. In 20 years of LV dev I never mustered up the enthusiasm to create a single one!

I changed my test to not need this API, just thought I would mention it for completeness.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants