We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7553fb1 commit ab28d38Copy full SHA for ab28d38
libc/test/src/__support/freestore_test.cpp
@@ -73,9 +73,11 @@ TEST(LlvmLibcFreeStore, RemoveBestFit) {
73
ASSERT_EQ(store.remove_best_fit(largest_small->inner_size()), largest_small);
74
store.insert(largest_small);
75
76
- // Search smallest for best fit.
77
- ASSERT_EQ(store.remove_best_fit(smallest->inner_size() + 1), largest_small);
78
- store.insert(largest_small);
+ // Search small list for best fit.
+ Block<> *next_smallest =
+ largest_small == smallest ? remainder : largest_small;
79
+ ASSERT_EQ(store.remove_best_fit(smallest->inner_size() + 1), next_smallest);
80
+ store.insert(next_smallest);
81
82
// Continue search for best fit to large blocks.
83
EXPECT_EQ(store.remove_best_fit(largest_small->inner_size() + 1), remainder);
0 commit comments