<commit_before>// Author:  <NAME> (https://github.com/nathanhourt/)

#ifndef QMLPROMISETESTER_HPP
#define QMLPROMISETESTER_HPP

#include <qppromise.h>

#include <QQmlApplicationEngine>
#include <QtTest/QtTest>

#include <stdlib.h>

class QmlPromiseTester : public QObject
{
    Q_OBJECT

    int argc = 0;
    char argv[1][17] = {{"qmlpromisetester"}};
    QQmlApplicationEngine engine;

    void runTest(QString testName);

public:
    explicit QmlPromiseTester(QObject *parent = 0);
    virtual ~QmlPromiseTester() {}

    Q_INVOKABLE QPPromise* makePromise();
    Q_INVOKABLE QJSValue getScriptPromise(QPPromise* promise);

private slots:
    void basicResolve() { runTest(__FUNCTION__); }
    void basicReject() { runTest(__FUNCTION__); }
    void resolveWithArguments() { runTest(__FUNCTION__); }
    void rejectWithArgument() { runTest(__FUNCTION__); }
    void twoResolversWithArgs() { runTest(__FUNCTION__); }
    void twoRejectersWithArg() { runTest(__FUNCTION__); }
    void nestedPromise() { runTest(__FUNCTION__); }
};

#endif // QMLPROMISETESTER_HPP<commit_msg>Remove vestigial code<commit_after>// Author:  <NAME> (https://github.com/nathanhourt/)

#ifndef QMLPROMISETESTER_HPP
#define QMLPROMISETESTER_HPP

#include <qppromise.h>

#include <QQmlApplicationEngine>
#include <QtTest/QtTest>

#include <stdlib.h>

class QmlPromiseTester : public QObject
{
    Q_OBJECT

    QQmlApplicationEngine engine;

    void runTest(QString testName);

public:
    explicit QmlPromiseTester(QObject *parent = 0);
    virtual ~QmlPromiseTester() {}

    Q_INVOKABLE QPPromise* makePromise();
    Q_INVOKABLE QJSValue getScriptPromise(QPPromise* promise);

private slots:
    void basicResolve() { runTest(__FUNCTION__); }
    void basicReject() { runTest(__FUNCTION__); }
    void resolveWithArguments() { runTest(__FUNCTION__); }
    void rejectWithArgument() { runTest(__FUNCTION__); }
    void twoResolversWithArgs() { runTest(__FUNCTION__); }
    void twoRejectersWithArg() { runTest(__FUNCTION__); }
    void nestedPromise() { runTest(__FUNCTION__); }
};

#endif // QMLPROMISETESTER_HPP
{'fraction_non_alphanumeric': 0.11477761836441894, 'fraction_numerical': 0.0028694404591104736, 'mean_word_length': 5.028818443804035, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6946605', 'n_tokens_mistral': 695, 'n_tokens_neox': 696, 'n_words': 137}