mirror of
https://gitlab.cern.ch/wotsubo/PSBoardDataBase.git
synced 2025-06-08 05:55:42 +09:00
add(SlaveLogParser): test for psbid 525
This commit is contained in:
parent
f325051a08
commit
2eef64bf5b
2 changed files with 12 additions and 2 deletions
|
@ -144,7 +144,6 @@ function parse_power_section!(lines::Base.Iterators.Stateful)
|
|||
)
|
||||
line = popfirst!(lines) # I'm not sure this mutating operation is called in sequence
|
||||
m = match(re, line)
|
||||
@info "" m line
|
||||
(dac = parse(Int64, m[1]), adc = parse(Int64, m[2]))
|
||||
end |>
|
||||
Tuple |>
|
||||
|
|
|
@ -85,7 +85,18 @@ true || include("../src/PSBoardDataBase.jl")
|
|||
lines = Iterators.Stateful(
|
||||
Iterators.drop(eachline("./input/slavelogs/main/430_100.txt"), 1915),
|
||||
)
|
||||
PSBoardDataBase.SlaveLogParser.parse_power_section!(lines)
|
||||
result = PSBoardDataBase.SlaveLogParser.parse_power_section!(lines)
|
||||
@test result.result_3v3d == 3.43
|
||||
@test result.result_3v3a == 2.91
|
||||
@test result.result_n3va == -2.97
|
||||
|
||||
lines = Iterators.Stateful(
|
||||
Iterators.drop(eachline("./input/slavelogs/main/525_244.txt"), 1915),
|
||||
)
|
||||
result = PSBoardDataBase.SlaveLogParser.parse_power_section!(lines)
|
||||
@test result.result_3v3d == 3.47
|
||||
@test result.result_3v3a == 2.91
|
||||
@test result.result_n3va == -3.01
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue