Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
LEFEBVREJP email
radix
Commits
6dee28d8
Commit
6dee28d8
authored
Oct 08, 2018
by
Purves, Murray
Browse files
WIP tests - adding simpler PCF file for analysis
parent
badab4bf
Pipeline
#16158
failed with stages
in 7 minutes and 35 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
radixio/tests/data/detective-ex100.pcf
0 → 100644
View file @
6dee28d8
File added
radixio/tests/tstSpectrum.cc
View file @
6dee28d8
...
...
@@ -23,8 +23,8 @@ TEST(RadixIO, SpectrumFromPCF)
TEST
(
RadixIO
,
SpectrumToPCF
)
{
// Read in a test spectrum
std
::
string
testReadPCFFile
=
radix
::
to_native_path
(
std
::
string
(
dirname
(
__FILE__
)
+
"/data/
235F
.pcf"
));
std
::
string
testReadPCFFile
=
radix
::
to_native_path
(
std
::
string
(
dirname
(
__FILE__
)
+
"/data/
detective-ex100
.pcf"
));
Spectrum
::
SP
testSpectrum1
=
std
::
make_shared
<
Spectrum
>
();
SpectrumPCFStream
<
Spectrum
::
SP
>
testStream1
(
testSpectrum1
);
ASSERT_TRUE
(
testStream1
.
read_from
(
testReadPCFFile
));
...
...
@@ -32,6 +32,16 @@ TEST(RadixIO, SpectrumToPCF)
// Write the spectrum back out to a file
std
::
string
testWritePCFFile
=
"test.pcf"
;
ASSERT_TRUE
(
testStream1
.
write_to
(
testWritePCFFile
));
// Read it again and ensure the round trip is successful
Spectrum
::
SP
testSpectrum2
=
std
::
make_shared
<
Spectrum
>
();
SpectrumPCFStream
<
Spectrum
::
SP
>
testStream2
(
testSpectrum2
);
ASSERT_TRUE
(
testStream2
.
read_from
(
testWritePCFFile
));
// Test the contents of the two spectra
EXPECT_EQ
(
30
,
testSpectrum2
->
spectrumDataCount
());
EXPECT_EQ
(
testSpectrum1
->
spectrumDataCount
(),
testSpectrum2
->
spectrumDataCount
());
}
TEST
(
RadixIO
,
SpectrumFromSPE
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment