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

Function row_sizes_match_constants

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected