| 1 |
# Copyright (c) 2015-2026, The matio contributors |
| 2 |
# Copyright (c) 2013-2014, Christopher C. Hulbert |
| 3 |
# All rights reserved. |
| 4 |
# |
| 5 |
# Redistribution and use in source and binary forms, with or without |
| 6 |
# modification, are permitted provided that the following conditions are met: |
| 7 |
# |
| 8 |
# 1. Redistributions of source code must retain the above copyright notice, this |
| 9 |
# list of conditions and the following disclaimer. |
| 10 |
# |
| 11 |
# 2. Redistributions in binary form must reproduce the above copyright notice, |
| 12 |
# this list of conditions and the following disclaimer in the documentation |
| 13 |
# and/or other materials provided with the distribution. |
| 14 |
# |
| 15 |
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| 16 |
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 17 |
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| 18 |
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
| 19 |
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 20 |
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
| 21 |
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
| 22 |
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
| 23 |
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 24 |
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 25 |
|
| 26 |
AT_TESTED([test_mat]) |
| 27 |
|
| 28 |
AT_SETUP([Read linear slab of double array]) |
| 29 |
AT_KEYWORDS([mat4_readslab readslab read_data_linear]) |
| 30 |
AT_CHECK([cp $srcdir/results/dump-var1-2.out expout |
| 31 |
$builddir/../tools/matdump -d $srcdir/datasets/matio_test_cases_v4_be.mat var1\(2:3:end\)],[0],[expout],[]) |
| 32 |
AT_CLEANUP |
| 33 |
|
| 34 |
AT_SETUP([Read linear slab of complex double array]) |
| 35 |
AT_KEYWORDS([mat4_readslab readslab read_data_linear]) |
| 36 |
AT_CHECK([cp $srcdir/results/dump-var11-2.out expout |
| 37 |
$builddir/../tools/matdump -d $srcdir/datasets/matio_test_cases_v4_be.mat var11\(2:3:end\)],[0],[expout],[]) |
| 38 |
AT_CLEANUP |
| 39 |
|
| 40 |
AT_SETUP([Read slab of double array]) |
| 41 |
AT_KEYWORDS([mat4_readslab readslab]) |
| 42 |
AT_CHECK([cp $srcdir/results/dump-var1.out expout |
| 43 |
$builddir/../tools/matdump -d $srcdir/datasets/matio_test_cases_v4_be.mat var1\(1:1:end,1:1:end\)],[0],[expout],[]) |
| 44 |
AT_CLEANUP |
| 45 |
|
| 46 |
AT_SETUP([Read slab of complex double array]) |
| 47 |
AT_KEYWORDS([mat4_readslab readslab]) |
| 48 |
AT_CHECK([cp $srcdir/results/dump-var11.out expout |
| 49 |
$builddir/../tools/matdump -d $srcdir/datasets/matio_test_cases_v4_be.mat var11\(1:1:end,1:1:end\)],[0],[expout],[]) |
| 50 |
AT_CLEANUP |
| 51 |
|
| 52 |
AT_SETUP([Read slab of double array as double]) |
| 53 |
AT_KEYWORDS([mat4_readslab readslab]) |
| 54 |
AT_CHECK([cp $srcdir/results/readslab-var1.out expout |
| 55 |
$builddir/test_mat readslab $srcdir/datasets/matio_test_cases_v4_be.mat var1 -c double],[0],[expout],[]) |
| 56 |
AT_CLEANUP |
| 57 |
|
| 58 |
AT_SETUP([Read slab of double array as single]) |
| 59 |
AT_KEYWORDS([mat4_readslab readslab]) |
| 60 |
AT_CHECK([cp $srcdir/results/readslab-var1.out expout |
| 61 |
$builddir/test_mat readslab $srcdir/datasets/matio_test_cases_v4_be.mat var1 -c single],[0],[expout],[]) |
| 62 |
AT_CLEANUP |
| 63 |
|
| 64 |
AT_SETUP([Read slab of double array as int64]) |
| 65 |
AT_KEYWORDS([mat4_readslab readslab]) |
| 66 |
AT_CHECK([cp $srcdir/results/readslab-var1.out expout |
| 67 |
$builddir/test_mat readslab $srcdir/datasets/matio_test_cases_v4_be.mat var1 -c int64],[0],[expout],[]) |
| 68 |
AT_CLEANUP |
| 69 |
|
| 70 |
AT_SETUP([Read slab of double array as uint64]) |
| 71 |
AT_KEYWORDS([mat4_readslab readslab]) |
| 72 |
AT_CHECK([cp $srcdir/results/readslab-var1.out expout |
| 73 |
$builddir/test_mat readslab $srcdir/datasets/matio_test_cases_v4_be.mat var1 -c uint64],[0],[expout],[]) |
| 74 |
AT_CLEANUP |
| 75 |
|
| 76 |
AT_SETUP([Read slab of double array as int32]) |
| 77 |
AT_KEYWORDS([mat4_readslab readslab]) |
| 78 |
AT_CHECK([cp $srcdir/results/readslab-var1.out expout |
| 79 |
$builddir/test_mat readslab $srcdir/datasets/matio_test_cases_v4_be.mat var1 -c int32],[0],[expout],[]) |
| 80 |
AT_CLEANUP |
| 81 |
|
| 82 |
AT_SETUP([Read slab of double array as uint32]) |
| 83 |
AT_KEYWORDS([mat4_readslab readslab]) |
| 84 |
AT_CHECK([cp $srcdir/results/readslab-var1.out expout |
| 85 |
$builddir/test_mat readslab $srcdir/datasets/matio_test_cases_v4_be.mat var1 -c uint32],[0],[expout],[]) |
| 86 |
AT_CLEANUP |
| 87 |
|
| 88 |
AT_SETUP([Read slab of double array as int16]) |
| 89 |
AT_KEYWORDS([mat4_readslab readslab]) |
| 90 |
AT_CHECK([cp $srcdir/results/readslab-var1.out expout |
| 91 |
$builddir/test_mat readslab $srcdir/datasets/matio_test_cases_v4_be.mat var1 -c int16],[0],[expout],[]) |
| 92 |
AT_CLEANUP |
| 93 |
|
| 94 |
AT_SETUP([Read slab of double array as uint16]) |
| 95 |
AT_KEYWORDS([mat4_readslab readslab]) |
| 96 |
AT_CHECK([cp $srcdir/results/readslab-var1.out expout |
| 97 |
$builddir/test_mat readslab $srcdir/datasets/matio_test_cases_v4_be.mat var1 -c uint16],[0],[expout],[]) |
| 98 |
AT_CLEANUP |
| 99 |
|
| 100 |
AT_SETUP([Read slab of double array as int8]) |
| 101 |
AT_KEYWORDS([mat4_readslab readslab]) |
| 102 |
AT_CHECK([cp $srcdir/results/readslab-var1.out expout |
| 103 |
$builddir/test_mat readslab $srcdir/datasets/matio_test_cases_v4_be.mat var1 -c int8],[0],[expout],[]) |
| 104 |
AT_CLEANUP |
| 105 |
|
| 106 |
AT_SETUP([Read slab of double array as uint8]) |
| 107 |
AT_KEYWORDS([mat4_readslab readslab]) |
| 108 |
AT_CHECK([cp $srcdir/results/readslab-var1.out expout |
| 109 |
$builddir/test_mat readslab $srcdir/datasets/matio_test_cases_v4_be.mat var1 -c uint8],[0],[expout],[]) |
| 110 |
AT_CLEANUP |
| 111 |
|
| 112 |
AT_SETUP([Read slab of complex double array as double]) |
| 113 |
AT_KEYWORDS([mat4_readslab readslab]) |
| 114 |
AT_CHECK([cp $srcdir/results/readslab-var11.out expout |
| 115 |
$builddir/test_mat readslab $srcdir/datasets/matio_test_cases_v4_be.mat var11 -c double],[0],[expout],[]) |
| 116 |
AT_CLEANUP |
| 117 |
|
| 118 |
AT_SETUP([Read slab of complex double array as single]) |
| 119 |
AT_KEYWORDS([mat4_readslab readslab]) |
| 120 |
AT_CHECK([cp $srcdir/results/readslab-var11.out expout |
| 121 |
$builddir/test_mat readslab $srcdir/datasets/matio_test_cases_v4_be.mat var11 -c single],[0],[expout],[]) |
| 122 |
AT_CLEANUP |
| 123 |
|
| 124 |
AT_SETUP([Read slab of complex double array as int64]) |
| 125 |
AT_KEYWORDS([mat4_readslab readslab]) |
| 126 |
AT_CHECK([cp $srcdir/results/readslab-var11.out expout |
| 127 |
$builddir/test_mat readslab $srcdir/datasets/matio_test_cases_v4_be.mat var11 -c int64],[0],[expout],[]) |
| 128 |
AT_CLEANUP |
| 129 |
|
| 130 |
AT_SETUP([Read slab of complex double array as uint64]) |
| 131 |
AT_KEYWORDS([mat4_readslab readslab]) |
| 132 |
AT_CHECK([cp $srcdir/results/readslab-var11.out expout |
| 133 |
$builddir/test_mat readslab $srcdir/datasets/matio_test_cases_v4_be.mat var11 -c uint64],[0],[expout],[]) |
| 134 |
AT_CLEANUP |
| 135 |
|
| 136 |
AT_SETUP([Read slab of complex double array as int32]) |
| 137 |
AT_KEYWORDS([mat4_readslab readslab]) |
| 138 |
AT_CHECK([cp $srcdir/results/readslab-var11.out expout |
| 139 |
$builddir/test_mat readslab $srcdir/datasets/matio_test_cases_v4_be.mat var11 -c int32],[0],[expout],[]) |
| 140 |
AT_CLEANUP |
| 141 |
|
| 142 |
AT_SETUP([Read slab of complex double array as uint32]) |
| 143 |
AT_KEYWORDS([mat4_readslab readslab]) |
| 144 |
AT_CHECK([cp $srcdir/results/readslab-var11.out expout |
| 145 |
$builddir/test_mat readslab $srcdir/datasets/matio_test_cases_v4_be.mat var11 -c uint32],[0],[expout],[]) |
| 146 |
AT_CLEANUP |
| 147 |
|
| 148 |
AT_SETUP([Read slab of complex double array as int16]) |
| 149 |
AT_KEYWORDS([mat4_readslab readslab]) |
| 150 |
AT_CHECK([cp $srcdir/results/readslab-var11.out expout |
| 151 |
$builddir/test_mat readslab $srcdir/datasets/matio_test_cases_v4_be.mat var11 -c int16],[0],[expout],[]) |
| 152 |
AT_CLEANUP |
| 153 |
|
| 154 |
AT_SETUP([Read slab of complex double array as uint16]) |
| 155 |
AT_KEYWORDS([mat4_readslab readslab]) |
| 156 |
AT_CHECK([cp $srcdir/results/readslab-var11.out expout |
| 157 |
$builddir/test_mat readslab $srcdir/datasets/matio_test_cases_v4_be.mat var11 -c uint16],[0],[expout],[]) |
| 158 |
AT_CLEANUP |
| 159 |
|
| 160 |
AT_SETUP([Read slab of complex double array as int8]) |
| 161 |
AT_KEYWORDS([mat4_readslab readslab]) |
| 162 |
AT_CHECK([cp $srcdir/results/readslab-var11.out expout |
| 163 |
$builddir/test_mat readslab $srcdir/datasets/matio_test_cases_v4_be.mat var11 -c int8],[0],[expout],[]) |
| 164 |
AT_CLEANUP |
| 165 |
|
| 166 |
AT_SETUP([Read slab of complex double array as uint8]) |
| 167 |
AT_KEYWORDS([mat4_readslab readslab]) |
| 168 |
AT_CHECK([cp $srcdir/results/readslab-var11.out expout |
| 169 |
$builddir/test_mat readslab $srcdir/datasets/matio_test_cases_v4_be.mat var11 -c uint8],[0],[expout],[]) |
| 170 |
AT_CLEANUP |