Many tests in one spec
You will learn
Why several small tests read better than one long one, and how the report counts them.
A spec may hold any number of test blocks. Each one checks one idea and has a name that says which. The report counts tests and asserts separately: the lesson spec has 3 tests and 5 asserts. When one fails, its name tells you which idea broke, and the other tests still report on their own ideas.
Try it
Make one of the three tests fail and check that the other two still pass.

The tests of a t27 spec counted one by one, with the asserts in each, from the lesson spec. Lesson 11 of the t27 basics course.
specs/basics/11_many_tests.t27
// SPDX-License-Identifier: Apache-2.0
; t27 basics, lesson 11: Many tests in one spec.
; Split checks into small named tests, so a failure points at one idea.
module basics_11_many_tests;
pub const HOURS : u8 = 24;
pub const MINUTES : u8 = 60;
pub const DAYS_IN_WEEK : u8 = 7;
test a_day_has_24_hours {
assert HOURS == 24;
}
test an_hour_has_60_minutes {
assert MINUTES == 60;
assert MINUTES > HOURS;
}
test a_week_has_7_days {
assert DAYS_IN_WEEK == 7;
assert DAYS_IN_WEEK < HOURS;
}
All lessons
Module 1 · A spec file
What a .t27 file holds: a module line, prose lines and comments.
Module 2 · Values and types
Constants, the width of a whole number, and true, false and text.
Module 3 · Arrays, trits and expressions
Lists of values, the three values of a trit, and what operators compute.
Module 4 · Tests and functions
A test block, several small tests in one spec, and a function with typed inputs.
Module 5 · Inside a function
Names with let and var, choices with if and switch, and loops.
Module 6 · Visibility and your own types
What pub shares with other modules, and the structs and enums you declare.
Module 7 · Modules, rules and gen-ts
Reading another module, stating a rule that always holds, and a spec turned into TypeScript.
Module 8 · The compiler and tri
The backends t27c writes, the stages it reads a spec in, and the tri command.
Module 9 · Errors, a program, what next
Reading a compiler error, one small complete program, and the course to take next.