operators(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… operators

ok so this is from the Kernel API Manual bestie β€” the operators(9) page β€” and it's literally the cheat sheet for the operator macros you drop inside TEST and TEST_F. ✨

Here's the whole vibe, and it's genuinely this simple:

  • ASSERT_* calls β€” these ones do NOT play. The second one trips, test execution stops immediately, right there, no coming back. πŸ’€
  • EXPECT_* calls β€” way more chill. They emit a failure warning, they note it, and then they continue on with the test like nothing happened. 🫢

That's it, that's the whole page. No cap. The difference between the two families is literally just "stop the whole thing" vs "log it and keep going," and honestly that's the tea. πŸŽ€

bestie pls remember: with ASSERT_* you don't get to see what would've happened after β€” it's over. With EXPECT_* you get the full picture but you gotta actually read your warnings. πŸ‘‘

🌈 SEE ALSO ✨

The main character of this whole saga is the kernel file ./tools/testing/selftests/kselftest_harness.h β€” go read example(9) first, it's giving tutorial energy 🧚. Then the whole friend group:

The assert girlies πŸ”₯:

The expect girlies 🌸:

And the one who's like "I told you so" πŸ™ˆ:


okay that's the page!! it lives down in ./tools/testing/selftests and it's dated October 2026, stamped with operators(9) at the bottom like a little signature πŸ’œ go forth and test, bestie β€” you're gonna slay πŸ¦‹β­

πŸ“¦ where this page comes from