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

Function test_annotations

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

Source from the content-addressed store, hash-verified

5738
5739 #[test]
5740 fn test_annotations() {
5741 let test_annotations_helper = || -> Result<()> {
5742 let context = create_context()?;
5743 let g = context.create_graph()?;
5744 let i = g.input(scalar_type(BIT))?;
5745 g.add_annotation(GraphAnnotation::AssociativeOperation)?;
5746 i.add_annotation(NodeAnnotation::AssociativeOperation)?;
5747 assert_eq!(
5748 g.get_annotations()?,
5749 vec![GraphAnnotation::AssociativeOperation]
5750 );
5751 assert_eq!(
5752 i.get_annotations()?,
5753 vec![NodeAnnotation::AssociativeOperation]
5754 );
5755 Ok(())
5756 };
5757 test_annotations_helper().unwrap();
5758 }
5759
5760 async fn parallel_get_type(output: Node) -> Result<Type> {
5761 output.get_type()

Callers

nothing calls this directly

Calls 5

add_annotationMethod · 0.80
create_contextFunction · 0.70
scalar_typeFunction · 0.70
create_graphMethod · 0.45
inputMethod · 0.45

Tested by

no test coverage detected