summaryrefslogtreecommitdiff
path: root/expression-test/expression_test_runner.hpp
blob: 596d5c11b677058270e47f142da025f2901bd6ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#pragma once

#include <vector>
#include <string>

class TestData;

struct TestRunOutput {
    TestRunOutput(std::string id_) : id(std::move(id_)) {}
    std::string id;
    bool passed = false;
    std::string text;
    std::string expression;
    std::string serialized;
};

class TestStats {
public:
    std::size_t testCount() const {
        return passed.size() + failed.size() + errored.size() +
               ignorePassed.size() + ignoreFailed.size();
    }

    std::vector<TestRunOutput> passed;
    std::vector<TestRunOutput> failed;
    std::vector<TestRunOutput> errored;
    std::vector<TestRunOutput> ignorePassed;
    std::vector<TestRunOutput> ignoreFailed;
    std::vector<std::string> ids;
};

TestRunOutput runExpressionTest(TestData&, const std::string& rootPath, const std::string& id);