Пример #1
0
void ArmEmitterTest()
{
	// Disabled for now.
	return;

	for (int i = 0; i < 6; i++) {
		ILOG("--------------------------");
	}
	ILOG("--------------------------");
	ILOG("Running ARM emitter test!");
	ILOG("--------------------------");

	TestCode gen;
	gen.ReserveCodeSpace(0x1000);
	const u8 *codeStart = gen.GetCodePtr();
	gen.Generate();

	u32 retval = CallPtr(gen.testCodePtr);
	// ILOG("ARM emitter test 1 passed if %f == 3.0! retval = %08x", abc[32 + 31], retval);
	ILOG("c: %f %f %f %f", c[0], c[1], c[2], c[3]);
	for (int i = 0; i < 6; i++) {
		ILOG("--------------------------");
	}
	// DisassembleArm(codeStart, gen.GetCodePtr()-codeStart);
}
Пример #2
0
void TestContextMenuPrivate::editorChanged(Core::IEditor *iface)
{
    bool isTestcase = false;

    if (iface) {
        QString fname = iface->displayName();
        isTestcase = ((fname.endsWith(QLatin1String(".qtt")) || fname.endsWith(QLatin1String(".cpp")))
            && (fname.startsWith(QLatin1String("tst_")) || fname.startsWith(QLatin1String("sys_"))
            || fname.startsWith(QLatin1String("int_")) || fname.startsWith(QLatin1String("prf_"))));
    }

    if (isTestcase) {
        TestCollection tc;
        TestCode *code =
            tc.findCode(QDir::toNativeSeparators(iface->file()->fileName()), QString(), QString());
        isTestcase = (code != 0);
        // Only show "run single test" in context menu if the testcase file is
        // visible (i.e. has focus) in the editor
        m_editorRunSingleTestAction->setVisible(isTestcase
            && m_editorRunSingleTestAction->text().contains(code->testCase()));
    } else {
        m_editorRunSingleTestAction->setVisible(false);
    }

    m_editorInsertTestFunctionAction->setVisible(isTestcase);
    m_editorStopTestingAction->setVisible(isTestcase);
}
Пример #3
0
void ArmEmitterTest()
{
	ILOG("Running ARM emitter test!");
	TestCode gen;
	gen.ReserveCodeSpace(0x4000);
	gen.Generate();

	CallPtr(gen.testCodePtr);
	ILOG("ARM emitter test 1 passed!");
}