aboutsummaryrefslogtreecommitdiff
path: root/xpxp_to_xxpp.m
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2024-11-21 10:07:58 -0500
committerEugeniy E. Mikhailov <evgmik@gmail.com>2024-11-21 10:07:58 -0500
commitf1794c3de4c738cb06161cdca61353198656da0a (patch)
tree0b224e02166f64af8d9a62d06de1153d04cad033 /xpxp_to_xxpp.m
parentc3f621e6437662d68485bd41f724424325327cf9 (diff)
downloadmatlab_strawberryfields-0.3.tar.gz
matlab_strawberryfields-0.3.zip
added rudimental tests for xpxp_to_xxpp and xxpp_to_xpxp functionsHEADv0.3master
Diffstat (limited to 'xpxp_to_xxpp.m')
-rw-r--r--xpxp_to_xxpp.m11
1 files changed, 11 insertions, 0 deletions
diff --git a/xpxp_to_xxpp.m b/xpxp_to_xxpp.m
index fc732e2..6191070 100644
--- a/xpxp_to_xxpp.m
+++ b/xpxp_to_xxpp.m
@@ -30,3 +30,14 @@ function S_permuted = xpxp_to_xxpp(S)
end
end
+%!test
+%! [X, Y]=meshgrid (1:4, 1:4);
+%! Mxpxp=xxpp_to_xpxp(X);
+%! assert(any(any(X != Mxpxp)));
+%! Mxxpp=xpxp_to_xxpp(Mxpxp);
+%! assert(X, Mxxpp)
+%! Mxpxp=xxpp_to_xpxp(Y);
+%! assert(any(any(Y != Mxpxp)));
+%! Mxxpp=xpxp_to_xxpp(Mxpxp);
+%! assert(Y, Mxxpp)
+