Exemplo n.º 1
0
// Call this when you're starting a new test
void CTOCSPResult::NewTestL(const TDesC& aName)
{
    CheckL();

    HBufC* name = aName.AllocLC();
    User::LeaveIfError(iNames.Append(name));
    CleanupStack::Pop(name);

    iTotal++;
}
Exemplo n.º 2
0
// Then call this to say if it passed
void CTOCSPResult::ResultL(const TBool aResult)
{
    User::LeaveIfError(iResults.Append(aResult));

    if (aResult)
    {
        iPassed++;
    }
    else
    {
        iFailed++;
    }

    CheckL();
}
Exemplo n.º 3
0
void CTOCSPResult::LogSummaryL(CTOCSPLogger& aLog)
{
    // Allow one less test result than test started,
    // assume this meanswe crashed out of last test
    if (iTotal == (iPassed + iFailed + 1))
    {
        User::LeaveIfError(iResults.Append(EFalse));
        ++iFailed;
    }

    CheckL();

    aLog.LogL(_L("Run: "));
    aLog.LogL(iTotal);
    aLog.LogL(_L("\nPassed: "));
    aLog.LogL(iPassed);

    aLog.LogL(_L("\n"));
    aLog.LogL(iFailed);
    aLog.LogL(_L(" tests failed out of "));
    aLog.LogL(iTotal);
    aLog.LogL(_L("\n"));

    aLog.LogL(_L("Failed tests: "));
    TInt tally = 0;
    for (TInt i = 0; i < iTotal; ++i)
    {
        if (!iResults[i])
        {
            aLog.LogL(*iNames[i]);
            aLog.LogL(_L(" ("));
            aLog.LogL(i);
            aLog.LogL(_L(")"));

            if (++tally < iFailed)
            {
                aLog.LogL(_L(", "));
            }
            else
            {
                aLog.LogL(_L("\n"));
            }
        }
    }
    aLog.LogL(_L("\r\n</pre></body></html>\r\n"));
}
Exemplo n.º 4
0
bool Cube::Check()
{
    return CheckU() && CheckD() && CheckL() && CheckR() && CheckF() && CheckB();
}