()
| 5096 | |
| 5097 | #[test] |
| 5098 | fn test_unfinalized_graphs() { |
| 5099 | let context = create_unchecked_context().unwrap(); |
| 5100 | let e = context.finalize(); |
| 5101 | assert!(e.is_err()); |
| 5102 | let graph = context.create_graph().unwrap(); |
| 5103 | let graph2 = context.create_graph().unwrap(); |
| 5104 | let e = context.finalize(); |
| 5105 | assert!(e.is_err()); |
| 5106 | let i = graph2.input(scalar_type(BIT)).unwrap(); |
| 5107 | graph2.set_output_node(i).unwrap(); |
| 5108 | graph2.finalize().unwrap(); |
| 5109 | context.set_main_graph(graph2).unwrap(); |
| 5110 | let e = context.finalize(); |
| 5111 | assert!(e.is_err()); |
| 5112 | let ii = graph.input(scalar_type(BIT)).unwrap(); |
| 5113 | graph.set_output_node(ii).unwrap(); |
| 5114 | graph.finalize().unwrap(); |
| 5115 | context.finalize().unwrap(); |
| 5116 | } |
| 5117 | |
| 5118 | #[test] |
| 5119 | fn test_operation_serialization() { |
nothing calls this directly
no test coverage detected