rokudev / unit-testing-framework

Tool for automating and testing Roku channels
Other
76 stars 55 forks source link

Improve base comparator method #37

Open eddiemf opened 5 years ago

eddiemf commented 5 years ago

The base comparator method currently breaks if you pass an associative array containing a node, because for some reason we can't directly compare arrays, AAs or nodes.

With the following changes, the base comparator will return an early false if it sees that both values have different types, and it will also compare node types using the isSameNode method available on nodes.

Some changes were also made to improve readability, removing needless repeated lines.

pawelhertman commented 4 years ago

@RokuDevTools @RokuRnD it's been over a year. Could you please at least take a look and reply?