Skip to main content

Module testing

Module testing 

Source
Expand description

How every public item is tested: the examples in its documentation, and the tests that say they cover it.

ยงTesting: publet-algorithms

Generated by tools/doc-coverage.py; do not edit.

55 public items; 45 of 45 functions have examples, and 37 items name the tests that cover them.

Every example in the documentation runs as a test (cargo test --doc). A test is listed against an item when its // covers: comment says it exercises that item: as the subject of the test, or within the same module to set it up. A test claims only items of the module it tests. The files are linked below.

ItemExamplesTests
CycleThroughStart--
Fixed6--
Fixed6::from_integer1mul_div_keeps_the_scale, truncates_toward_zero_rather_than_rounding
Fixed6::from_scaled1addition_saturates_rather_than_wrapping, display_is_stable_to_six_places, fixed_point_results_match_integer_arithmetic, mul_div_keeps_the_scale
Fixed6::halve_fractional1fixed_point_results_match_integer_arithmetic, halving_is_exact_on_whole_periods
Fixed6::is_zero1-
Fixed6::min1-
Fixed6::mul_div1division_by_zero_yields_zero, fixed_point_results_match_integer_arithmetic, mul_div_keeps_the_scale
Fixed6::ratio1division_by_zero_yields_zero, fixed_point_results_match_integer_arithmetic, truncates_toward_zero_rather_than_rounding
Fixed6::times1fixed_point_results_match_integer_arithmetic
Fixed6::to_scaled1fixed_point_results_match_integer_arithmetic
graph::closure1closure_excludes_the_start_and_refuses_a_cycle_through_it, the_closure_is_what_the_start_reaches_by_at_least_one_edge
graph::reachable1reachable_is_breadth_first_from_the_start, the_closure_is_what_the_start_reaches_by_at_least_one_edge
graph::reaches1reaches_finds_paths_and_a_node_reaches_itself, the_closure_is_what_the_start_reaches_by_at_least_one_edge
graph::root1root_follows_parents_and_stops_on_a_cycle
graph::topological_order1a_topological_order_puts_every_dependency_first, topological_order_names_the_cycle, topological_order_puts_dependencies_first
Hash--
log::checkpoints1-
log::consistency_proof1a_rewritten_history_fails_consistency, a_tampered_consistency_proof_is_rejected, a_truncated_history_fails_consistency, consistency_proofs_agree, consistency_proofs_match_rfc_6962, consistency_proofs_round_trip_for_every_pair
log::empty_root1matches_rfc6962_constants, roots_match_the_certificate_transparency_test_vectors
log::fetches_required1-
log::inclusion_proof1a_tampered_inclusion_path_is_rejected, an_inclusion_proof_does_not_verify_a_different_leaf, audit_paths_agree, audit_paths_match_rfc_6962, inclusion_proofs_round_trip_for_every_index_and_size
log::leaf_hash1a_rewritten_history_fails_consistency, a_tampered_consistency_proof_is_rejected, a_tampered_inclusion_path_is_rejected, a_truncated_history_fails_consistency, an_inclusion_proof_does_not_verify_a_different_leaf, consistency_proofs_round_trip_for_every_pair, identical_sizes_require_an_empty_proof_and_equal_roots, inclusion_proofs_round_trip_for_every_index_and_size, leaf_and_interior_hashes_are_domain_separated, matches_rfc6962_constants, roots_agree, roots_match_the_certificate_transparency_test_vectors
log::node_hash1leaf_and_interior_hashes_are_domain_separated
log::root1a_rewritten_history_fails_consistency, a_tampered_consistency_proof_is_rejected, a_tampered_inclusion_path_is_rejected, a_truncated_history_fails_consistency, an_inclusion_proof_does_not_verify_a_different_leaf, consistency_proofs_round_trip_for_every_pair, identical_sizes_require_an_empty_proof_and_equal_roots, inclusion_proofs_round_trip_for_every_index_and_size, roots_agree, roots_match_the_certificate_transparency_test_vectors
log::to_hex1matches_rfc6962_constants, roots_match_the_certificate_transparency_test_vectors
log::verify_consistency1a_rewritten_history_fails_consistency, a_tampered_consistency_proof_is_rejected, a_truncated_history_fails_consistency, absurd_sizes_are_refused_without_hanging, consistency_proofs_match_rfc_6962, consistency_proofs_round_trip_for_every_pair, identical_sizes_require_an_empty_proof_and_equal_roots, sizes_beyond_a_32_bit_usize_are_checked_like_any_other
log::verify_inclusion1a_tampered_inclusion_path_is_rejected, absurd_sizes_are_refused_without_hanging, an_inclusion_proof_does_not_verify_a_different_leaf, audit_paths_match_rfc_6962, inclusion_proofs_round_trip_for_every_index_and_size, sizes_beyond_a_32_bit_usize_are_checked_like_any_other
Membership--
membership::diff1diff_reports_additions_and_removals_in_sorted_order
Membership::is_empty1-
Membership::len1duplicates_do_not_change_the_root
Membership::members1-
Membership::new1a_changed_membership_changes_the_root, a_tampered_bracket_is_rejected, absent_members_prove_absence, an_absence_proof_does_not_verify_a_present_member, diff_reports_additions_and_removals_in_sorted_order, duplicates_do_not_change_the_root, non_adjacent_brackets_are_rejected, present_members_prove_inclusion, the_root_is_independent_of_insertion_order
Membership::prove1a_tampered_bracket_is_rejected, absent_members_prove_absence, an_absence_proof_does_not_verify_a_present_member, an_empty_membership_proves_absence_of_everything, non_adjacent_brackets_are_rejected, present_members_prove_inclusion
Membership::root1a_changed_membership_changes_the_root, a_tampered_bracket_is_rejected, absent_members_prove_absence, an_absence_proof_does_not_verify_a_present_member, an_empty_membership_proves_absence_of_everything, duplicates_do_not_change_the_root, non_adjacent_brackets_are_rejected, present_members_prove_inclusion, the_root_is_independent_of_insertion_order
membership::verify1a_tampered_bracket_is_rejected, absent_members_prove_absence, an_absence_proof_does_not_verify_a_present_member, an_empty_membership_proves_absence_of_everything, non_adjacent_brackets_are_rejected, present_members_prove_inclusion
Node--
Node::branch1a_branch_commits_to_its_children, a_leaf_and_a_branch_never_collide_even_with_matching_bytes, child_insertion_order_does_not_affect_the_hash, find_resolves_a_slash_joined_path, leaves_lists_every_leaf_with_its_full_path_in_sorted_order, nesting_propagates_a_leaf_change_to_every_ancestor, renaming_a_child_changes_the_branch_hash_even_if_content_is_identical
Node::children1-
Node::find1find_resolves_a_slash_joined_path, nesting_propagates_a_leaf_change_to_every_ancestor
Node::hash1a_branch_commits_to_its_children, a_leaf_and_a_branch_never_collide_even_with_matching_bytes, child_insertion_order_does_not_affect_the_hash, find_resolves_a_slash_joined_path, nesting_propagates_a_leaf_change_to_every_ancestor, renaming_a_child_changes_the_branch_hash_even_if_content_is_identical, two_leaves_with_different_content_hash_differently, two_leaves_with_the_same_content_hash_the_same
Node::is_branch1-
Node::leaf1a_branch_commits_to_its_children, child_insertion_order_does_not_affect_the_hash, find_resolves_a_slash_joined_path, leaves_lists_every_leaf_with_its_full_path_in_sorted_order, nesting_propagates_a_leaf_change_to_every_ancestor, renaming_a_child_changes_the_branch_hash_even_if_content_is_identical, two_leaves_with_different_content_hash_differently, two_leaves_with_the_same_content_hash_the_same
Node::leaves1leaves_lists_every_leaf_with_its_full_path_in_sorted_order
Node::with_child1a_branch_commits_to_its_children, child_insertion_order_does_not_affect_the_hash, find_resolves_a_slash_joined_path, leaves_lists_every_leaf_with_its_full_path_in_sorted_order, nesting_propagates_a_leaf_change_to_every_ancestor, renaming_a_child_changes_the_branch_hash_even_if_content_is_identical
Params--
Proof--
propagate::propagate1a_subject_confined_edge_applies_only_within_that_subject, an_unvouched_subgraph_receives_no_weight_at_any_size, decay_reduces_an_older_edge, propagation_is_invariant_under_input_order, propagation_is_reproducible_across_runs, vouching_for_more_nodes_does_not_confer_more_weight
propagate::propagate_within1a_subject_confined_edge_applies_only_within_that_subject
propagate::reachable_within1reachability_is_undirected_and_bounded_by_distance
Seed--
TrustEdge--
version::satisfies1a_caret_is_compatible_as_cargo_reads_it, a_minimum_compares_part_by_part, a_requirement_is_a_version_prefix_at_a_dot_boundary, version_requirements_match_the_rules
Weights--

Test files: