KUNIT_ASSERT_GT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… KUNIT_ASSERT_GT πŸ’…

okay bestie, welcome to the Kernel API Manual ✨ β€” this is the page for KUNIT_ASSERT_GT, and yes it's giving "tiny macro, big feelings" energy. Let's get into it πŸŽ€


🌸 NAME 🌸

KUNIT_ASSERT_GT β€” the assertion that @left is greater than @right. literally that's it, that's the vibe πŸ’–


✨ SYNOPSIS ✨

KUNIT_ASSERT_GT (test , left , right );

no cap, that's the whole call 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • test β€” the test context object. your main character, the one holding it all together πŸ‘‘
  • left β€” an arbitrary expression that evaluates to a primitive C type. she's the left-hand side, she's got range πŸ’…
  • right β€” an arbitrary expression that evaluates to a primitive C type. the right-hand side, the comparison partner, the other half of the equation πŸ“

πŸ”₯ DESCRIPTION πŸ”₯

So here's the tea β˜•: this sets an assertion that the value left evaluates to is greater than the value right evaluates to. simple, iconic, no notes 🌈

It's the same as KUNIT_EXPECT_GT, except β€” and this is the important part, bestie, don't skim it β€” it causes an assertion failure (see KUNIT_ASSERT_TRUE) when the assertion is not met. so like, EXPECT is the chill one who just takes notes, and ASSERT is the one who stops the whole test πŸ˜­πŸ’€


⭐ SEE ALSO ⭐

everything's connected, it's a whole ecosystem, iykyk 🧚

Kernel file ./include/kunit/test.h, plus:


πŸ’œ friendly reminder bestie: ASSERT means the test stops when it fails. that's the whole difference. don't come for me, come for the macro.

and that's the page!! mwah πŸ’‹ this one lives in ./include/kunit, and it's dated October 2026 β€” slay, see you in the next one, bye bestie πŸ¦‹πŸ’–πŸŽ€

πŸ“¦ where this page comes from