void IEEE754ExceptionsPlugin::ieee754Check(UtestShell& test, TestResult& result, int flag, const char* text)
{
    result.countCheck();
    if(inexactDisabled_) CHECK(!feclearexcept(FE_INEXACT));
    if(fetestexcept(flag)) {
        CHECK(!feclearexcept(FE_ALL_EXCEPT));
        CheckFailure failure(&test, __FILE__, __LINE__, "IEEE754_CHECK_CLEAR", text);
        result.addFailure(failure);
    }
}
Пример #2
0
    void runPreviousTest()
    {
        if (currentTest_ == 0) return;

        if (firstTestInGroup_) {
            result_.currentGroupStarted(currentTest_);
            firstTestInGroup_ = false;
        }
        result_.currentTestStarted(currentTest_);

        millisTime += timeTheTestTakes_;
        for(unsigned int i = 0; i < numberOfChecksInTest_; i++) {
            result_.countCheck();
        }
        numberOfChecksInTest_ = 0;

        if (testFailure_) {
            result_.addFailure(*testFailure_);
            delete testFailure_;
            testFailure_ = 0;
        }

        result_.currentTestEnded(currentTest_);
    }