let get_test_edges cfg v =
  match succ_e cfg v with
    | [e1; e2] ->
        begin match (edge_type e1), (edge_type e2) with
          | (Ethen|EbackThen), (Eelse|EbackElse-> e1, e2
          | (Eelse|EbackElse), (Ethen|EbackThen-> e2, e1
          | _, (Eelse|EbackElse-> 
              Wp_parameters.fatal "[cfg] test node with invalid edges %a" 
                pp_edge e1
          | _, _ -> 
              Wp_parameters.fatal "[cfg] test node with invalid edges %a" 
                pp_edge e2
        end
    | _ -> raise (Invalid_argument "[cfg:get_test_edges] not a test")