2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 BogDan Vatra <bog_dan_ro@yahoo.com>
|
2022-12-21 10:12:09 +01:00
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
2012-04-18 20:30:57 +03:00
|
|
|
|
2016-03-18 07:55:01 +01:00
|
|
|
#pragma once
|
2012-04-18 20:30:57 +03:00
|
|
|
|
|
|
|
|
#include <utils/environment.h>
|
|
|
|
|
|
2014-06-25 15:42:11 +02:00
|
|
|
#include <projectexplorer/buildconfiguration.h>
|
2012-04-18 20:30:57 +03:00
|
|
|
#include <projectexplorer/buildsteplist.h>
|
|
|
|
|
|
|
|
|
|
#define ASSERT_STATE_GENERIC(State, expected, actual) \
|
|
|
|
|
AndroidGlobal::assertState<State>(expected, actual, Q_FUNC_INFO)
|
|
|
|
|
|
|
|
|
|
namespace Android {
|
|
|
|
|
|
|
|
|
|
class AndroidGlobal
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
template<typename State> static void assertState(State expected,
|
|
|
|
|
State actual, const char *func)
|
|
|
|
|
{
|
|
|
|
|
assertState(QList<State>() << expected, actual, func);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template<typename State> static void assertState(const QList<State> &expected,
|
|
|
|
|
State actual, const char *func)
|
|
|
|
|
{
|
|
|
|
|
if (!expected.contains(actual)) {
|
|
|
|
|
qWarning("Warning: Unexpected state %d in function %s.",
|
|
|
|
|
actual, func);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace Android
|