summaryrefslogtreecommitdiffstats
path: root/examples/example-base/test-base.h
blob: 3f600eae77db8a028b479ae37327de10372945b6 (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 "slang-com-ptr.h"
#include "slang.h"
#include "source/core/slang-string-util.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;
};