|
6 | 6 |
|
7 | 7 | properties (TestParameter) |
8 | 8 | str = {"string", 'char'} |
| 9 | +type = {"single", "double", "float64", "float32",... |
| 10 | + "int8", "int16", "int32", "int64", ... |
| 11 | + "uint8", "uint16", "uint32", "uint64", "string"} |
9 | 12 | end |
10 | 13 |
|
11 | 14 | methods(TestClassSetup) |
@@ -60,7 +63,7 @@ function setup_file(tc) |
60 | 63 | end |
61 | 64 |
|
62 | 65 |
|
63 | | -methods (Test) |
| 66 | +methods (Test, ParameterCombination = 'sequential') |
64 | 67 |
|
65 | 68 | function test_auto_chunk_size(tc) |
66 | 69 |
|
@@ -213,24 +216,20 @@ function test_shape(tc) |
213 | 216 | end |
214 | 217 |
|
215 | 218 |
|
216 | | -function test_coerce(tc) |
| 219 | +function test_coerce(tc, type) |
217 | 220 | basic = tc.TestData.basic; |
218 | 221 |
|
219 | | -for type = ["single", "double", "float64", "float32",... |
220 | | - "int8", "int16", "int32", "int64", ... |
221 | | - "uint8", "uint16", "uint32", "uint64", "string"] |
222 | | - |
223 | | - stdlib.h5save(basic, type, 0, "type",type) |
| 222 | +stdlib.h5save(basic, type, 0, "type",type) |
224 | 223 |
|
225 | | - switch type |
226 | | - case "string", vt = 'char'; |
227 | | - case "float64", vt = 'double'; |
228 | | - case "float32", vt = 'single'; |
229 | | - otherwise, vt = type; |
230 | | - end |
231 | | - tc.verifyClass(h5read(basic, "/"+type), vt) |
| 224 | +switch type |
| 225 | +case "string", vt = 'char'; |
| 226 | +case "float64", vt = 'double'; |
| 227 | +case "float32", vt = 'single'; |
| 228 | +otherwise, vt = type; |
232 | 229 | end |
233 | 230 |
|
| 231 | +tc.verifyClass(h5read(basic, "/"+type), vt) |
| 232 | + |
234 | 233 | end |
235 | 234 |
|
236 | 235 |
|
|
0 commit comments