Sending Sequence values through test class

In reply to yogeshraut712:

The problem came from the randomize method in your sequence class. You can change by using “local::” from LRM:

18.7.1 local:: scope resolution
The randomize() with constraint block can reference both class properties and variables local to the method call. Unqualified names in an unrestricted in-lined constraint block are then resolved by searching first in the scope of the randomize() with object class followed by a search of the scope containing the method call—the local scope. The local:: qualifier modifies the resolution search order. When applied to an identifier within an in-line constraint, the local:: qualifier bypasses the scope of the [randomize() with object] class and resolves the identifier in the local scope.

And you code will be:


assert(tr.randomize() with {
  line==local::line;
  pixel==local::pixel;
  bytepix==local::bytepix;
  framerate==local::framerate;
  colorinfo==local::colorinfo;
  frame_field_video==local::frame_field_video;
})

Or you can change the variable name to make sure they are different between sequence and sequence_item.