ASSERT_NE(9)
β¨ ASSERT_NE(9) β¨
okay so bestie, welcome to the Kernel API Manual entry for ASSERT_NE(9) β yes that's the man page title, no I'm not gonna make you read a header line twice, we're folding that in like a good little intro π
π NAME π
ASSERT_NE β and that's it. That's the whole description. The NAME line after the dash is literally empty π no cap, nothing follows the hyphen. Iconic of it honestly. The real tea is all further down π
πΈ SYNOPSIS πΈ
ASSERT_NE (expected , seen );
that's the whole call, bestie, copy it exactly β note the space before the comma and the semicolon at the end, keep it character for character π
π¦ ARGUMENTS π¦
expectedβ the value you're expecting, i.e. the one your brain says it should beseenβ the value you actually measured, i.e. what the code really handed you π
π§ DESCRIPTION π§
ASSERT_NE(expected, measured) β and the vibe check is:
expected != measured
that's it. that's the whole thing. it asserts they are not equal. if expected and measured turn out to be the same, it's giving π, not slay. periodt. π«Ά
π SEE ALSO π
the whole friend group, fr fr β every single one, no skipping:
- the Kernel file
./tools/testing/selftests/kselftest_harness.hexample(9) - TH_LOG(9)
- SKIP(9)
- TEST(9)
- TEST_SIGNAL(9)
- FIXTURE_DATA(9)
- FIXTURE(9)
- FIXTURE_SETUP(9)
- FIXTURE_TEARDOWN(9)
- FIXTURE_TEARDOWN_PARENT(9)
- FIXTURE_VARIANT(9)
- FIXTURE_VARIANT_ADD(9)
- TEST_F(9)
- TEST_HARNESS_MAIN(9)
- operators(9)
- ASSERT_EQ(9)
- ASSERT_LT(9)
- ASSERT_LE(9)
- ASSERT_GT(9)
- ASSERT_GE(9)
- ASSERT_NULL(9)
- ASSERT_TRUE(9)
- ASSERT_FALSE(9)
- ASSERT_STREQ(9)
- ASSERT_STRNE(9)
- EXPECT_EQ(9)
- EXPECT_NE(9)
- EXPECT_LT(9)
- EXPECT_LE(9)
- EXPECT_GT(9)
- EXPECT_GE(9)
- EXPECT_NULL(9)
- EXPECT_TRUE(9)
- EXPECT_FALSE(9)
- EXPECT_STREQ(9)
- EXPECT_STRNE(9)
- XFAIL_ADD(9)
(and yes, ASSERT_NE(9) itself is not in its own SEE ALSO list β we don't make the rules, we just read them π)
ok that's the whole page, go assert something not-equal and have the best day π
sign-off szn π¦ this little icon came from ./tools/testing/selftests, dated October 2026 β mwah, drink water, test your code, ily β¨π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms