Remove redundant semicolons.
This commit is contained in:
parent
086ec3d2e5
commit
84ad2e5b19
@ -47,7 +47,8 @@ using Platform::String;
|
|||||||
|
|
||||||
using Platform::NullReferenceException;
|
using Platform::NullReferenceException;
|
||||||
|
|
||||||
template <class Key, class Value> class ConcurrentDictionary {
|
template <class Key, class Value>
|
||||||
|
class ConcurrentDictionary {
|
||||||
public:
|
public:
|
||||||
bool TryGetValue(Key key, Value &value) {
|
bool TryGetValue(Key key, Value &value) {
|
||||||
std::lock_guard<std::mutex> guard(mutex_);
|
std::lock_guard<std::mutex> guard(mutex_);
|
||||||
|
@ -33,7 +33,7 @@ TEST(Heap, sort_random_perm) {
|
|||||||
ASSERT_EQ(i, kheap.top_key());
|
ASSERT_EQ(i, kheap.top_key());
|
||||||
kheap.pop();
|
kheap.pop();
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
class CheckedHeap {
|
class CheckedHeap {
|
||||||
public:
|
public:
|
||||||
|
@ -92,7 +92,7 @@ static void bench_log(std::string name, F &&f) {
|
|||||||
bench(LogBenchmark<typename decltype(f())::element_type>(name, threads_n, test_full_logging, f));
|
bench(LogBenchmark<typename decltype(f())::element_type>(name, threads_n, test_full_logging, f));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
TEST(Log, Bench) {
|
TEST(Log, Bench) {
|
||||||
bench_log("NullLog", [] { return td::make_unique<td::NullLog>(); });
|
bench_log("NullLog", [] { return td::make_unique<td::NullLog>(); });
|
||||||
|
@ -68,4 +68,4 @@ TEST(Variant, simple) {
|
|||||||
}
|
}
|
||||||
ASSERT_STREQ("-C", move_sb());
|
ASSERT_STREQ("-C", move_sb());
|
||||||
sb.clear();
|
sb.clear();
|
||||||
};
|
}
|
||||||
|
@ -132,7 +132,7 @@ TEST(DB, binlog_encryption) {
|
|||||||
binlog_name.str(), [&](const BinlogEvent &x) { v.push_back(x.data_.str()); }, cucumber, hello);
|
binlog_name.str(), [&](const BinlogEvent &x) { v.push_back(x.data_.str()); }, cucumber, hello);
|
||||||
CHECK(v == std::vector<string>({"AAAA", "BBBB", long_data, "CCCC"}));
|
CHECK(v == std::vector<string>({"AAAA", "BBBB", long_data, "CCCC"}));
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
TEST(DB, sqlite_lfs) {
|
TEST(DB, sqlite_lfs) {
|
||||||
string path = "test_sqlite_db";
|
string path = "test_sqlite_db";
|
||||||
|
@ -48,7 +48,7 @@ TEST(MessageEntities, mention) {
|
|||||||
check_mention(
|
check_mention(
|
||||||
"@ya @gif @wiki @vid @bing @pic @bold @imdb @ImDb @coub @like @vote @giff @cap ya cap @y @yar @bingg @bin",
|
"@ya @gif @wiki @vid @bing @pic @bold @imdb @ImDb @coub @like @vote @giff @cap ya cap @y @yar @bingg @bin",
|
||||||
{"@gif", "@wiki", "@vid", "@bing", "@pic", "@bold", "@imdb", "@ImDb", "@coub", "@like", "@vote", "@bingg"});
|
{"@gif", "@wiki", "@vid", "@bing", "@pic", "@bold", "@imdb", "@ImDb", "@coub", "@like", "@vote", "@bingg"});
|
||||||
};
|
}
|
||||||
|
|
||||||
static void check_bot_command(const td::string &str, const td::vector<td::string> &expected) {
|
static void check_bot_command(const td::string &str, const td::vector<td::string> &expected) {
|
||||||
auto result_slice = td::find_bot_commands(str);
|
auto result_slice = td::find_bot_commands(str);
|
||||||
|
@ -55,4 +55,4 @@ TEST(Poll, get_vote_percentage) {
|
|||||||
check_vote_percentage({200, 200, 200, 300, 240, 60}, 1200, {16, 16, 16, 25, 20, 5});
|
check_vote_percentage({200, 200, 200, 300, 240, 60}, 1200, {16, 16, 16, 25, 20, 5});
|
||||||
check_vote_percentage({200, 200, 200, 250, 250, 20}, 1120, {18, 18, 18, 22, 22, 2});
|
check_vote_percentage({200, 200, 200, 250, 250, 20}, 1120, {18, 18, 18, 22, 22, 2});
|
||||||
check_vote_percentage({200, 200, 200, 250, 250, 40}, 1140, {17, 17, 17, 22, 22, 4});
|
check_vote_percentage({200, 200, 200, 250, 250, 40}, 1140, {17, 17, 17, 22, 22, 4});
|
||||||
};
|
}
|
||||||
|
@ -25,7 +25,7 @@ TEST(StringCleaning, clean_name) {
|
|||||||
ASSERT_EQ("abc", clean_name("\xC2\xA0\xC2\xA0"
|
ASSERT_EQ("abc", clean_name("\xC2\xA0\xC2\xA0"
|
||||||
"abc\xC2\xA0\xC2\xA0\xC2\xA0\xC2\xA0",
|
"abc\xC2\xA0\xC2\xA0\xC2\xA0\xC2\xA0",
|
||||||
1000000));
|
1000000));
|
||||||
};
|
}
|
||||||
|
|
||||||
TEST(StringCleaning, clean_username) {
|
TEST(StringCleaning, clean_username) {
|
||||||
ASSERT_EQ("@mention", clean_username("@mention"));
|
ASSERT_EQ("@mention", clean_username("@mention"));
|
||||||
@ -34,7 +34,7 @@ TEST(StringCleaning, clean_username) {
|
|||||||
ASSERT_EQ("ЛШТШФУМ", clean_username("ЛШТШФУМ"));
|
ASSERT_EQ("ЛШТШФУМ", clean_username("ЛШТШФУМ"));
|
||||||
ASSERT_EQ("", clean_username("...."));
|
ASSERT_EQ("", clean_username("...."));
|
||||||
ASSERT_EQ("asd", clean_username(". ASD .."));
|
ASSERT_EQ("asd", clean_username(". ASD .."));
|
||||||
};
|
}
|
||||||
|
|
||||||
static void check_clean_input_string(string str, string expected, bool expected_result) {
|
static void check_clean_input_string(string str, string expected, bool expected_result) {
|
||||||
auto result = clean_input_string(str);
|
auto result = clean_input_string(str);
|
||||||
|
Loading…
Reference in New Issue
Block a user