Ticket #6243 (closed: fixed)
Unit Test for SaveAscii
Reported by: | Karl Palmen | Owned by: | Karl Palmen |
---|---|---|---|
Priority: | major | Milestone: | Release 2.4 |
Component: | Mantid | Keywords: | |
Cc: | anders.markvardsen@… | Blocked By: | |
Blocking: | Tester: | Wenduo Zhou |
Description
There is no unit test for SaveAscii. There is LoadSaveAsciiTest, which saves a workspace to Ascii and then checks that it can be loaded to form an identical workspace. This does not check that the resulting file is Ascii and of the required format.
We need the check that column headers are correct when required and are not present when not required (to test #6107) and that the required separators as used
Change History
comment:1 Changed 8 years ago by Karl Palmen
- Status changed from new to assigned
- Owner set to Karl Palmen
comment:2 Changed 8 years ago by Karl Palmen
- Cc anders.markvardsen@… added
A simple test for #6107 could be to check that the first row of the file is all numbers if ColumnHeader is false and not all numbers if it is true.
More tests for this and other properties could be added.
comment:4 Changed 8 years ago by Karl Palmen
Add skeleton test re #6243
Just tests that SaveAscii executes.
Signed-off-by: Karl Palmen <karl.palmen@…>
Changeset: cb62b76183823ba5829b6abd61d16750e356e150
comment:5 Changed 8 years ago by Karl Palmen
Add simple test for ColumnHeader=false re #6243
Still to test content of output file
Signed-off-by: Karl Palmen <karl.palmen@…>
Changeset: 4fb8fbd468e120f05cc3d152a0178174961e7135
comment:6 Changed 8 years ago by Karl Palmen
Complete the unit test test/SaveAsciiTest.h re #6243
Other properties such as WriteXError are still not tested.
Signed-off-by: Karl Palmen <karl.palmen@…>
Changeset: 39a3290a4903270db49642b3c4c82a76a48f374f
comment:7 Changed 8 years ago by Karl Palmen
To test check the code of SaveAsciiTest and verify that it does test that the algorithm wotks and that it does some simple checks on the content of the output ascii file correctly and a check for the ColumnHearder property is included.
comment:8 Changed 8 years ago by Karl Palmen
- Status changed from accepted to verify
- Resolution set to fixed
comment:9 Changed 8 years ago by Karl Palmen
I've found out that as similar change was made to SaveFocusedXYE in ticket #1143 . It is not tested in SaveFocussedXYETest.
comment:10 Changed 8 years ago by Karl Palmen
Add skeleton test re #6243
Just tests that SaveAscii executes.
Signed-off-by: Karl Palmen <karl.palmen@…>
Changeset: cb62b76183823ba5829b6abd61d16750e356e150
comment:11 Changed 8 years ago by Karl Palmen
Add simple test for ColumnHeader=false re #6243
Still to test content of output file
Signed-off-by: Karl Palmen <karl.palmen@…>
Changeset: 4fb8fbd468e120f05cc3d152a0178174961e7135
comment:12 Changed 8 years ago by Karl Palmen
Complete the unit test test/SaveAsciiTest.h re #6243
Other properties such as WriteXError are still not tested.
Signed-off-by: Karl Palmen <karl.palmen@…>
Changeset: 39a3290a4903270db49642b3c4c82a76a48f374f
comment:13 Changed 8 years ago by Wenduo Zhou
- Status changed from verify to verifying
- Tester set to Wenduo Zhou
comment:14 Changed 8 years ago by Wenduo Zhou
- Status changed from verifying to closed
In the unit test, it might be better to check a few numbers explicitly that written to file by SaveAscii.
comment:15 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 7089