Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
LEFEBVREJP email
radix
Commits
1075fe3a
Commit
1075fe3a
authored
Oct 09, 2018
by
Purves, Murray
Browse files
Moving conversion tests to use big file
parent
32710124
Pipeline
#16180
failed with stages
in 8 minutes and 1 second
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
radixio/tests/tstSpectrum.cc
View file @
1075fe3a
...
...
@@ -212,8 +212,8 @@ TEST(RadixIO, SpectrumToSPE)
TEST
(
RadixIO
,
PCFToSPE
)
{
// Read in a test spectrum
std
::
string
testReadPCFFile
=
radix
::
to_native_path
(
std
::
string
(
dirname
(
__FILE__
)
+
"/data/
detective-ex100
.pcf"
));
std
::
string
testReadPCFFile
=
radix
::
to_native_path
(
std
::
string
(
dirname
(
__FILE__
)
+
"/data/
235F
.pcf"
));
Spectrum
::
SP
testSpectrum1
=
std
::
make_shared
<
Spectrum
>
();
SpectrumPCFStream
<
Spectrum
::
SP
>
testStream1
(
testSpectrum1
);
ASSERT_TRUE
(
testStream1
.
read_from
(
testReadPCFFile
));
...
...
@@ -229,7 +229,7 @@ TEST(RadixIO, PCFToSPE)
ASSERT_TRUE
(
testStream2
.
read_from
(
testWriteSPEFile
));
// Test the contents of the two spectra
EXPECT_EQ
(
1
,
testSpectrum2
->
spectrumDataCount
());
EXPECT_EQ
(
30
,
testSpectrum2
->
spectrumDataCount
());
ASSERT_EQ
(
testSpectrum1
->
spectrumDataCount
(),
testSpectrum2
->
spectrumDataCount
());
float
tolerance
=
0.001
f
;
...
...
@@ -298,8 +298,8 @@ TEST(RadixIO, PCFToSPE)
TEST
(
RadixIO
,
SPEToPCF
)
{
// Read in a test spectrum
std
::
string
testReadSPEFile
=
radix
::
to_native_path
(
std
::
string
(
dirname
(
__FILE__
)
+
"/data/235F
-single
.spe"
));
std
::
string
testReadSPEFile
=
radix
::
to_native_path
(
std
::
string
(
dirname
(
__FILE__
)
+
"/data/235F.spe"
));
Spectrum
::
SP
testSpectrum1
=
std
::
make_shared
<
Spectrum
>
();
SpectrumSPEStream
<
Spectrum
::
SP
>
testStream1
(
testSpectrum1
);
ASSERT_TRUE
(
testStream1
.
read_from
(
testReadSPEFile
));
...
...
@@ -315,7 +315,7 @@ TEST(RadixIO, SPEToPCF)
ASSERT_TRUE
(
testStream2
.
read_from
(
testWritePCFFile
));
// Test the contents of the two spectra
EXPECT_EQ
(
1
,
testSpectrum2
->
spectrumDataCount
());
EXPECT_EQ
(
30
,
testSpectrum2
->
spectrumDataCount
());
ASSERT_EQ
(
testSpectrum1
->
spectrumDataCount
(),
testSpectrum2
->
spectrumDataCount
());
float
tolerance
=
0.001
f
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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