testcorpus

package
v0.23.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package testcorpus holds shared text corpora for tests and benchmarks across mdsmith's internal packages. Each corpus is a frozen reference input that pins behaviour or measures the cost of a hot code path; lifting them out of any one test package lets multiple call sites benchmark the same bytes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbbrHeavy

func AbbrHeavy() []string

AbbrHeavy returns a copy of the abbreviation-heavy paragraph corpus. Each call allocates a fresh []string so callers cannot mutate the canonical fixture; the strings themselves are immutable in Go, so this fully isolates consumers from each other. The corpus is imported by both mdtext's BenchmarkSplitSentences_Subset and the paragraph-structure rule's BenchmarkRule_MDS024 so both gates measure the same bytes — but with no shared mutable state.

func AbbrHeavyParagraph

func AbbrHeavyParagraph() string

AbbrHeavyParagraph joins the abbreviation-heavy corpus into one long Markdown paragraph, matching how a real .md file looks when MDS024's per-paragraph segmenter runs on it. The benchmark for the rule uses this shape so the fixture is a single paragraph the rule extracts from the AST, not the slice of independent strings.

The join logic itself is in joinWithSpace so the empty-slice branch can be tested without touching the package-level corpus.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL