Opened 10 years ago
Closed 10 years ago
#7296 closed Bugs (fixed)
Bug-fix and improvements to test utility functions
Reported by: | Owned by: | Gunter | |
---|---|---|---|
Milestone: | Boost 1.52.0 | Component: | uBLAS |
Version: | Boost Release Branch | Severity: | Problem |
Keywords: | Cc: |
Description
Three years ago I introduced in libs/numeric/ublas/test/utils
a small set of utility functions for testing purpose.
Now, I corrected some bugs and added new and hopefully useful functions.
Furthermore, I fixed the license part.
I attach a patch file along with the whole include file.
I tested it against the following tests:
begin_end num_columns num_rows size test_complex_norms
and all works.
I had to skip the following tests since they fail (not for the new version of utils.hpp):
test_assignment test_coordinate_matrix_sort test_inplace_solve
Could you add it?
Attachments (13)
Change History (29)
by , 10 years ago
Attachment: | utils.patch added |
---|
comment:1 by , 10 years ago
The previously attached patch contained simpler macros but some output messages was less informative (for the user).
Now, with the new attached patch utils-new.patch
, those output messages are again informative.
Sorry for the inconvenience.
by , 10 years ago
Attachment: | utils.2.hpp added |
---|
The new (i.e., already patched by utils-new.patch
) utils.hpp
comment:2 by , 10 years ago
comment:3 by , 10 years ago
The previous patch file utils-new.patch
contained bad macro names: BOOST_UBLA_TEST_CHECK_EQ
and BOOST_UBLA_TEST_CHECK_EQUAL
.
Specifically, UBLA_
should be UBLAS_
.
The new attached patch fix this.
I attach two patches:
utils-201208280915.patch
is the patch file to be used if applied against the original (unpatched)utils.hpp
(i.e., the one you find in the actual boost trunk).utils-201208280915.patch
is the patch file to be used if applied against the patchedutils.hpp
(i.e., the ones namedutils.2.hpp
in the above attachments).
As before, I also attach the new (patched) version of utils.hpp
.
Again, sorry for this inconvenience, and thanks to guwi17 for pointing it out.
by , 10 years ago
Attachment: | utils-201208280915.patch added |
---|
Patch file for utils.hpp to be applied against the version you currently find in boost trunk
by , 10 years ago
Attachment: | utils_UBLA_UBLAS-201208280915.patch added |
---|
Patch file for utils.hpp
to be applied against the version of utils.hpp patched with utils-new.patch
(i.e., the one named utils.2.hpp
)
by , 10 years ago
Attachment: | utils.3.hpp added |
---|
The new (i.e., already patched by utils-201208280915.patch
) utils.hpp
file.
comment:4 by , 10 years ago
In the last my comment, read the second utils-201208280915.patch
as utils_UBLA_UBLAS-201208280915.patch
.
comment:5 by , 10 years ago
To date, some macros in utils.hpp
fail when the value type has a complex type.
I've tried to fix it and to test the fix I have created a test-suite for the macros contained in utils.hpp
.
I'm going to upload the patch file together with the test suite.
by , 10 years ago
Attachment: | utils-fix_complex-201208281922.patch added |
---|
Patch file for utils.hpp
to make it works with complex numbers. To be applied to the version of utils.hpp
in the current boost trunk.
by , 10 years ago
Attachment: | utils.4.hpp added |
---|
The new utils.hpp
file that you should obtain after applying the utils-fix_complex-201208281922.patch
patch.
by , 10 years ago
Attachment: | test_ticket7296.cpp added |
---|
Test case for utils.hpp
. It also shows that now utils.hpp
works with complex value types.
comment:6 by , 10 years ago
I've tried to make some macro more robust to complex expressions by using (when needed) macro expansion inside parenthesis. Furthermore,
- I fixed a bug: I forgot to add an increment of the variable used to count test failures
- I added two more macros for performing relative closeness comparison in case of vectors and matrices
- I replaced the use of
unsigned long
withstd::size_t
(I think it's better) - I enhanced the doc
As usual, I add the new patch file (wrt utils.4.hpp
) together with the whole new utils.hpp
file and the updated test-case.
by , 10 years ago
Attachment: | utils-201208301042.patch added |
---|
Patch file for utils.hpp
to be applied against utils.4.hpp
by , 10 years ago
Attachment: | utils.5.hpp added |
---|
The new patched utils.hpp
(i.e., the one resulting after applying patch utils-201208301042.patch
)
by , 10 years ago
Attachment: | test_ticket7296.2.cpp added |
---|
The updated test_ticket7296.cpp
for the new version of utils.hpp
named utils.5.hpp
comment:7 by , 10 years ago
comment:8 by , 10 years ago
comment:9 by , 10 years ago
comment:10 by , 10 years ago
Milestone: | To Be Determined → Boost 1.52.0 |
---|---|
Status: | new → assigned |
comment:11 by , 10 years ago
comment:12 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:13 by , 10 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Version: | Boost 1.52.0 → Boost Release Branch |
comment:14 by , 10 years ago
comment:15 by , 10 years ago
comment:16 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Patch file for utils.hpp