MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / row_sizes_match_constants

Function row_sizes_match_constants

codegraph-kernel/src/buffers.rs:371–418  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

369
370 #[test]
371 fn row_sizes_match_constants() {
372 let mut t = Tables::default();
373 let mut a = Arena::default();
374 let name = a.put("x");
375 t.push_node(&NodeRow {
376 kind: 0,
377 visibility: 0,
378 flags: BoolFlags::default(),
379 start_line: 1,
380 end_line: 1,
381 start_column: 0,
382 end_column: 0,
383 name,
384 qualified_name: name,
385 id: name,
386 docstring: NONE_STR,
387 signature: NONE_STR,
388 decorators: NONE_STR,
389 type_parameters: NONE_STR,
390 return_type: NONE_STR,
391 extra_json: NONE_STR,
392 });
393 assert_eq!(t.nodes.len(), NODE_ROW_SIZE);
394 t.push_edge(&EdgeRow {
395 source_idx: 0,
396 target_idx: 0,
397 kind: 0,
398 provenance: 0,
399 line: NONE,
400 column: NONE,
401 metadata_json: NONE_STR,
402 source_id_str: NONE_STR,
403 target_id_str: NONE_STR,
404 });
405 assert_eq!(t.edges.len(), EDGE_ROW_SIZE);
406 t.push_ref(&RefRow {
407 from_idx: 0,
408 kind: 1,
409 line: 1,
410 column: 0,
411 reference_name: name,
412 candidates: NONE_STR,
413 from_id_str: NONE_STR,
414 });
415 assert_eq!(t.refs.len(), REF_ROW_SIZE);
416 let meta = build_meta(&t, a.len(), NONE_STR, 0.0);
417 assert_eq!(meta.len(), META_SIZE);
418 }
419}

Callers

nothing calls this directly

Calls 6

build_metaFunction · 0.85
push_nodeMethod · 0.80
push_edgeMethod · 0.80
lenMethod · 0.80
putMethod · 0.65
push_refMethod · 0.45

Tested by

no test coverage detected