summaryrefslogtreecommitdiffstats
path: root/examples/example-base/test-base.h
blob: 293c9f0d825d9a91f403ea15c057330cda7613c1 (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
#pragma once

#include "core/slang-string-util.h"
#include "slang-com-ptr.h"
#include "slang.h"

using Slang::ComPtr;

class TestBase
{

public:
    // Parses command line options. This example only has one option for testing purpose.
    int parseOption(int argc, char** argv);

    void printEntrypointHashes(
        int entryPointCount,
        int targetCount,
        ComPtr<slang::IComponentType>& composedProgram);

    bool isTestMode() const { return m_isTestMode; }

private:
    bool m_isTestMode = false;
    uint64_t m_globalCounter = 0;
};