Commit 8221b02b authored by Nathan Bronson's avatar Nathan Bronson Committed by Facebook Github Bot

fix tests for platforms with small std::string

Summary:
F14MapTest's continuousCapacitySmall test implicitly assumed
that folly::F14FastMap<std::size_t, std::string> uses the vector storage
policy, but this is not the case if std::string is 8 bytes.  Remove the
assumption.

Differential Revision: D19431446

fbshipit-source-id: 6e6f0cbe7f57b23b2df38c87bb36a6532ab97a14
parent ad8ac4d9
...@@ -1873,14 +1873,22 @@ void runContinuousCapacityTest(std::size_t minSize, std::size_t maxSize) { ...@@ -1873,14 +1873,22 @@ void runContinuousCapacityTest(std::size_t minSize, std::size_t maxSize) {
} }
} }
TEST(F14Map, continuousCapacitySmall) { TEST(F14Map, continuousCapacitySmall0) {
runContinuousCapacityTest<folly::F14NodeMap<std::size_t, std::string>>(1, 14); runContinuousCapacityTest<folly::F14NodeMap<std::size_t, std::string>>(1, 14);
}
TEST(F14Map, continuousCapacitySmall1) {
runContinuousCapacityTest<folly::F14ValueMap<std::size_t, std::string>>( runContinuousCapacityTest<folly::F14ValueMap<std::size_t, std::string>>(
1, 14); 1, 14);
}
TEST(F14Map, continuousCapacitySmall2) {
runContinuousCapacityTest<folly::F14VectorMap<std::size_t, std::string>>( runContinuousCapacityTest<folly::F14VectorMap<std::size_t, std::string>>(
1, 100); 1, 100);
runContinuousCapacityTest<folly::F14FastMap<std::size_t, std::string>>( }
1, 100);
TEST(F14Map, continuousCapacitySmall3) {
runContinuousCapacityTest<folly::F14FastMap<std::size_t, std::string>>(1, 14);
} }
TEST(F14Map, continuousCapacityBig0) { TEST(F14Map, continuousCapacityBig0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment