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
Scientific Software
LAMP
Commits
a9afb575
Commit
a9afb575
authored
Aug 02, 2019
by
Gonzalez, Miguel
Browse files
Issue 33: Added a test for IN5
parent
094936c0
Changes
2
Hide whitespace changes
Inline
Side-by-side
test_unit/data_in5/178100.nxs
0 → 100644
View file @
a9afb575
File added
test_unit/lamp_reading_unit_test.pro
View file @
a9afb575
...
...
@@ -995,6 +995,60 @@ pro unittest_reading_salsa, P_to_DATA, fails_count, failed_tests, user_directory
end
pro
unittest_reading_in5
,
P_to_DATA
,
fails_count
,
failed_tests
,
user_directory
,
u
;
+
;
**
******************************************
;
**
Tests
for
IN5
;
-
@
lamp
.
cbk
rdset
,
inst
=
'IN5'
TEST_directory
=
P_to_DATA
+
'data_in5'
+
lamp_dvd
cd
,
TEST_directory
;
Vanadium
(
17
July
2019
)
message
,
/
reset
st
=
'IN5: Vanadium (July 2019)'
rdset
,
/
raw
W
=
RDOPR
(
'178100'
,
W
=
60
)
utest
=
[]
if
!
error_state
.
msg
gt
''
then
unittest_error_reading
,
!
error_state
.
msg
,
st
,
fails_count
,
failed_tests
,
user_directory
,
test_directory
,
u
else
begin
utest
=
[
utest
,
unittest_check_dimensions
(
W60
,
[
3
,
384
,
241
,
512
,
4
,
47382528
])]
utest
=
[
utest
,
unittest_check_axis
([
X60
[[
0
,
200
,
511
]]],
[
134.81723
,
58.098026
,
-
11.917543
])]
utest
=
[
utest
,
unittest_check_axis
([
Y60
[[
0
,
121
,
383
]]],
[
-
146.88797
,
1.2240664
,
146.88797
])]
utest
=
[
utest
,
unittest_check_string
([
Z60
[[
0
,
255
,
511
]]],
[
1
.,
256
.,
512
.])]
utest
=
[
utest
,
unittest_check_axis
([
N60
[
0
],
N60
[
-
1
]],
[
2
.,
2
.])]
utest
=
[
utest
,
unittest_check_axis
([
P60
[[
3
,
6
,
9
,
11
,
21
]]],
[
597476.0
,
5024032.0
,
270.0
,
3.6071
,
5.5
])]
utest
=
[
utest
,
unittest_check_total
(
W60
,
5013518.0
)]
utest
=
[
utest
,
unittest_check_total
(
E60
,
0.0
)]
utest
=
[
utest
,
unittest_check_total
(
N60
,
597476.0
)]
idx
=
where
(
utest
gt
0
,
nfails
)
if
nfails
gt
0
then
unittest_failed_test
,
idx
,
st
,
fails_count
,
failed_tests
,
user_directory
,
test_directory
,
u
endelse
message
,
/
reset
st
=
'IN5: Vanadium (July 2019, no raw)'
rdset
,
/
noraw
W
=
RDOPR
(
'178100'
,
W
=
60
)
utest
=
[]
if
!
error_state
.
msg
gt
''
then
unittest_error_reading
,
!
error_state
.
msg
,
st
,
fails_count
,
failed_tests
,
user_directory
,
test_directory
,
u
else
begin
utest
=
[
utest
,
unittest_check_dimensions
(
W60
,
[
2
,
512
,
362
,
4
,
185344
])]
utest
=
[
utest
,
unittest_check_axis
([
X60
[[
0
,
200
,
511
]]],
[
1
.,
201
.,
512
.])]
utest
=
[
utest
,
unittest_check_axis
([
Y60
[[
0
,
180
,
361
]]],
[
0.372
,
67.409
,
134.817
])]
utest
=
[
utest
,
unittest_check_string
([
Z60
[
0
],
Z60
[
-
1
]],
[
1
.,
512
.])]
utest
=
[
utest
,
unittest_check_axis
([
N60
[
0
]],
[
1000.0
])]
utest
=
[
utest
,
unittest_check_axis
([
P60
[[
3
,
6
,
9
,
11
,
21
]]],
[
597476.0
,
5024032.0
,
271.35553
,
3.6071
,
5.5
])]
utest
=
[
utest
,
unittest_check_total
(
W60
,
8344.5459
)]
utest
=
[
utest
,
unittest_check_total
(
E60
,
549.77899
)]
utest
=
[
utest
,
unittest_check_total
(
N60
,
1000.0
)]
idx
=
where
(
utest
gt
0
,
nfails
)
if
nfails
gt
0
then
unittest_failed_test
,
idx
,
st
,
fails_count
,
failed_tests
,
user_directory
,
test_directory
,
u
endelse
end
pro
lamp_reading_unit_test
,
inst
=
inst
;
+
;
**
***************************
...
...
@@ -1030,6 +1084,8 @@ if inst eq 'ALL' or inst eq 'IN16' then unittest_reading_in16, P_to_DATA, fails_
if
inst
eq
'ALL'
or
inst
eq
'SALSA'
then
unittest_reading_salsa
,
P_to_DATA
,
fails_count
,
failed_tests
,
user_directory
,
u
if
inst
eq
'ALL'
or
inst
eq
'IN5'
then
unittest_reading_in5
,
P_to_DATA
,
fails_count
,
failed_tests
,
user_directory
,
u
cd
,
user_directory
printf
,
u
,
''
&
printf
,
u
,
'*********** '
&
printf
,
u
,
'End of test: '
,
fails_count
,
' error(s)'
print
,
''
&
print
,
'*********** '
&
print
,
'End of test: '
,
fails_count
,
' error(s)'
...
...
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