Tests: internal/semantic
internal/semantic · 8 tests
Each test is named for the property it holds, and runs against a real deployment: there is no mock of the database and no arm that skips when it is absent. The sentence is the test's name read back; the name is what go test -run takes.
surface_test.go
- The same entity always produces the same surface —
TestTheSameEntityAlwaysProducesTheSameSurface. Two rebuilds of one entity produce one surface. - Identity comes before evidence and survives the cut —
TestIdentityComesBeforeEvidenceAndSurvivesTheCut. The name comes first, so the thing being described is stated before the evidence for it — and when the budget cuts, it cuts evidence rather than identity. - A quote is never cut in half —
TestAQuoteIsNeverCutInHalf. A quote is included whole or not at all. - A repeated quote is said once —
TestARepeatedQuoteIsSaidOnce. A relation asserted five times stores five identical quotes, and a surface repeating one sentence five times is a surface mostly about that sentence. - An entity with no quotes is still its names —
TestAnEntityWithNoQuotesIsStillItsNames. An entity with nothing said about it is still findable by what it was called.
surfacebounds_test.go
- Entity identity cannot bypass the semantic surface budget —
TestEntityIdentityCannotBypassTheSemanticSurfaceBudget - Semantic budget counts unicode bytes and whole optional items —
TestSemanticBudgetCountsUnicodeBytesAndWholeOptionalItems - Semantic collections refuse malformed or unbounded work —
TestSemanticCollectionsRefuseMalformedOrUnboundedWork