diff options
Diffstat (limited to 'llvm/unittests/tools/llvm-exegesis/ClusteringTest.cpp')
-rw-r--r-- | llvm/unittests/tools/llvm-exegesis/ClusteringTest.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/unittests/tools/llvm-exegesis/ClusteringTest.cpp b/llvm/unittests/tools/llvm-exegesis/ClusteringTest.cpp index b89c277b694..ecdb7d2a274 100644 --- a/llvm/unittests/tools/llvm-exegesis/ClusteringTest.cpp +++ b/llvm/unittests/tools/llvm-exegesis/ClusteringTest.cpp @@ -82,5 +82,19 @@ TEST(ClusteringTest, Clusters3D_InvalidOrder) { consumeError(std::move(Error)); } +TEST(ClusteringTest, Ordering) { + ASSERT_LT(InstructionBenchmarkClustering::ClusterId::makeValid(1), + InstructionBenchmarkClustering::ClusterId::makeValid(2)); + + ASSERT_LT(InstructionBenchmarkClustering::ClusterId::makeValid(2), + InstructionBenchmarkClustering::ClusterId::noise()); + + ASSERT_LT(InstructionBenchmarkClustering::ClusterId::makeValid(2), + InstructionBenchmarkClustering::ClusterId::error()); + + ASSERT_LT(InstructionBenchmarkClustering::ClusterId::noise(), + InstructionBenchmarkClustering::ClusterId::error()); +} + } // namespace } // namespace exegesis |