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

Function row_sizes_match_constants

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

Source from the content-addressed store, hash-verified

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

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