mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
pow-testgiver support
This commit is contained in:
parent
dbde9c1c40
commit
f064b1047a
257 changed files with 6665 additions and 2608 deletions
|
@ -29,6 +29,7 @@
|
|||
#include "td/utils/Status.h"
|
||||
|
||||
#include <atomic>
|
||||
#include <functional>
|
||||
#include <utility>
|
||||
|
||||
#define REGISTER_TESTS(x) \
|
||||
|
@ -134,7 +135,7 @@ class TestsRunner : public TestContext {
|
|||
template <class T>
|
||||
class RegisterTest {
|
||||
public:
|
||||
RegisterTest(string name, TestsRunner &runner = TestsRunner::get_default()) {
|
||||
explicit RegisterTest(string name, TestsRunner &runner = TestsRunner::get_default()) {
|
||||
runner.add_test(name, make_unique<T>());
|
||||
}
|
||||
};
|
||||
|
@ -152,8 +153,8 @@ class Stage {
|
|||
std::atomic<uint64> value_{0};
|
||||
};
|
||||
|
||||
inline string rand_string(char from, char to, int len) {
|
||||
string res(len, 0);
|
||||
inline string rand_string(int from, int to, size_t len) {
|
||||
string res(len, '\0');
|
||||
for (auto &c : res) {
|
||||
c = static_cast<char>(Random::fast(from, to));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue