merge with master

This commit is contained in:
ado
2021-01-21 01:54:20 +01:00
18 changed files with 330 additions and 6306 deletions

View File

@@ -1,18 +1,20 @@
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
#include "../include/ss/parser.hpp"
#include "doctest.h"
#include <algorithm>
#include <filesystem>
#include <fstream>
#include <ss/parser.hpp>
#ifdef CMAKE_GITHUB_CI
#include <doctest/doctest.h>
#else
#include <doctest.h>
#endif
struct unique_file_name {
const std::string name;
unique_file_name() : name{std::tmpnam(nullptr)} {
}
unique_file_name() : name{std::tmpnam(nullptr)} {}
~unique_file_name() {
std::filesystem::remove(name);
}
~unique_file_name() { std::filesystem::remove(name); }
};
struct X {
@@ -28,9 +30,7 @@ struct X {
.append(delim)
.append(s);
}
auto tied() const {
return std::tie(i, d, s);
}
auto tied() const { return std::tie(i, d, s); }
};
template <typename T>
@@ -167,13 +167,10 @@ struct test_struct {
int i;
double d;
char c;
auto tied() {
return std::tie(i, d, c);
}
auto tied() { return std::tie(i, d, c); }
};
void expect_test_struct(const test_struct&) {
}
void expect_test_struct(const test_struct&) {}
// various scenarios
TEST_CASE("testing composite conversion") {
@@ -395,9 +392,7 @@ struct my_string {
my_string() = default;
~my_string() {
delete[] data;
}
~my_string() { delete[] data; }
// make sure no object is copied
my_string(const my_string&) = delete;
@@ -428,9 +423,7 @@ struct xyz {
my_string x;
my_string y;
my_string z;
auto tied() {
return std::tie(x, y, z);
}
auto tied() { return std::tie(x, y, z); }
};
TEST_CASE("testing the moving of parsed values") {