mirror of
https://github.com/NixOS/nix
synced 2025-06-29 02:11:15 +02:00
libstore: Introduce WorkerProto::FeatureSet alias
Unfortunately Feature is just an alias to `std::string` and not a new-type, so a ton of code relies on it being exactly a `std::string`. Using transparent comparators just for StringSet necessitates using it here as well.
This commit is contained in:
parent
55815ec225
commit
5278cd2396
4 changed files with 20 additions and 26 deletions
|
@ -685,7 +685,7 @@ TEST_F(WorkerProtoTest, handshake_features)
|
|||
toClient.create();
|
||||
toServer.create();
|
||||
|
||||
std::tuple<WorkerProto::Version, std::set<WorkerProto::Feature>> clientResult;
|
||||
std::tuple<WorkerProto::Version, WorkerProto::FeatureSet> clientResult;
|
||||
|
||||
auto clientThread = std::thread([&]() {
|
||||
FdSink out { toServer.writeSide.get() };
|
||||
|
@ -703,7 +703,7 @@ TEST_F(WorkerProtoTest, handshake_features)
|
|||
|
||||
EXPECT_EQ(clientResult, daemonResult);
|
||||
EXPECT_EQ(std::get<0>(clientResult), 123u);
|
||||
EXPECT_EQ(std::get<1>(clientResult), std::set<WorkerProto::Feature>({"bar", "xyzzy"}));
|
||||
EXPECT_EQ(std::get<1>(clientResult), WorkerProto::FeatureSet({"bar", "xyzzy"}));
|
||||
}
|
||||
|
||||
/// Has to be a `BufferedSink` for handshake.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue