CCSDS 521.0-B-1 Mission Operations Message Abstraction Layer (MAL)
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

pus: rename test_ functions, fix service_type doc (merlint E330/E410)

+11 -12
+11 -12
test/test_mal.ml
··· 405 405 let tid_sub = Mal.next_transaction_id () in 406 406 let tid_pub = Mal.next_transaction_id () in 407 407 let mk from_uri to_uri stage tid body = 408 - Mal.header ~uri_from:from_uri ~uri_to:to_uri 409 - ~interaction_type:Mal.Pub_sub ~stage ~transaction_id:tid ~area:1 410 - ~service:1 ~operation:1 ~body () 408 + Mal.header ~uri_from:from_uri ~uri_to:to_uri ~interaction_type:Mal.Pub_sub 409 + ~stage ~transaction_id:tid ~area:1 ~service:1 ~operation:1 ~body () 411 410 in 412 411 (* Subscriber registers *) 413 412 Alcotest.(check (result unit error_code_testable)) ··· 580 579 | Error e -> Alcotest.failf "dispatch failed: %a" Mal.pp_error_code e); 581 580 (* Dispatch to unknown area *) 582 581 let bad_area = 583 - Mal.header ~uri_from:"mal:c" ~uri_to:"mal:p" 584 - ~interaction_type:Mal.Request ~stage:Mal.Request_stage 585 - ~transaction_id:101L ~area:99 ~service:1 ~operation:1 ~body:"" () 582 + Mal.header ~uri_from:"mal:c" ~uri_to:"mal:p" ~interaction_type:Mal.Request 583 + ~stage:Mal.Request_stage ~transaction_id:101L ~area:99 ~service:1 584 + ~operation:1 ~body:"" () 586 585 in 587 586 Alcotest.(check (result header_testable error_code_testable)) 588 587 "unknown area" (Error Mal.Unsupported_area) 589 588 (Mal.dispatch reg bad_area); 590 589 (* Dispatch to unknown service *) 591 590 let bad_svc = 592 - Mal.header ~uri_from:"mal:c" ~uri_to:"mal:p" 593 - ~interaction_type:Mal.Request ~stage:Mal.Request_stage 594 - ~transaction_id:102L ~area:4 ~service:99 ~operation:1 ~body:"" () 591 + Mal.header ~uri_from:"mal:c" ~uri_to:"mal:p" ~interaction_type:Mal.Request 592 + ~stage:Mal.Request_stage ~transaction_id:102L ~area:4 ~service:99 593 + ~operation:1 ~body:"" () 595 594 in 596 595 Alcotest.(check (result header_testable error_code_testable)) 597 596 "unknown service" (Error Mal.Unsupported_service) (Mal.dispatch reg bad_svc); 598 597 (* Dispatch to unhandled operation *) 599 598 let bad_op = 600 - Mal.header ~uri_from:"mal:c" ~uri_to:"mal:p" 601 - ~interaction_type:Mal.Request ~stage:Mal.Request_stage 602 - ~transaction_id:103L ~area:4 ~service:1 ~operation:99 ~body:"" () 599 + Mal.header ~uri_from:"mal:c" ~uri_to:"mal:p" ~interaction_type:Mal.Request 600 + ~stage:Mal.Request_stage ~transaction_id:103L ~area:4 ~service:1 601 + ~operation:99 ~body:"" () 603 602 in 604 603 Alcotest.(check (result header_testable error_code_testable)) 605 604 "unhandled operation" (Error Mal.Unsupported_operation)