KUNIT_EXPECT_GT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

Okay bestie, welcome to the Kernel API Manual β€” this is the KUNIT_EXPECT_GT(9) page, and it's literally about one thing: KUNIT_EXPECT_GT β€” an expectation that @left is greater than @right. That's the whole vibe. πŸŽ€


✨ SYNOPSIS ✨

KUNIT_EXPECT_GT (test , left , right );

🧚 ARGUMENTS 🧚

  • test β€” the test context object. Like, the little universe your test lives in. 🫢
  • left β€” an arbitrary expression that evaluates to a primitive C type. Go off, expression. ✨
  • right β€” an arbitrary expression that evaluates to a primitive C type. Same energy, bestie. πŸ’œ

🌸 DESCRIPTION 🌸

So here's the tea: this sets an expectation that the value that left evaluates to is greater than the value that right evaluates to. Semantically it's equivalent to KUNIT_EXPECT_TRUE(test, (left) > (right)) β€” literally the same thing, no cap. See KUNIT_EXPECT_TRUE for more information. That's it, that's the whole explanation. πŸ¦‹


🌈 SEE ALSO 🌈

Kernel file ./include/kunit/test.h β€” and then the whole squad, fr fr:


πŸ’… that's the whole page, bestie β€” go write tests that slay πŸ’…

This cutie came from ./include/kunit, and it's dated October 2026 in the manual, so yeah β€” she's fresh. Bye! πŸ’–βœ¨

πŸ“¦ where this page comes from