Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
packed_matrix_test.cc File Reference

Tests of Packed_Row and Packed_Matrix by classes of cases. More...

#include <tpl_packed_matrix.H>
#include <gtest/gtest.h>
#include <array>
#include <compare>
#include <cstddef>
#include <cstdint>
#include <limits>
#include <random>
#include <stdexcept>
#include <string>
#include <type_traits>
#include <utility>
#include <tpl_array.H>
Include dependency graph for packed_matrix_test.cc:

Go to the source code of this file.

Concepts

concept  @1017::Makes
 Whether a row can be built with make() from values of the given types.
 
concept  @1017::Fast_Makes
 Whether a row can be built with fast_make() from values of the given types.
 
concept  @1017::Row_Of_Takes
 Whether Packed_Row_Of takes a value as its columns.
 
concept  @1017::Matrix_Of_Takes
 Whether Packed_Matrix_Of takes a value as its columns.
 
concept  @1017::Columns_At_Gives_A_Row
 Whether Columns_At gives a row for a value, with no constraint in front of it.
 

Detailed Description

Tests of Packed_Row and Packed_Matrix by classes of cases.

The oracle is a plain matrix of std::int64_t, which knows nothing of bits. The dimensions and what covers each one:

  • Width of a column: 0, 1, 2 to 62, 63 and 64 bits, with and without sign. PackedRowWidths sweeps every width, between two guard columns and alone in its row.
  • Width of a row: one word of 8, 16, 32 or 64 bits, exactly full and one bit over, and several words. The schemas of the typed suite.
  • Place of a column: the first, the last, alone in its word, the one that opens a word because it did not fit, and columns without bits.
  • Value: the ends of the range, their neighbours and the middle; and the values just outside, which the checked paths must refuse.
  • Access path: every way of writing against every way of reading.
  • Index: the first and the last, and those out of range.
  • State of the matrix: built, copied, moved, assigned, swapped, filled, and without rows.
  • Order of the rows: every pair of rows of three small schemas.
  • Number of columns: up to eight in the schemas, and 257 in PackedRowWide and PackedMatrixWide, one more than the operands of a fold expression that Clang takes; the header walked the columns with folds, and such a row did not compile with Clang. Its columns take every width with every kind of range, so that a value in the column of another shows.
  • Columns given as an array (Packed_Row_Of, Packed_Matrix_Of): a variable, a call, an array written in place, a C array through std::to_array, one column, 257 columns; and what is refused: a C array, an array of no columns or of something else, one column alone and more than 65535 columns.

Definition in file packed_matrix_test.cc.