xsimd icon indicating copy to clipboard operation
xsimd copied to clipboard

Unit tests should exercise constructors

Open HadrienG2 opened this issue 6 years ago • 1 comments

So, I tried to integrate #100 in my project to see if it solves the problem it's intended to solve, and I discovered a bunch of issues related to constructors of batch and batch_bool. This means that we don't yet have unit tests for them.

HadrienG2 avatar May 04 '18 09:05 HadrienG2

Constructors to be tested

batch_bool

  • Default constructor
  • Explicit broadcasting constructor from a bool
  • Constructor from a list of bools
  • Converting to inner type + copy constructor

batch

  • Default constructor
  • Explicit broadcasting constructor from a scalar
  • Constructor from a list of scalars
  • Constructor from a pointer (explicit, aligned, and unaligned)
  • Converting to inner type + copy constructor

HadrienG2 avatar May 04 '18 12:05 HadrienG2

For the record: constructor from no value, broadcast of a value and list of scalars are supported and tested. Constructor from aligned/unaligned memory is done from free-functions.

I don't quite understand what you mean by "Converting to inner type + copy constructor". Feel free to open a new issue for that one if you don't find the relevant call in the doc :-)

serge-sans-paille avatar Oct 14 '22 11:10 serge-sans-paille