caraya icon indicating copy to clipboard operation
caraya copied to clipboard

Add a new Assert to compare Variant Attributes

Open francois-normandin opened this issue 3 years ago • 3 comments

I recently came across a bunch of tests I wanted to write to verify that variant attributes were set. Instead of extracting the attributes and comparing arrays, it would be nice to have a node that directly compares the attributes, making complete abstraction of the value of the variant data on the wire.

francois-normandin avatar Mar 02 '21 13:03 francois-normandin

It is possible to compare variant attributes by comparing variants itself - so simple Equal Assert should be enough for it, isn't it?

kosist avatar Mar 02 '21 14:03 kosist

Actually, I'm interested in comparing only the attributes, for different objects. In the example below, two modules (inheriting from same class) have their attributes compared.

Values are different, but attributes match.

image

Edit: probably should be a "Logical AND" in the bottom comparison for "attribute found?".

francois-normandin avatar Mar 02 '21 14:03 francois-normandin

Starting with the "Assert wrapping" feature in 1.2, I can definitely create a wrapper for this functionality... just like anyone that wants to use a map comparison in LV2019+

francois-normandin avatar Mar 02 '21 15:03 francois-normandin