Skip to content

Commit 5c47b52

Browse files
mpretty-cyrojagerman
authored andcommitted
Fixed a test failure caused by odd syntax
1 parent cd58ab3 commit 5c47b52

File tree

2 files changed

+30
-29
lines changed

2 files changed

+30
-29
lines changed

tests/test_config_contacts.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#include <oxenc/endian.h>
22
#include <oxenc/hex.h>
33
#include <session/config/contacts.h>
4-
#include <session/util.hpp>
54
#include <sodium/crypto_sign_ed25519.h>
65

76
#include <catch2/catch_test_macros.hpp>

tests/test_config_convo_info_volatile.cpp

Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -155,13 +155,15 @@ TEST_CASE("Conversations", "[config][conversations]") {
155155

156156
auto x4 = convos2.get_blinded_1to1(legacy_blinded_id, true);
157157
REQUIRE(x4);
158-
CHECK(x4->blinded_session_id == "150000000000000000000000000000000000101010111010000110100001210000");
158+
CHECK(x4->blinded_session_id ==
159+
"150000000000000000000000000000000000101010111010000110100001210000");
159160
CHECK(x4->last_read == now_ms);
160161
CHECK(x4->unread);
161162

162163
auto x5 = convos2.get_blinded_1to1(blinded_id, false);
163164
REQUIRE(x5);
164-
CHECK(x5->blinded_session_id == "255000000000000000000000000000000000101010111010000110100001210000");
165+
CHECK(x5->blinded_session_id ==
166+
"255000000000000000000000000000000000101010111010000110100001210000");
165167
CHECK(x5->last_read == now_ms);
166168
CHECK(x5->unread);
167169

@@ -260,31 +262,31 @@ TEST_CASE("Conversations", "[config][conversations]") {
260262
seen.clear();
261263
for (auto it = convos.begin_1to1(); it != convos.end(); ++it)
262264
seen.push_back(it->session_id);
263-
CHECK(seen == std::vector<std::string>{{
265+
CHECK(seen == std::vector<std::string>{
264266
"051111111111111111111111111111111111111111111111111111111111111111",
265-
}});
267+
});
266268

267269
seen.clear();
268270
for (auto it = convos.begin_communities(); it != convos.end(); ++it)
269271
seen.emplace_back(it->base_url());
270-
CHECK(seen == std::vector<std::string>{{
272+
CHECK(seen == std::vector<std::string>{
271273
"http://example.org:5678",
272-
}});
274+
});
273275

274276
seen.clear();
275277
for (auto it = convos.begin_legacy_groups(); it != convos.end(); ++it)
276278
seen.emplace_back(it->id);
277-
CHECK(seen == std::vector<std::string>{{
279+
CHECK(seen == std::vector<std::string>{
278280
"05cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
279-
}});
281+
});
280282

281283
seen.clear();
282284
for (auto it = convos.begin_blinded_1to1(); it != convos.end(); ++it)
283285
seen.emplace_back(it->blinded_session_id);
284-
CHECK(seen == std::vector<std::string>{{
286+
CHECK(seen == std::vector<std::string>{
285287
"150000000000000000000000000000000000101010111010000110100001210000",
286288
"2512345ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
287-
}});
289+
});
288290
}
289291

290292
TEST_CASE("Conversations (C API)", "[config][conversations][c]") {
@@ -492,18 +494,18 @@ TEST_CASE("Conversations (C API)", "[config][conversations][c]") {
492494
convo_info_volatile_iterator_free(it);
493495

494496
CHECK(seen == std::vector<std::string>{
495-
{"1-to-1: "
496-
"051111111111111111111111111111111111111111111111111111111111111111",
497-
"1-to-1: "
498-
"055000000000000000000000000000000000000000000000000000000000000000",
499-
"comm: http://example.org:5678/r/sudokuroom",
500-
"lgr: "
501-
"05cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
502-
"b: "
503-
"150000000000000000000000000000000000101010111010000110100001210000",
504-
"b: "
505-
"2512345cccccccccccccccccccccccccccccccccccccccccccccccccccccccccc"
506-
"c"}});
497+
"1-to-1: "
498+
"051111111111111111111111111111111111111111111111111111111111111111",
499+
"1-to-1: "
500+
"055000000000000000000000000000000000000000000000000000000000000000",
501+
"comm: http://example.org:5678/r/sudokuroom",
502+
"lgr: "
503+
"05cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
504+
"b: "
505+
"150000000000000000000000000000000000101010111010000110100001210000",
506+
"b: "
507+
"2512345cccccccccccccccccccccccccccccccccccccccccccccccccccccccccc"
508+
"c"});
507509
}
508510

509511
CHECK_FALSE(config_needs_push(conf));
@@ -543,9 +545,9 @@ TEST_CASE("Conversations (C API)", "[config][conversations][c]") {
543545
seen.emplace_back(ogi.base_url);
544546
}
545547
convo_info_volatile_iterator_free(it);
546-
CHECK(seen == std::vector<std::string>{{
548+
CHECK(seen == std::vector<std::string>{
547549
"http://example.org:5678",
548-
}});
550+
});
549551

550552
seen.clear();
551553
convo_info_volatile_legacy_group cgi;
@@ -556,9 +558,9 @@ TEST_CASE("Conversations (C API)", "[config][conversations][c]") {
556558
seen.emplace_back(cgi.group_id);
557559
}
558560
convo_info_volatile_iterator_free(it);
559-
CHECK(seen == std::vector<std::string>{{
561+
CHECK(seen == std::vector<std::string>{
560562
"05cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
561-
}});
563+
});
562564

563565
seen.clear();
564566
convo_info_volatile_blinded_1to1 bi;
@@ -569,9 +571,9 @@ TEST_CASE("Conversations (C API)", "[config][conversations][c]") {
569571
seen.emplace_back(bi.blinded_session_id);
570572
}
571573
convo_info_volatile_iterator_free(it);
572-
CHECK(seen == std::vector<std::string>{{
574+
CHECK(seen == std::vector<std::string>{
573575
"150000000000000000000000000000000000101010111010000110100001210000",
574-
}});
576+
});
575577
}
576578

577579
TEST_CASE("Conversation pruning", "[config][conversations][pruning]") {

0 commit comments

Comments
 (0)