Skip to content
Jennifer Programming Language

Testing

Ordered by the pipeline, then libraries, then dev tooling and the CLI.

PackageWhat it tests
internal/lexerToken-by-token output for fixed inputs; trivia (comments, blank lines); error cases
internal/preprocinclude file splicing and path resolution; circular-include detection; trivia handling
internal/parserAST shape via Sprint; operator precedence; the resolver's scope / slot pass with shadowing + undefined-variable errors; constant folding; parse error cases
internal/interpreterFull programs in-memory with stdout captured; value-semantics aliasing (eager deep copies) under -race; CallByName / CallByNameWith dispatch and RaiseError classification
internal/lib/converttoInt / toFloat / toString / toBool (canonical-only, toInt radix form); typeOf / objectType
internal/lib/crcCRC-32 / CRC-64 checksums over bytes; codec-table lookups and aliases
internal/lib/encodingtoText / fromText (hex, base64); charset encode / decode; isAscii and length introspection
internal/lib/fsWhole-file read / write / append; metadata (stat); directory ops; buffered File handles, against temp dirs
internal/lib/hashMD5 / SHA-1 / SHA-256 one-shot compute and streaming update / finalize
internal/lib/ioInstall registers printf / sprintf; format verbs and the modifier grammar; arity and format errors
internal/lib/listspush / sort / sortWith / reverse / concat / replicate / range; higher-order functions; non-mutating (value) semantics; caps
internal/lib/mapskeys / values / has / delete / merge; insertion order; missing-key errors
internal/lib/mathmin / max / sqrt / pow; seeded rand / randInt determinism; strict errors for unrepresentable or undefined results; special functions
internal/lib/metameta.VERSION matches version.Version; meta.BUILD matches the compiler tag
internal/lib/netTCP / UDP loopback round-trips and DNS lookups (build-tag gated; the TinyGo stub returns friendly errors)
internal/lib/osenv / args / flag helpers; external-process run / spawn / wait / poll / kill
internal/lib/regexRE2 matches / find / findAll / replace / split; positional + named captures; the pattern cache
internal/lib/stringsupper / lower, contains / startsWith / endsWith, rune-indexed indexOf; case folding
internal/lib/taskspawn observation - wait / poll / discard / waitAll / waitAny - under -race
internal/lib/testingAssertion vocabulary (assert*) throwing Error{kind:"assertion"}; run / runArgs failure classification into testing.Result; text / TAP / JUnit report rendering
internal/lib/timeConstructors / accessors / arithmetic round-trip; ISO weekday remapping; deterministic via a nowFunc package-var override
internal/lintThe L0nn / L1nn / L2nn / L3nn check catalog; # lint-disable suppression; --checks / .jennifer-lint selection and unknown-ID rejection
internal/profileCollector aggregation (self / cumulative, hit counts); table, Chrome-trace, and pprof rendering (gzip + string-table checks)
cmd/jenniferGolden test that runs every examples/*.j and compares stdout to examples/expected/*.txt; REPL inputComplete helper; AST-JSON validity; formatter idempotence + behavior preservation; cross-file error reporting

The table lists representative packages; every internal/lib/* library carries its own _test.go. internal/libsig has none of its own: its signature table is checked against the installed builtins by TestLibsigCoversInstalledBuiltins in internal/stdlib. internal/version tests version comparison and # pragma-jennifer-version constraints; its generated version_gen.go is checked through internal/lib/meta.

Run everything with go test ./.... Concurrency-touching packages (internal/interpreter, internal/lib/task) should also run under go test -race ./....