Mercurial > octave
annotate test/bug-45972.tst @ 31225:3eab70385569
sparse-xpow.cc: Use faster multiplication technique, this time for complex
author | Arun Giridhar <arungiridhar@gmail.com> |
---|---|
date | Sun, 11 Sep 2022 13:53:38 -0400 |
parents | 9080316864bf |
children |
rev | line source |
---|---|
30110
9080316864bf
update bug status in test suite
John W. Eaton <jwe@octave.org>
parents:
30109
diff
changeset
|
1 %!test <*45972> |
25797
8644e7df7fc7
print and save anonymous functions with varargin correctly (bug #45972)
Olaf Till <olaf.till@uni-jena.de>
parents:
diff
changeset
|
2 %! ascii_filename = tempname (); |
8644e7df7fc7
print and save anonymous functions with varargin correctly (bug #45972)
Olaf Till <olaf.till@uni-jena.de>
parents:
diff
changeset
|
3 %! binary_filename = tempname (); |
8644e7df7fc7
print and save anonymous functions with varargin correctly (bug #45972)
Olaf Till <olaf.till@uni-jena.de>
parents:
diff
changeset
|
4 %! f = @ (x, y, varargin) x + y + varargin{1}; |
8644e7df7fc7
print and save anonymous functions with varargin correctly (bug #45972)
Olaf Till <olaf.till@uni-jena.de>
parents:
diff
changeset
|
5 %! unwind_protect |
8644e7df7fc7
print and save anonymous functions with varargin correctly (bug #45972)
Olaf Till <olaf.till@uni-jena.de>
parents:
diff
changeset
|
6 %! save ("-text", ascii_filename, "f"); |
8644e7df7fc7
print and save anonymous functions with varargin correctly (bug #45972)
Olaf Till <olaf.till@uni-jena.de>
parents:
diff
changeset
|
7 %! save ("-binary", binary_filename, "f"); |
8644e7df7fc7
print and save anonymous functions with varargin correctly (bug #45972)
Olaf Till <olaf.till@uni-jena.de>
parents:
diff
changeset
|
8 %! ascii = load (ascii_filename); |
8644e7df7fc7
print and save anonymous functions with varargin correctly (bug #45972)
Olaf Till <olaf.till@uni-jena.de>
parents:
diff
changeset
|
9 %! binary = load (binary_filename); |
8644e7df7fc7
print and save anonymous functions with varargin correctly (bug #45972)
Olaf Till <olaf.till@uni-jena.de>
parents:
diff
changeset
|
10 %! assert (f (1, 2, 3), ascii.f (1, 2, 3)); |
8644e7df7fc7
print and save anonymous functions with varargin correctly (bug #45972)
Olaf Till <olaf.till@uni-jena.de>
parents:
diff
changeset
|
11 %! assert (f (1, 2, 3), binary.f (1, 2, 3)); |
8644e7df7fc7
print and save anonymous functions with varargin correctly (bug #45972)
Olaf Till <olaf.till@uni-jena.de>
parents:
diff
changeset
|
12 %! unwind_protect_cleanup |
8644e7df7fc7
print and save anonymous functions with varargin correctly (bug #45972)
Olaf Till <olaf.till@uni-jena.de>
parents:
diff
changeset
|
13 %! unlink (ascii_filename); |
8644e7df7fc7
print and save anonymous functions with varargin correctly (bug #45972)
Olaf Till <olaf.till@uni-jena.de>
parents:
diff
changeset
|
14 %! unlink (binary_filename); |
25804
440d7766b5c6
Break up tests for bug #45972 so that HDF5 is not used if support is unavailable.
Rik <rik@octave.org>
parents:
25797
diff
changeset
|
15 %! end_unwind_protect |
440d7766b5c6
Break up tests for bug #45972 so that HDF5 is not used if support is unavailable.
Rik <rik@octave.org>
parents:
25797
diff
changeset
|
16 |
30110
9080316864bf
update bug status in test suite
John W. Eaton <jwe@octave.org>
parents:
30109
diff
changeset
|
17 %!testif HAVE_HDF5 <*45972> |
25804
440d7766b5c6
Break up tests for bug #45972 so that HDF5 is not used if support is unavailable.
Rik <rik@octave.org>
parents:
25797
diff
changeset
|
18 %! hdf5_filename = tempname (); |
440d7766b5c6
Break up tests for bug #45972 so that HDF5 is not used if support is unavailable.
Rik <rik@octave.org>
parents:
25797
diff
changeset
|
19 %! f = @ (x, y, varargin) x + y + varargin{1}; |
440d7766b5c6
Break up tests for bug #45972 so that HDF5 is not used if support is unavailable.
Rik <rik@octave.org>
parents:
25797
diff
changeset
|
20 %! unwind_protect |
440d7766b5c6
Break up tests for bug #45972 so that HDF5 is not used if support is unavailable.
Rik <rik@octave.org>
parents:
25797
diff
changeset
|
21 %! save ("-hdf5", hdf5_filename, "f"); |
440d7766b5c6
Break up tests for bug #45972 so that HDF5 is not used if support is unavailable.
Rik <rik@octave.org>
parents:
25797
diff
changeset
|
22 %! hdf5 = load (hdf5_filename); |
440d7766b5c6
Break up tests for bug #45972 so that HDF5 is not used if support is unavailable.
Rik <rik@octave.org>
parents:
25797
diff
changeset
|
23 %! assert (f (1, 2, 3), hdf5.f (1, 2, 3)); |
440d7766b5c6
Break up tests for bug #45972 so that HDF5 is not used if support is unavailable.
Rik <rik@octave.org>
parents:
25797
diff
changeset
|
24 %! unwind_protect_cleanup |
25797
8644e7df7fc7
print and save anonymous functions with varargin correctly (bug #45972)
Olaf Till <olaf.till@uni-jena.de>
parents:
diff
changeset
|
25 %! unlink (hdf5_filename); |
8644e7df7fc7
print and save anonymous functions with varargin correctly (bug #45972)
Olaf Till <olaf.till@uni-jena.de>
parents:
diff
changeset
|
26 %! end_unwind_protect |