MCPcopy Index your code
hub / github.com/ciphermodelabs/ciphercore / test_unfinalized_graphs

Function test_unfinalized_graphs

ciphercore-base/src/graphs.rs:5098–5116  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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() {

Callers

nothing calls this directly

Calls 7

create_unchecked_contextFunction · 0.85
scalar_typeFunction · 0.70
finalizeMethod · 0.45
create_graphMethod · 0.45
inputMethod · 0.45
set_output_nodeMethod · 0.45
set_main_graphMethod · 0.45

Tested by

no test coverage detected