MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_workspace_buffers

Function test_workspace_buffers

atomic-core/src/apply/workspace.rs:1098–1112  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1096
1097 #[test]
1098 fn test_workspace_buffers() {
1099 let mut workspace = Workspace::new();
1100
1101 // Adjacency buffer
1102 workspace.adjacency_buffer().push(Position::ROOT);
1103 assert_eq!(workspace.adjacency_buffer().len(), 1);
1104
1105 // Traversal stack
1106 workspace.traversal_stack().push(Position::ROOT);
1107 assert_eq!(workspace.traversal_stack().len(), 1);
1108
1109 // Visited set
1110 workspace.visited().insert(Position::ROOT);
1111 assert!(workspace.visited().contains(&Position::ROOT));
1112 }
1113
1114 // Statistics Tests
1115

Callers

nothing calls this directly

Calls 5

adjacency_bufferMethod · 0.80
traversal_stackMethod · 0.80
visitedMethod · 0.80
pushMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected