summaryrefslogtreecommitdiffstats
path: root/examples/example-base/test-base.h
blob: cdd72c5809e99cc66d9ccba55405d05f4f3ecda0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#pragma once

#include "slang.h"
#include "slang-com-ptr.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;
};