[PATCH] D95803: Ensure that InstructionCost actually implements a total ordering

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 4 10:24:12 PST 2021


sdesmalen added inline comments.


================
Comment at: llvm/unittests/Support/InstructionCostTest.cpp:25
+
+  ASSERT_TRUE(DefaultCost.isValid());
+  EXPECT_EQ(*(DefaultCost.getValue()), 0);
----------------
is there a reason you're preferring ASSERT over EXPECT in this test, and not the one below (getValue() == 0). I would think EXPECT is sufficient.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95803/new/

https://reviews.llvm.org/D95803



More information about the llvm-commits mailing list