(WIP) tried to use Strapping, but it had a bag (gave up)

This commit is contained in:
Wataru Otsubo 2024-09-30 11:06:53 +09:00
parent 61b6d4a39e
commit cf55b5601c
4 changed files with 36 additions and 1 deletions

View file

@ -6,6 +6,29 @@ using Dates
true || include("../src/PSBoardDataBase.jl")
@testset "PSBoardDataBase" begin
@testset "types" begin
@testset "StructTypes and Strapping" begin
using Strapping
@info "" Strapping.construct(
Vector{PSBoardDataBase.PsBoard},
(id = [123, 10], daughterboard_id = [nothing, 12345]),
)
@test Strapping.construct(
PSBoardDataBase.PsBoard,
(id = [123], daughterboard_id = [nothing]),
) == PSBoardDataBase.PsBoard(123, nothing)
@test Strapping.construct(
Vector{PSBoardDataBase.PsBoard},
[(100, nothing), (200, 12345)],
) == PSBoardDataBase.PsBoard[
PSBoardDataBase.PsBoard(100, nothing),
PSBoardDataBase.PsBoard(200, 12345),
]
end
end
@testset "parse master log" begin
masterlog_metadata::PSBoardDataBase.QaqcMasterLog.QaqcMasterLogMetadata =
PSBoardDataBase.QaqcMasterLog.parse_master_log("input/log/57_long.log")