Open apjanke opened 5 years ago
Improved in https://github.com/apjanke/octave-testify/commit/7ee28d7809eab0ede3950768a8e6542808d9697c and https://github.com/apjanke/octave-testify/commit/1c1086e4557e30427a58b8b0263b2f1d48ab12a1.
Now it looks like this:
>> test2 isosurface -verbose
>>>>> /Applications/Octave-5.1.0.app/Contents/Resources/usr/Cellar/octave-octave-app@5.1.0/5.1.0/share/octave/5.1.0/m/plot/draw/isosurface.m
***** test block 1: demo
clf;
[x,y,z] = meshgrid (-2:0.5:2, -2:0.5:2, -2:0.5:2);
v = x.^2 + y.^2 + z.^2;
isosurface (x, y, z, v, 1);
axis equal;
title ("isosurface() of a sphere");
--> success=1, msg=----- demo skipped
***** test block 2: demo
clf;
[x,y,z] = meshgrid (-2:0.5:2, -2:0.5:2, -2:0.5:2);
v = x.^2 + y.^2 + z.^2;
isosurface (x, y, z, v, 3);
isosurface (x, y, z, v, 5);
axis equal;
title ("isosurface() of two nested spheres");
--> success=1, msg=----- demo skipped
[...]
***** test block 23: error
is_test=1 is_xtest=0
error_id=''
pattern=/V must be a non-singleton 3-dimensional matrix/
Code:
v = reshape(1:6*8, [6 1 8]); fvc = isosurface (v, iso);
--> success=1, msg=
***** test block 24: error
is_test=1 is_xtest=0
error_id=''
pattern=/X must match the size of V/
Code:
x = 1:2:24;
fvc = isosurface (x, y, z, val, iso);
--> success=1, msg=
***** test block 25: error
is_test=1 is_xtest=0
error_id=''
pattern=/Y must match the size of V/
Code:
y = -14:6:11;
fvc = isosurface (x, y, z, val, iso);
--> success=0, msg=!!!!! Incorrect error raised: expected error message matching /Y must match the size of V/, but got 'isosurface: X must match thesize of V'
----- Failure details: block 25 -----
***** test block 25: error
is_test=1 is_xtest=0
error_id=''
pattern=/Y must match the size of V/
Code:
y = -14:6:11;
fvc = isosurface (x, y, z, val, iso);
--> success=0, msg=!!!!! Incorrect error raised: expected error message matching /Y must match the size of V/, but got 'isosurface: X must match thesize of V'
Aborted test run due to test failure.
PASSES 20 out of 21 tests
Next up, I think I need to compact the property display for BistBlock.
More improvement in https://github.com/apjanke/octave-testify/commit/9d12856767ff184f07c28423167d4a34bb4badc3.
Now it's like:
>> test2 isosurface -verbose
>>>>> /Applications/Octave-5.1.0.app/Contents/Resources/usr/Cellar/octave-octave-app@5.1.0/5.1.0/share/octave/5.1.0/m/plot/draw/isosurface.m
***** test block 1: demo
clf;
[x,y,z] = meshgrid (-2:0.5:2, -2:0.5:2, -2:0.5:2);
v = x.^2 + y.^2 + z.^2;
isosurface (x, y, z, v, 1);
axis equal;
title ("isosurface() of a sphere");
--> success=1, msg=----- demo skipped
[...]
***** test block 15: test
is_test=1 is_xtest=0
Code:
fv = isosurface (val, iso, "verbose");
assert (isfield (fv, "vertices"), true);
assert (isfield (fv, "faces"), true);
assert (size (fv.vertices), [11 3]);
assert (size (fv.faces), [10 3]);
--> success=1, msg=
***** test block 16: test
is_test=1 is_xtest=0
Code:
fvc = isosurface (xx, yy, zz, val, iso, yy, "v", "noshare");
assert (isfield (fvc, "vertices"), true);
assert (isfield (fvc, "faces"), true);
assert (isfield (fvc, "facevertexcdata"), true);
assert (size (fvc.vertices), [20 3]);
assert (size (fvc.faces), [10 3]);
assert (size (fvc.facevertexcdata), [20 1]);
--> success=1, msg=
***** test block 17: test
is_test=1 is_xtest=0
Code:
fvc = isosurface (xx, yy, zz, val, yy, "n", "v");
assert (isfield (fvc, "vertices"), true);
assert (isfield (fvc, "faces"), true);
assert (isfield (fvc, "facevertexcdata"), true);
assert (size (fvc.vertices), [7 3]);
assert (size (fvc.faces), [3 3]);
assert (size (fvc.facevertexcdata), [7 1]);
--> success=1, msg=
***** test block 18: error /./
is_test=1 is_xtest=0
Code:
isosurface ()
--> success=1, msg=
***** test block 19: error /./
is_test=1 is_xtest=0
Code:
isosurface (1,2,3,4,5,6,7,8,9)
--> success=1, msg=
***** test block 20: error /parameter 'foobar' not supported/
is_test=1 is_xtest=0
Code:
fvc = isosurface (val, iso, "foobar");
--> success=1, msg=
***** test block 21: error /incorrect number of input arguments/
is_test=1 is_xtest=0
Code:
fvc = isosurface (xx, yy, zz, val, iso, yy, 5);
--> success=1, msg=
***** test block 22: error /V must be a non-singleton 3-dimensional matrix/
is_test=1 is_xtest=0
Code:
v = reshape (1:6*8, [6 8]);
fvc = isosurface (v, iso);
--> success=1, msg=
***** test block 23: error /V must be a non-singleton 3-dimensional matrix/
is_test=1 is_xtest=0
Code:
v = reshape(1:6*8, [6 1 8]); fvc = isosurface (v, iso);
--> success=1, msg=
***** test block 24: error /X must match the size of V/
is_test=1 is_xtest=0
Code:
x = 1:2:24;
fvc = isosurface (x, y, z, val, iso);
--> success=1, msg=
***** test block 25: error /Y must match the size of V/
is_test=1 is_xtest=0
Code:
y = -14:6:11;
fvc = isosurface (x, y, z, val, iso);
--> success=0, msg=!!!!! Incorrect error raised: expected error message matching /Y must match the size of V/, but got 'isosurface: X must match thesize of V'
----- Failure details: block 25 -----
***** test block 25: error /Y must match the size of V/
is_test=1 is_xtest=0
Code:
y = -14:6:11;
fvc = isosurface (x, y, z, val, iso);
--> success=0, msg=!!!!! Incorrect error raised: expected error message matching /Y must match the size of V/, but got 'isosurface: X must match thesize of V'
Aborted test run due to test failure.
PASSES 20 out of 21 tests
One more tiny tweak in https://github.com/apjanke/octave-testify/commit/67d5a85608815858917ad8812894ae5b1d9a075a: just the spacing between the "signal" symbols and the start of the text.
Octave's
test
looks like this:My
test2
looks like this:Improve its readability.